{"id":6284,"date":"2020-07-26T09:42:57","date_gmt":"2020-07-26T09:42:57","guid":{"rendered":"https:\/\/docs_v3.dataforseo.com\/v3\/?page_id=6284"},"modified":"2025-06-10T12:08:35","modified_gmt":"2025-06-10T12:08:35","slug":"on_page-task_post","status":"publish","type":"page","link":"https:\/\/docs.dataforseo.com\/v3\/on_page-task_post\/","title":{"rendered":"on_page\/task_post"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]<\/p>\n<h2 id=\"setting-serp-tasks\">Setting OnPage Tasks<\/h2>\n<p>\u200c<br \/>\nOnPage API checks websites for 60+ customizable on-page parameters defines and displays all found flaws and opportunities for optimization so that you can easily fix them. It checks meta tags, duplicate content, image tags, response codes, and other parameters on every page. You can find the full list of OnPage API check-up parameters in the <a href=\"\/v3\/on_page\/pages\">Pages<\/a>\u00a0section.<\/p>\n<p>[\/vc_column_text]    <div class=\"endpoint\">\n        <img decoding=\"async\" class=\"endpoint__icon\" src=\"https:\/\/docs.dataforseo.com\/v3\/wp-content\/themes\/dataforseo\/assets\/img\/icons\/checked-circle.svg\" alt=\"checked\">\n\n                    POST            <button class=\"btn-reset button-link copy-button\" data-href=\"https:\/\/api.dataforseo.com\/v3\/on_page\/task_post\">\n                https:\/\/api.dataforseo.com\/v3\/on_page\/task_post                <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\n                    <use href=\"https:\/\/docs.dataforseo.com\/v3\/wp-content\/themes\/dataforseo\/assets\/img\/icons\/sprite.svg#layers\"><\/use>\n                <\/svg>\n            <\/button>\n            <\/div>\n    \t<article class=\"info-card info-card--yellow\">\n\t\t<header class=\"info-card__header\">\n\t\t\t<div class=\"info-card__icon\">\n\t\t\t\t<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\n\t\t\t\t\t<use href=\"https:\/\/docs.dataforseo.com\/v3\/wp-content\/themes\/dataforseo\/assets\/img\/icons\/sprite.svg#label\"><\/use>\n\t\t\t\t<\/svg>\n\t\t\t<\/div>\n\t\t\t<div class=\"info-card__title\">Pricing<\/div>\n\t\t<\/header>\n\t\t<div class=\"info-card__content\">\n\t\t\t<p> Your account will be charged for each request.<br \/>\nThe cost can be calculated on the <a title=\"Pricing\" href=\"https:\/\/dataforseo.com\/pricing\/on-page\/onpage-api\" target=\"_blank\" rel=\"noopener noreferrer\">Pricing<\/a> page.<\/p>\n\t\t<\/div>\n\t<\/article>\n\t[vc_column_text]All POST data should be sent in the <a href=\"https:\/\/en.wikipedia.org\/wiki\/JSON\">JSON<\/a> format (UTF-8 encoding). Task setting is done using the POST method. When setting a task, you should send all task parameters in the task array of the generic POST array. You can send up to 2000 API calls per minute, with each POST call containing no more than 100 tasks. If your POST call contains over 100 tasks, the tasks over this limit will return the <code>40006<\/code> error.<br \/>\nThe maximum number of simultaneous requests you can send is limited to 30.<\/p>\n<p>Visit <a href=\"https:\/\/dataforseo.com\/help-center\/best-practices-for-handling-onpage-api-requests\" target=\"_blank\" rel=\"noopener noreferrer\">DataForSEO Help Center<\/a> to get practical tips for request handling depending on your OnPage API payload volume.<\/p>\n<p><strong>Description of the fields for setting a task:<\/strong><\/p>\n<table style=\"width: 100%; height: 1259px;\">\n<thead>\n<tr style=\"height: 24px;\">\n<th style=\"width: 12.4003%; height: 24px;\">Field name<\/th>\n<th style=\"width: 3.91588%; height: 24px;\">Type<\/th>\n<th style=\"width: 82.9587%; height: 24px;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 192px;\"><code>target<\/code><\/td>\n<td style=\"width: 3.9884%; height: 192px;\">string<\/td>\n<td style=\"width: 82.8862%; height: 192px;\"><em>target domain<\/em><br \/>\n<strong>required field<\/strong><br \/>\ndomain name should be specified without <code>https:\/\/<\/code> and <code>www.<\/code><br \/>\nif you specify the page URL, the results will be returned for the domain included in the URL<\/td>\n<\/tr>\n<tr style=\"height: 10px;\">\n<td style=\"width: 12.4003%; height: 10px;\"><code>max_crawl_pages<\/code><\/td>\n<td style=\"width: 3.91588%; height: 10px;\">integer<\/td>\n<td style=\"width: 82.9587%; height: 10px;\"><em>crawled pages limit<\/em><br \/>\n<strong>required field<\/strong><br \/>\nthe number of pages to crawl on the specified domain<br \/>\n<strong>Note:<\/strong><br \/>\nif you set <code>max_crawl_pages<\/code> to 1 and do not specify <code>start_url<\/code> or set a homepage in it, the following sitewide checks will be disabled:<br \/>\n<code>test_canonicalization<\/code>, <code>enable_www_redirect_check<\/code>, <code>test_hidden_server_signature<\/code>, <code>test_page_not_found<\/code>, <code>test_directory_browsing<\/code>, <code>test_https_redirect<\/code><br \/>\nto enable them anyway, set <code>force_sitewide_checks<\/code> to <code>true<\/code>if you set <code>max_crawl_pages<\/code> to 1 and specify <code>start_url<\/code> other than a homepage, all sitewide checks will be disabled;<br \/>\nto enable them anyway, set <code>force_sitewide_checks<\/code> to <code>true<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>start_url<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">string<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>the first url to crawl <\/em><br \/>\noptional field<br \/>\n<strong>Note:<\/strong> you should specify an absolute URL<br \/>\nif you want to crawl a single page, specify its URL in this field and additionally set the <code>max_crawl_pages<\/code> parameter to <code>1<\/code><br \/>\nyou can also use the <a href=\"\/v3\/on_page\/instant_pages\/?bash\" target=\"_blank\" rel=\"noopener noreferrer\">live Instant Pages endpoint<\/a> to get page-specific data<\/td>\n<\/tr>\n<tr style=\"height: 168px;\">\n<td style=\"width: 12.4003%; height: 168px;\"><code>force_sitewide_checks<\/code><\/td>\n<td style=\"width: 3.91588%; height: 168px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 168px;\"><em>enable sitewide checks when crawling a single page<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> to get data on sitewide checks when crawling a single page;<br \/>\ndefault value: <code>false<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>priority_urls<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">array<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>urls to be crawled bypassing the queue<\/em><br \/>\noptional field<br \/>\nURLs specified in this array will be crawled in the first instance, bypassing the crawling queue;<br \/>\n<strong>Note:<\/strong> you should specify the absolute URL;<br \/>\nyou can specify up to <strong>20 URLs<\/strong>;<br \/>\nall URLs in the array must belong to the <code>target<\/code> domain;<br \/>\nsubdomains will be ignored unless the <code>allow_subdomains<\/code> parameter is set to <code>true<\/code>example:<br \/>\n<code>\"priority_urls\": [<br \/>\n\"https:\/\/dataforseo.com\/apis\/serp-api\",<br \/>\n\"https:\/\/dataforseo.com\/contact\"<br \/>\n]<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>max_crawl_depth<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">integer<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>crawl depth<\/em><br \/>\noptional field<br \/>\nthe linking depth of the pages to crawl;<br \/>\nfor example, starting page of the crawl is level 0, pages that have links from that page are level 1, etc.<\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 163px;\"><code>crawl_delay<\/code><\/td>\n<td style=\"width: 3.91588%; height: 163px;\">integer<\/td>\n<td style=\"width: 82.9587%; height: 163px;\"><em>delay between hits, ms<\/em><br \/>\noptional field<br \/>\nthe custom delay between crawler hits to the server<br \/>\ndefault value: <code>2000<\/code><\/td>\n<\/tr>\n<tr style=\"height: 168px;\">\n<td style=\"width: 12.4003%; height: 168px;\"><code>store_raw_html<\/code><\/td>\n<td style=\"width: 3.91588%; height: 168px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 168px;\"><em>store HTML of crawled pages<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> if you want to get the HTML of the page using the <a href=\"\/v3\/on_page\/raw_html\/\" target=\"_blank\" rel=\"noopener noreferrer\">OnPage Raw HTML endpoint<\/a><br \/>\ndefault value: <code>false<\/code><\/td>\n<\/tr>\n<tr style=\"height: 168px;\">\n<td style=\"width: 12.4003%; height: 168px;\"><code>enable_content_parsing<\/code><\/td>\n<td style=\"width: 3.91588%; height: 168px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 168px;\"><em>parse content on crawled pages<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> to use the <a href=\"\/v3\/on_page\/content_parsing\/live\/\" target=\"_blank\" rel=\"noopener noreferrer\">OnPage Content Parsing endpoint<\/a><br \/>\ndefault value: <code>false<\/code><\/td>\n<\/tr>\n<tr style=\"height: 168px;\">\n<td style=\"width: 12.4003%; height: 168px;\"><code>support_cookies<\/code><\/td>\n<td style=\"width: 3.91588%; height: 168px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 168px;\"><em>support cookies on crawled pages<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> to support cookies when crawling the pages<br \/>\ndefault value: <code>false<\/code><\/td>\n<\/tr>\n<tr style=\"height: 168px;\">\n<td style=\"width: 12.4003%; height: 168px;\"><code>accept_language<\/code><\/td>\n<td style=\"width: 3.91588%; height: 168px;\">string<\/td>\n<td style=\"width: 82.9587%; height: 168px;\"><em>language header for accessing the website<\/em><br \/>\noptional field<br \/>\nall locale formats are supported (xx, xx-XX, xxx-XX, etc.)<br \/>\n<strong>Note:<\/strong> if you do not specify this parameter, some websites may deny access; in this case, pages will be returned with the <code>\"type\":\"broken<\/code> in the response array<\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>custom_robots_txt<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">string<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>custom robots.txt settings<\/em><br \/>\noptional field<br \/>\nexample: <code>Disallow: \/directory1\/<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>robots_txt_merge_mode<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">string<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>merge with or override robots.txt settings<\/em><br \/>\noptional field<br \/>\npossible values: <code>merge<\/code>, <code>override<\/code>;<br \/>\nset to <code>override<\/code> if you want to ignore website crawling restrictions and other robots.txt settings<br \/>\ndefault value: <code>merge<\/code>;<br \/>\n<strong>Note:<\/strong> if set to <code>override<\/code>, specify the <code>custom_robots_txt<\/code> parameter<\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>custom_user_agent<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">string<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>custom user agent<\/em><br \/>\noptional field<br \/>\ncustom user agent for crawling a website<br \/>\nexample: <code>Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/83.0.4103.116 Safari\/537.36<br \/>\n<\/code><br \/>\ndefault value: <code>Mozilla\/5.0 (compatible; RSiteAuditor)<\/code><\/td>\n<\/tr>\n<tr style=\"height: 96px;\">\n<td style=\"width: 12.4003%; height: 79px;\"><code>browser_preset<\/code><\/td>\n<td style=\"width: 3.91588%; height: 79px;\">string<\/td>\n<td style=\"width: 82.9587%; height: 79px;\"><em>preset for browser screen parameters<\/em><br \/>\noptional field<br \/>\nif you use this field, you don&#8217;t need to indicate <code>browser_screen_width<\/code>, <code>browser_screen_height<\/code>, <code>browser_screen_scale_factor<\/code>possible values:<br \/>\n<code>desktop<\/code>, <code>mobile<\/code>, <code>tablet<\/code><code>desktop<\/code> preset will apply the following values:<code>browser_screen_width: 1920<\/code><br \/>\n<code>browser_screen_height: 1080<\/code><br \/>\n<code>browser_screen_scale_factor: 1<\/code><code>mobile<\/code> preset will apply the following values:<code>browser_screen_width: 390<\/code><br \/>\n<code>browser_screen_height: 844<\/code><br \/>\n<code>browser_screen_scale_factor: 3<\/code><code>tablet<\/code> preset will apply the following values:<code>browser_screen_width: 1024<\/code><br \/>\n<code>browser_screen_height: 1366<\/code><br \/>\n<code>browser_screen_scale_factor: 2<\/code><br \/>\n<strong>Note:<\/strong> to use this parameter, set <code>enable_javascript<\/code> or <code>enable_browser_rendering<\/code> to <code>true<\/code><\/td>\n<\/tr>\n<tr style=\"height: 96px;\">\n<td style=\"width: 12.4003%; height: 79px;\"><code>browser_screen_width<\/code><\/td>\n<td style=\"width: 3.91588%; height: 79px;\">integer<\/td>\n<td style=\"width: 82.9587%; height: 79px;\"><em>browser screen width<\/em><br \/>\noptional field<br \/>\nyou can set a custom browser screen width to perform audit for a particular device;<br \/>\nif you use this field, you don&#8217;t need to indicate <code>browser_preset<\/code> as it will be ignored;<br \/>\n<strong>Note:<\/strong> to use this parameter, set <code>enable_javascript<\/code> or <code>enable_browser_rendering<\/code> to <code>true<\/code>minimum value, in pixels: <code>240<\/code><br \/>\nmaximum value, in pixels: <code>9999<\/code><\/td>\n<\/tr>\n<tr style=\"height: 96px;\">\n<td style=\"width: 12.4003%; height: 79px;\"><code>browser_screen_height<\/code><\/td>\n<td style=\"width: 3.91588%; height: 79px;\">integer<\/td>\n<td style=\"width: 82.9587%; height: 79px;\"><em>browser screen height<\/em><br \/>\noptional field<br \/>\nyou can set a custom browser screen height to perform an audit for a particular device;<br \/>\nif you use this field, you don&#8217;t need to indicate <code>browser_preset<\/code> as it will be ignored;<br \/>\n<strong>Note:<\/strong> to use this parameter, set <code>enable_javascript<\/code> or <code>enable_browser_rendering<\/code> to <code>true<\/code>minimum value, in pixels: <code>240<\/code><br \/>\nmaximum value, in pixels: <code>9999<\/code><\/td>\n<\/tr>\n<tr style=\"height: 96px;\">\n<td style=\"width: 12.4003%; height: 79px;\"><code>browser_screen_scale_factor<\/code><\/td>\n<td style=\"width: 3.91588%; height: 79px;\">float<\/td>\n<td style=\"width: 82.9587%; height: 79px;\"><em>browser screen scale factor<\/em><br \/>\noptional field<br \/>\nyou can set a custom browser screen resolution ratio to perform audit for a particular device;<br \/>\nif you use this field, you don&#8217;t need to indicate <code>browser_preset<\/code> as it will be ignored;<br \/>\n<strong>Note:<\/strong> to use this parameter, set <code>enable_javascript<\/code> or <code>enable_browser_rendering<\/code> to <code>true<\/code>minimum value: <code>0.5<\/code><br \/>\nmaximum value: <code>3<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>respect_sitemap<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>respect sitemap when crawling<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> if you want to follow the order of pages indicated in the primary sitemap when crawling;<br \/>\ndefault value: <code>false<\/code><br \/>\n<strong>Note:<\/strong> if set to <code>true<\/code>, the <code>click_depth<\/code> value in the API response will equal <code>0<\/code>;<br \/>\nthe <code>max_crawl_depth<\/code> field of the request will be ignored, you can specify the number of pages to crawl using the <code>max_crawl_pages<\/code> parameter\n<\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>custom_sitemap<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">string<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>custom sitemap url<\/em><br \/>\noptional field<br \/>\nthe URL of the page where the alternative sitemap is located<br \/>\n<strong>Note:<\/strong> if you want to use this parameter, <code>respect_sitemap<\/code> should be <code>true<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>crawl_sitemap_only<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>crawl only pages indicated in the sitemap<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> if you want to crawl only the pages indicated in the sitemap<br \/>\nif you set this parameter to <code>true<\/code> and do not specify <code>custom_sitemap<\/code>, we will crawl the default sitemap<br \/>\ndefault value: <code>false<\/code><br \/>\n<strong>Note:<\/strong> if you want to use this parameter, <code>respect_sitemap<\/code> should be <code>true<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>load_resources<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>load resources<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> if you want to load image, stylesheets, scripts, and broken resources<br \/>\ndefault value: <code>false<\/code><br \/>\n<strong>Note:<\/strong> if you use this parameter, additional charges will apply; learn more about the cost of tasks with this parameter <a href=\"https:\/\/dataforseo.com\/help-center\/cost-of-onpage-api-parameters\" target=\"_blank\" rel=\"noopener noreferrer\">in our help article<\/a>; the cost can be calculated on the <a href=\"https:\/\/dataforseo.com\/pricing\/on-page\/onpage-api\" target=\"_blank\" rel=\"noopener noreferrer\">Pricing Page<\/a><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>enable_www_redirect_check<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>check if the domain implemented the www redirection<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> if you want to check if the requested domain implemented the www to non-www or non-www to www redirect;<br \/>\ndefault value: <code>false<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>enable_javascript<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>load javascript on a page<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> if you want to load the scripts available on a page<br \/>\ndefault value: <code>false<\/code><br \/>\n<strong>Note:<\/strong> if you use this parameter, additional charges will apply; learn more about the cost of tasks with this parameter <a href=\"https:\/\/dataforseo.com\/help-center\/cost-of-onpage-api-parameters\" target=\"_blank\" rel=\"noopener noreferrer\">in our help article<\/a>; the cost can be calculated on the <a href=\"https:\/\/dataforseo.com\/pricing\/on-page\/onpage-api\" target=\"_blank\" rel=\"noopener noreferrer\">Pricing Page<\/a><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>enable_xhr<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>enable XMLHttpRequest on a page<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> if you want our crawler to request data from a web server using the XMLHttpRequest object<br \/>\ndefault value: <code>false<\/code>;if you use this field, <code>enable_javascript<\/code> must be set to <code>true<\/code>;<\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>enable_browser_rendering<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>emulate browser rendering to measure Core Web Vitals<\/em><br \/>\noptional field<br \/>\nby using this parameter you will be able to emulate a browser when loading a web page;<br \/>\n<code>enable_browser_rendering<\/code> loads styles, images, fonts, animations, videos, and other resources on a page;<br \/>\ndefault value: <code>false<\/code><br \/>\nset to <code>true<\/code> to obtain Core Web Vitals (FID, CLS, LCP) metrics in the response;<br \/>\n<strong>if you use this field, <code>enable_javascript<\/code>, and <code>load_resources<\/code> parameters must be set to <code>true<\/code><\/strong><br \/>\n<strong>Note:<\/strong> if you use this parameter, additional charges will apply; learn more about the cost of tasks with this parameter <a href=\"https:\/\/dataforseo.com\/help-center\/cost-of-onpage-api-parameters\" target=\"_blank\" rel=\"noopener noreferrer\">in our help article<\/a>; the cost can be calculated on the <a href=\"https:\/\/dataforseo.com\/pricing\/on-page\/onpage-api\" target=\"_blank\" rel=\"noopener noreferrer\">Pricing Page<\/a><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>disable_cookie_popup<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>disable the cookie popup<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> if you want to disable the popup requesting cookie consent from the user;<br \/>\ndefault value:<br \/>\n<code>false<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>custom_js<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">string<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>custom javascript<\/em><br \/>\noptional field<br \/>\n<strong>Note<\/strong> that the execution time for the script you enter here should be 700 ms maximum, for example, you can use the following JS snippet to check if the website contains Google Tag Manager as a <code>scr<\/code> attribute:<br \/>\n<code>let meta = { haveGoogleAnalytics: false, haveTagManager: false };\\r\\nfor (var i = 0; i &lt; document.scripts.length; i++) {\\r\\n let src = document.scripts[i].getAttribute(\\\"src\\\");\\r\\n if (src != undefined) {\\r\\n if (src.indexOf(\\\"analytics.js\\\") &gt;= 0)\\r\\n      meta.haveGoogleAnalytics = true;\\r\\n\\tif (src.indexOf(\\\"gtm.js\\\") &gt;= 0)\\r\\n      meta.haveTagManager = true;\\r\\n  }\\r\\n}\\r\\nmeta;<\/code>the returned value depends on what you specified in this field. For instance, if you specify the following script:<br \/>\n<code>meta = {}; meta.url = document.URL; meta.test = 'test'; meta;<\/code><br \/>\nas a response you will receive the following data:<br \/>\n<code>\"custom_js_response\": {<br \/>\n\"url\": \"https:\/\/dataforseo.com\/\",<br \/>\n\"test\": \"test\"<br \/>\n}<\/code><br \/>\n<strong>Note:<\/strong> the length of the script you enter must be no more than <strong>2000 characters<\/strong><br \/>\n<strong>Note:<\/strong> if you use this parameter, additional charges will apply; learn more about the cost of tasks with this parameter <a href=\"https:\/\/dataforseo.com\/help-center\/cost-of-onpage-api-parameters\" target=\"_blank\" rel=\"noopener noreferrer\">in our help article<\/a>; the cost can be calculated on the <a href=\"https:\/\/dataforseo.com\/pricing\/on-page\/onpage-api\" target=\"_blank\" rel=\"noopener noreferrer\">Pricing Page<\/a><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>validate_micromarkup<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>enable microdata validation<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> if you want to use the <a href=\"\/v3\/on_page\/microdata\/\" target=\"_blank\" rel=\"noopener noreferrer\">OnPage API Microdata endpoint<\/a><br \/>\ndefault value: <code>false<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>allow_subdomains<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>include pages on subdomains<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> if you want to crawl all subdomains of a target website<br \/>\ndefault value: <code>false<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>allowed_subdomains<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">array<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>subdomains to crawl<\/em><br \/>\noptional field<br \/>\nspecify subdomains that you want to crawl<br \/>\nexample: <code>[\"blog.site.com\", \"my.site.com\", \"shop.site.com\"]<\/code><br \/>\n<strong>Note:<\/strong> to use this parameter, the <code>allow_subdomains<\/code> parameter should be set to <code>false<\/code>;<br \/>\notherwise, the content of <code>allowed_subdomains<\/code> field will be ignored and the results will be returned for all subdomains<\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>disallowed_subdomains<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">array<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>subdomains not to crawl<\/em><br \/>\noptional field<br \/>\nspecify subdomains that you don&#8217;t want to crawl<br \/>\nexample: <code>[\"status.site.com\", \"docs.site.com\"]<\/code><br \/>\n<strong>Note:<\/strong> to use this parameter, the <code>allow_subdomains<\/code> parameter should be set to <code>true<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>check_spell<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>check spelling<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> to check spelling on a website using <a href=\"http:\/\/hunspell.github.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Hunspell<\/a> library<br \/>\ndefault value: <code>false<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>check_spell_language<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">string<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>language of the spell check<\/em><br \/>\noptional field<br \/>\nsupported languages: &#8216;hy&#8217;, &#8216;eu&#8217;, &#8216;bg&#8217;, &#8216;ca&#8217;, &#8216;hr&#8217;, &#8216;cs&#8217;, &#8216;da&#8217;, &#8216;nl&#8217;, &#8216;en&#8217;, &#8216;eo&#8217;, &#8216;et&#8217;, &#8216;fo&#8217;, &#8216;fa&#8217;, &#8216;fr&#8217;, &#8216;fy&#8217;, &#8216;gl&#8217;, &#8216;ka&#8217;, &#8216;de&#8217;, &#8216;el&#8217;, &#8216;he&#8217;, &#8216;hu&#8217;, &#8216;is&#8217;, &#8216;ia&#8217;, &#8216;ga&#8217;, &#8216;it&#8217;, &#8216;rw&#8217;, &#8216;la&#8217;, &#8216;lv&#8217;, &#8216;lt&#8217;, &#8216;mk&#8217;, &#8216;mn&#8217;, &#8216;ne&#8217;, &#8216;nb&#8217;, &#8216;nn&#8217;, &#8216;pl&#8217;, &#8216;pt&#8217;, &#8216;ro&#8217;, &#8216;gd&#8217;, &#8216;sr&#8217;, &#8216;sk&#8217;, &#8216;sl&#8217;, &#8216;es&#8217;, &#8216;sv&#8217;, &#8216;tr&#8217;, &#8216;tk&#8217;, &#8216;uk&#8217;, &#8216;vi&#8217;<br \/>\n<strong>Note:<\/strong> if no language is specified, it will be set automatically based on page content<\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>check_spell_exceptions<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">array<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>words excluded from spell check<\/em><br \/>\noptional field<br \/>\nspecify the words that you want to exclude from spell check<br \/>\nmaximum word length: 100 characters<br \/>\nmaximum amount of words: 1000<br \/>\nexample: <code>\"SERP\", \"minifiers\", \"JavaScript\"<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>calculate_keyword_density<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">boolean<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>calculate keyword density for the target domain<\/em><br \/>\noptional field<br \/>\nset to <code>true<\/code> if you want to calculate keyword density for website pages<br \/>\ndefault value: <code>false<\/code><br \/>\n<strong>Note:<\/strong> if you use this parameter, additional charges will apply; learn more about the cost of tasks with this parameter <a href=\"https:\/\/dataforseo.com\/help-center\/cost-of-onpage-api-parameters\" target=\"_blank\" rel=\"noopener noreferrer\">in our help article<\/a><br \/>\nonce the crawl is completed, you can obtain keyword density values with <a href=\"\/v3\/on_page\/keyword_density?bash\" target=\"_blank\" rel=\"noopener noreferrer\">the Keyword Density endpoint<\/a><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>checks_threshold<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">object<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>custom threshold values for checks<\/em><br \/>\noptional field<br \/>\nyou can specify custom threshold values for the parameters included in the <code>checks<\/code> object of OnPage API responses;<br \/>\n<strong>Note:<\/strong> only integer threshold values can be modified;<br \/>\nfor example, the <code>high_loading_time<\/code> and <code>large_page_size<\/code> parameters are set to 3 seconds and 1 megabyte respectively by default;<br \/>\nif you want to change these thresholds to 1 second and 1000 kbytes, use the following snippet:<br \/>\n<code>\"checks_threshold\": {<br \/>\n\"high_loading_time\": 1,<br \/>\n\"large_page_size\": 1000<br \/>\n}<\/code>available customizable parameters with default values:<br \/>\n<code>\"title_too_short\", default value: 30, type: \"int\"<br \/>\n\"title_too_long\", default value: 65, type: \"int\"<br \/>\n\"small_page_size\", default value: 1024, type: \"int\"<br \/>\n\"large_page_size\", default value: 1048576 (1024 * 1024), type: \"int\"<br \/>\n\"low_character_count\", default value: 1024, type: \"int\"<br \/>\n\"high_character_count\", default value: 256000 (250 * 1024), type: \"int\"<br \/>\n\"low_content_rate\", default value: 0.1, type: \"float\"<br \/>\n\"high_content_rate\", default value: 0.9, type: \"float\"<br \/>\n\"high_loading_time\", default value: 3000, type: \"int\"<br \/>\n\"high_waiting_time\", default value: 1500, type: \"int\"<br \/>\n\"low_readability_rate\", default value: 15.0, type: \"float\"<br \/>\n\"irrelevant_description\", default value: 0.2, type: \"float\"<br \/>\n\"irrelevant_title\", default value: 0.3, type: \"float\"<br \/>\n\"irrelevant_meta_keywords\", default value: 0.6, type: \"float\"<\/code><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>disable_sitewide_checks<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">array<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>prevent certain sitewide checks from running<\/em><br \/>\noptional field<br \/>\nspecify the following <code>checks<\/code> to prevent them from running on the <code>target<\/code> website:<br \/>\n<code>\"test_page_not_found\"<\/code><br \/>\n<code>\"test_canonicalization\"<\/code><br \/>\n<code>\"test_https_redirect\"<\/code><br \/>\n<code>\"test_directory_browsing\"<\/code>example:<br \/>\n<code>\"disable_sitewide_checks\": [\"test_directory_browsing\", \"test_page_not_found\"]<\/code>learn more on <a href=\"https:\/\/dataforseo.com\/help-center\/how-to-disable-sitewide-checks-in-onpage-api\" target=\"_blank\" rel=\"noopener noreferrer\">our help center<\/a><\/td>\n<\/tr>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 169px;\"><code>disable_page_checks<\/code><\/td>\n<td style=\"width: 3.91588%; height: 169px;\">array<\/td>\n<td style=\"width: 82.9587%; height: 169px;\"><em>prevent certain page checks from running<\/em><br \/>\noptional field<br \/>\nspecify certain <code>checks<\/code> to prevent them from running and impacting the <code>onpage_score<\/code>example:<br \/>\n<code>\"disable_page_checks\": [\"is_5xx_code\", \"is_4xx_code\"]<\/code><\/td>\n<\/tr>\n<tr style=\"height: 96px;\">\n<td style=\"width: 12.4003%; height: 96px;\"><code>switch_pool<\/code><\/td>\n<td style=\"width: 3.9884%; height: 96px;\">boolean<\/td>\n<td style=\"width: 82.8862%; height: 96px;\"><em>switch proxy pool<\/em><br \/>\noptional field<br \/>\nif <code>true<\/code>, additional proxy pools will be used to obtain the requested data;<br \/>\nthe parameter can be used if a multitude of tasks is set simultaneously, resulting in occasional <code>rate-limit<\/code> and\/or <code>site_unreachable<\/code> errors<\/td>\n<\/tr>\n<tr style=\"height: 96px;\">\n<td style=\"width: 12.4003%; height: 96px;\"><code>return_despite_timeout<\/code><\/td>\n<td style=\"width: 3.9884%; height: 96px;\">boolean<\/td>\n<td style=\"width: 82.8862%; height: 96px;\"><em>return data on pages despite the timeout error<\/em><br \/>\noptional field<br \/>\nif <code>true<\/code>, the data will be provided on pages that failed to load within 120 seconds and responded with a timeout error;<br \/>\ndefault value: <code>false<\/code><\/td>\n<\/tr>\n<tr style=\"height: 96px;\">\n<td style=\"width: 12.4003%; height: 96px;\"><code>tag<\/code><\/td>\n<td style=\"width: 3.9884%; height: 96px;\">string<\/td>\n<td style=\"width: 82.8862%; height: 96px;\"><em>user-defined task identifier<\/em><br \/>\noptional field<br \/>\n<em>the character limit is 255<\/em><br \/>\nyou can use this parameter to identify the task and match it with the result<br \/>\nyou will find the specified <code>tag<\/code> value in the <code>data<\/code> object of the response<\/td>\n<\/tr>\n<tr style=\"height: 168px;\">\n<td style=\"width: 12.4003%; height: 168px;\"><code>pingback_url<\/code><\/td>\n<td style=\"width: 3.9884%; height: 168px;\">string<\/td>\n<td style=\"width: 82.8862%; height: 168px;\"><em>notification URL of a completed task<\/em><br \/>\noptional field<br \/>\nwhen a task is completed we will notify you by GET request sent to the URL you have specified<br \/>\nyou can use the \u2018$id\u2019 string as a <code>$id<\/code> variable and \u2018$tag\u2019 as urlencoded <code>$tag<\/code> variable. We will set the necessary values before sending the request.<br \/>\nexample:<br \/>\n<code>http:\/\/your-server.com\/pingscript?id=$id<\/code><br \/>\n<code>http:\/\/your-server.com\/pingscript?id=$id&amp;tag=$tag<\/code><br \/>\n<strong>Note:<\/strong> special characters in <code>pingback_url<\/code> will be urlencoded;<br \/>\ni.a., the <code>#<\/code> character will be encoded into <code>%23<\/code><\/p>\n<p>learn more on our <a href=\"https:\/\/dataforseo.com\/help-center\/pingbacks-postbacks-with-dataforseo-api\" target=\"_blank\" rel=\"noopener noreferrer\">Help Center<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As a response of the API server, you will receive <a href=\"https:\/\/en.wikipedia.org\/wiki\/JSON\">JSON<\/a>-encoded data containing a <code>tasks<\/code> array with the information specific to the set tasks.<\/p>\n<p><strong>Description of the fields in the results array:<\/strong><\/p>\n<table style=\"width: 77.3646%; height: 552px;\">\n<thead>\n<tr style=\"height: 24px;\">\n<th style=\"width: 38.423%; height: 24px;\">Field name<\/th>\n<th style=\"width: 1.25156%; height: 24px;\">Type<\/th>\n<th style=\"width: 61.7021%; height: 24px;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 48px;\">\n<td style=\"width: 24.3517%; height: 48px;\"><code>version<\/code><\/td>\n<td style=\"width: 6.19209%; height: 48px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 48px;\"><em>the current version of the API<\/em><\/td>\n<\/tr>\n<tr style=\"height: 48px;\">\n<td style=\"width: 38.423%; height: 48px;\"><code>status_code<\/code><\/td>\n<td style=\"width: 1.75219%; height: 48px;\">integer<\/td>\n<td style=\"width: 61.2015%; height: 48px;\"><i>general status code<\/i><br \/>\nyou can find the full list of the response codes <a href=\"\/v3\/appendix\/errors\">here<\/a><br \/>\n<strong>Note:<\/strong> we strongly recommend designing a necessary system for handling related exceptional or error conditions<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><code>status_message<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>general informational message<\/em><br \/>\nyou can find the full list of general informational messages <a href=\"\/v3\/appendix\/errors\">here<\/a><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><code>time<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>execution time, seconds<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><code>cost<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">float<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>total <i>tasks<\/i> cost, USD<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><code>tasks_count<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">integer<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>the number of tasks in the <strong><code>tasks<\/code><\/strong> array<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><code>tasks_error<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">integer<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>the number of tasks in the <strong><code>tasks<\/code><\/strong> array returned with an error<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><strong><code>tasks<\/code><\/strong><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">array<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>array of tasks<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>id<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>task identifier<\/em><br \/>\n<strong>unique task identifier in our system in the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Universally_unique_identifier\">UUID<\/a> format<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 48px;\">\n<td style=\"width: 24.3517%; height: 48px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>status_code<\/code><\/td>\n<td style=\"width: 6.19209%; height: 48px;\">integer<\/td>\n<td style=\"width: 79.8065%; height: 48px;\"><em>status code of the task <\/em><br \/>\ngenerated by DataForSEO; can be within the following range: 10000-60000<br \/>\nyou can find the full list of the response codes <a href=\"\/v3\/appendix\/errors\">here<\/a><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>status_message<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>informational message of the task<\/em><br \/>\nyou can find the full list of general informational messages <a href=\"\/v3\/appendix-errors\/\">here<\/a><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>time<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>execution time, seconds<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>cost<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">float<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>cost of the task, USD<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>result_count<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">integer<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>number of elements in the <code>result<\/code> array<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>path<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">array<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>URL path<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>data<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">object<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>contains the same parameters that you specified in the POST request<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <strong><code>result<\/code><\/strong><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">array<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>array of results<\/em><br \/>\nin this case, the value will be <code>null<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200c\u200c[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<blockquote><p>Instead of \u2018login\u2019 and \u2018password\u2019 use your credentials from https:\/\/app.dataforseo.com\/api-access<\/p><\/blockquote><div id=\"curl\" class=\"tab-content example__content\"><div class=\"example__code\"><pre><code class=\"language-bash hljs\"># Instead of &#039;login&#039; and &#039;password&#039; use your credentials from https:\/\/app.dataforseo.com\/api-access \r\nlogin=&quot;login&quot; \r\npassword=&quot;password&quot; \r\ncred=&quot;$(printf ${login}:${password} | base64)&quot; \r\ncurl --location --request POST &quot;https:\/\/api.dataforseo.com\/v3\/on_page\/task_post&quot; \r\n--header &quot;Authorization: Basic ${cred}&quot;  \r\n--header &quot;Content-Type: application\/json&quot; \r\n--data-raw &#039;[\r\n  {\r\n    &quot;target&quot;: &quot;dataforseo.com&quot;,\r\n    &quot;max_crawl_pages&quot;: 10,\r\n    &quot;load_resources&quot;: true,\r\n    &quot;enable_javascript&quot;: true,\r\n    &quot;custom_js&quot;: &quot;meta = {}; meta.url = document.URL; meta;&quot;,\r\n    &quot;tag&quot;: &quot;some_string_123&quot;,\r\n    &quot;pingback_url&quot;: &quot;https:\/\/your-server.com\/pingscript?id=$id&amp;tag=$tag&quot;\r\n  }\r\n]&#039;<\/code><\/pre><\/div><\/div><div id=\"php\" class=\"tab-content example__content\"><div class=\"example__code\"><pre><code class=\"language-php hljs\">&lt;?php\r\n\/\/ You can download this file from here https:\/\/cdn.dataforseo.com\/v3\/examples\/php\/php_RestClient.zip\r\nrequire(&#039;RestClient.php&#039;);\r\n$api_url = &#039;https:\/\/api.dataforseo.com\/&#039;;\r\n\/\/ Instead of &#039;login&#039; and &#039;password&#039; use your credentials from https:\/\/app.dataforseo.com\/api-access\r\n$client = new RestClient($api_url, null, &#039;login&#039;, &#039;password&#039;);\r\n\r\n$post_array = array();\r\n\/\/ example #1 - a simple way to set a task\r\n$post_array[] = array(\r\n   &quot;target&quot; =&gt; &quot;dataforseo.com&quot;,\r\n   &quot;max_crawl_pages&quot; =&gt; 10\r\n);\r\n\/\/ example #2 - a way to set a task with additional parameters\r\n$post_array[] = array(\r\n   &quot;target&quot; =&gt; &quot;dataforseo.com&quot;,\r\n   &quot;max_crawl_pages&quot; =&gt; 10,\r\n   &quot;load_resources&quot; =&gt; true,\r\n   &quot;enable_javascript&quot; =&gt; true,\r\n   &quot;custom_js&quot; =&gt; &quot;meta = {}; meta.url = document.URL; meta;&quot;,\r\n   &quot;tag&quot; =&gt; &quot;some_string_123&quot;,\r\n   &quot;pingback_url&quot; =&gt; &#039;https:\/\/your-server.com\/pingscript?id=$id&amp;tag=$tag&#039;\r\n);\r\n\r\n\/\/ this example has a 2 elements, but in the case of large number of tasks - send up to 100 elements per POST request\r\nif (count($post_array) &gt; 0) {\r\n   try {\r\n      \/\/ POST \/v3\/on_page\/task_post\r\n      \/\/ the full list of possible parameters is available in documentation\r\n      $result = $client-&gt;post(&#039;\/v3\/on_page\/task_post&#039;, $post_array);\r\n      print_r($result);\r\n      \/\/ do something with post result\r\n   } catch (RestClientException $e) {\r\n      echo &quot;n&quot;;\r\n      print &quot;HTTP code: {$e-&gt;getHttpCode()}n&quot;;\r\n      print &quot;Error code: {$e-&gt;getCode()}n&quot;;\r\n      print &quot;Message: {$e-&gt;getMessage()}n&quot;;\r\n      print  $e-&gt;getTraceAsString();\r\n      echo &quot;n&quot;;\r\n   }\r\n}\r\n$client = null;\r\n?&gt;<\/code><\/pre><\/div><\/div><div id=\"javascript\" class=\"tab-content example__content\"><div class=\"example__code\"><pre><code class=\"language-javascript hljs\">const post_array = [];\r\n\r\npost_array.push({\r\n  &quot;target&quot;: &quot;dataforseo.com&quot;,\r\n  &quot;max_crawl_pages&quot;: 10,\r\n  &quot;load_resources&quot;: true,\r\n  &quot;enable_javascript&quot;: true,\r\n  &quot;custom_js&quot;: &quot;meta = {}; meta.url = document.URL; meta;&quot;,\r\n  &quot;tag&quot;: &quot;some_string_123&quot;,\r\n  &quot;pingback_url&quot;: &quot;https:\/\/your-server.com\/pingscript?id=$id&amp;tag=$tag&quot;\r\n});\r\n\r\nconst axios = require(&#039;axios&#039;);\r\n\r\naxios({\r\n  method: &#039;post&#039;,\r\n  url: &#039;https:\/\/api.dataforseo.com\/v3\/on_page\/task_post&#039;,\r\n  auth: {\r\n    username: &#039;login&#039;,\r\n    password: &#039;password&#039;\r\n  },\r\n  data: post_array,\r\n  headers: {\r\n    &#039;content-type&#039;: &#039;application\/json&#039;\r\n  }\r\n}).then(function (response) {\r\n  var result = response[&#039;data&#039;][&#039;tasks&#039;];\r\n  \/\/ Result data\r\n  console.log(result);\r\n}).catch(function (error) {\r\n  console.log(error);\r\n});<\/code><\/pre><\/div><\/div><div id=\"python\" class=\"tab-content example__content\"><div class=\"example__code\"><pre><code class=\"language-python hljs\">from random import Random\r\nfrom client import RestClient\r\n# You can download this file from here https:\/\/api.dataforseo.com\/v3\/_examples\/python\/_python_Client.zip\r\nclient = RestClient(&quot;login&quot;, &quot;password&quot;)\r\n\r\nrnd = Random()\r\npost_data = dict()\r\n# example #1 - a simple way to set a task\r\npost_data[rnd.randint(1, 30000000)] = dict(\r\n    target=&quot;dataforseo.com&quot;,\r\n    max_crawl_pages=10\r\n)\r\n# example #2 - a way to set a task with additional parameters\r\npost_data[rnd.randint(1, 30000000)] = dict(\r\n    target=&quot;dataforseo.com&quot;,\r\n    max_crawl_pages=10,\r\n    load_resources=True,\r\n    enable_javascript=True,\r\n    custom_js=&quot;meta = {}; meta.url = document.URL; meta;&quot;,\r\n    tag=&quot;some_string_123&quot;,\r\n    pingback_url=&quot;https:\/\/your-server.com\/pingscript?id=$id&amp;tag=$tag&quot;\r\n)\r\n# POST \/v3\/on_page\/task_post\r\n# the full list of possible parameters is available in documentation\r\nresponse = client.post(&quot;\/v3\/on_page\/task_post&quot;, post_data)\r\n# you can find the full list of the response codes here https:\/\/docs.dataforseo.com\/v3\/appendix\/errors\r\nif response[&quot;status_code&quot;] == 20000:\r\n    print(response)\r\n    # do something with result\r\nelse:\r\n    print(&quot;error. Code: %d Message: %s&quot; % (response[&quot;status_code&quot;], response[&quot;status_message&quot;]))<\/code><\/pre><\/div><\/div><div id=\"csharp\" class=\"tab-content example__content\"><div class=\"example__code\"><pre><code class=\"language-csharp hljs\">using Newtonsoft.Json;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace DataForSeoDemos\r\n{\r\n    public static partial class Demos\r\n    {\r\n        public static async Task on_page_task_post()\r\n        {\r\n            var httpClient = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(&quot;https:\/\/api.dataforseo.com\/&quot;),\r\n                \/\/ Instead of &#039;login&#039; and &#039;password&#039; use your credentials from https:\/\/app.dataforseo.com\/api-access\r\n                DefaultRequestHeaders = { Authorization = new AuthenticationHeaderValue(&quot;Basic&quot;, Convert.ToBase64String(Encoding.ASCII.GetBytes(&quot;login:password&quot;))) }\r\n            };\r\n            var postData = new List&lt;object&gt;();\r\n            \/\/ example #1 - a simple way to set a task\r\n            postData.Add(new\r\n            {\r\n                target = &quot;dataforseo.com&quot;,\r\n                max_crawl_pages = 10\r\n            });\r\n            \/\/ example #2 - a way to set a task with additional parameters\r\n            postData.Add(new\r\n            {\r\n                target = &quot;dataforseo.com&quot;,\r\n                max_crawl_pages = 10,\r\n                load_resources = true,\r\n                enable_javascript = true,\r\n                custom_js = &quot;meta = {}; meta.url = document.URL; meta;&quot;,\r\n                tag = &quot;some_string_123&quot;,\r\n                pingback_url = &quot;https:\/\/your-server.com\/pingscript?id=$id&amp;tag=$tag&quot;\r\n            });\r\n            \/\/ POST \/v3\/on_page\/task_post\r\n            \/\/ the full list of possible parameters is available in documentation\r\n            var taskPostResponse = await httpClient.PostAsync(&quot;\/v3\/on_page\/task_post&quot;, new StringContent(JsonConvert.SerializeObject(postData)));\r\n            var result = JsonConvert.DeserializeObject&lt;dynamic&gt;(await taskPostResponse.Content.ReadAsStringAsync());\r\n            \/\/ you can find the full list of the response codes here https:\/\/docs.dataforseo.com\/v3\/appendix\/errors\r\n            if (result.status_code == 20000)\r\n            {\r\n                \/\/ do something with result\r\n                Console.WriteLine(result);\r\n            }\r\n            else\r\n                Console.WriteLine($&quot;error. Code: {result.status_code} Message: {result.status_message}&quot;);\r\n        }\r\n    }\r\n}<\/code><\/pre><\/div><\/div><blockquote><p>The above command returns JSON structured like this:<\/p><\/blockquote><div class=\"example example--json\"><div class=\"example__content\"><div class=\"example__code example__code-json\"><pre><code class=\"language-json hljs\">{\r\n  &quot;version&quot;: &quot;0.1.20200805&quot;,\r\n  &quot;status_code&quot;: 20000,\r\n  &quot;status_message&quot;: &quot;Ok.&quot;,\r\n  &quot;time&quot;: &quot;0.0815 sec.&quot;,\r\n  &quot;cost&quot;: 0.00125,\r\n  &quot;tasks_count&quot;: 1,\r\n  &quot;tasks_error&quot;: 0,\r\n  &quot;tasks&quot;: [\r\n    {\r\n      &quot;id&quot;: &quot;08071719-1535-0216-0000-3aabdf68a6ef&quot;,\r\n      &quot;status_code&quot;: 20100,\r\n      &quot;status_message&quot;: &quot;Task Created.&quot;,\r\n      &quot;time&quot;: &quot;0.0044 sec.&quot;,\r\n      &quot;cost&quot;: 0.00125,\r\n      &quot;result_count&quot;: 0,\r\n      &quot;path&quot;: [\r\n        &quot;v3&quot;,\r\n        &quot;on_page&quot;,\r\n        &quot;task_post&quot;\r\n      ],\r\n      &quot;data&quot;: {\r\n        &quot;api&quot;: &quot;on_page&quot;,\r\n        &quot;function&quot;: &quot;task_post&quot;,\r\n        &quot;target&quot;: &quot;dataforseo.com&quot;,\r\n        &quot;max_crawl_pages&quot;: 10\r\n      },\r\n      &quot;result&quot;: null\r\n    }\r\n  ]\r\n}<\/code><\/pre><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][vc_column_text] Setting OnPage Tasks \u200c OnPage API checks websites for 60+ customizable on-page parameters defines and displays all found flaws and opportunities for optimization so that you can easily fix them. It checks meta tags, duplicate content, image tags, response codes, and other parameters on every page. You can find the full list of OnPage [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template.php","meta":{"apibase_doc_request_yaml":"","apibase_doc_request_additional_yaml":"","apibase_doc_response_yaml":"","footnotes":""},"class_list":["post-6284","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/pages\/6284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/comments?post=6284"}],"version-history":[{"count":111,"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/pages\/6284\/revisions"}],"predecessor-version":[{"id":21622,"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/pages\/6284\/revisions\/21622"}],"wp:attachment":[{"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/media?parent=6284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}