OnPage

‌‌ This endpoint will return the list of pages where a specific resource is located. Using this function you will also get the data related to the pages that contain a specified resource. You can get the URL of a resource using the Resources endpoint.

post/v3/on_page/pages_by_resource

Request

  • Base URL: https://api.dataforseo.com
  • URL: https://api.dataforseo.com/v3/on_page/pages_by_resource
  • Auth: HTTP basic

Request body

idstring

<em>ID of the task</em><br><strong>required field</strong><br>you can get this ID in the response of the <a href="/v3/on_page/task_post/">Task POST</a> endpoint<br>example:<br>"07131248-1535-0216-1000-17384017ad04"

urlstring

<em>resource URL</em><br><strong>required field</strong><br>you can get this URL in the response of the <a href="/v3/on_page/resources/">Resources</a> endpoint<br>example:<br><code>https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js</code>

limitinteger nullable

<em>the maximum number of returned pages</em><br>optional field<br>default value: <code>100</code><br>maximum value: <code>1000</code>

offsetinteger nullable

<em>offset in the results array of returned pages</em><br>optional field<br>default value: <code>0</code><br>maximum value: <code>2000000</code><br>if you specify the <code>10</code> value, the first ten pages in the results array will be omitted and the data will be provided for the successive pages

filtersobject[] nullable

<em>array of results filtering parameters</em><br>optional field<br><strong>you can add several filters at once (8 filters maximum)</strong><br>you should set a logical operator <code>and</code>, <code>or</code> between the conditions<br>the following operators are supported:<br><code>regex</code>, <code>not_regex</code>, <code><</code>, <code><=</code>, <code>></code>, <code>>=</code>, <code>=</code>, <code><></code>, <code>in</code>, <code>not_in</code>, <code>like</code>, <code>not_like</code><br>you can use the <code>%</code> operator with <code>like</code> and <code>not_like</code> to match any string of zero or more characters<br>example:<br><code>["meta.external_links_count","<=",50]</code><code>["url","like","https://dataforseo.com/apis/dataforseo-labs-api"]</code><p><code>[["checks.high_waiting_time","=",false],<br>"and",["resource_type","=","html"]]</code><p><code>[["page_timing.duration_time","<",100],"and",[["checks.large_page_size","=",false],"or",["checks.high_waiting_time","=",false]]]</code><p>The full list of possible filters is available <a href="/v3/on_page/filters_and_thresholds/?bash" target="_blank" rel="noopener noreferrer">by this link.</a>

order_bystring[] nullable

<em>results sorting rules</em><br>optional field<br>you can use the same values as in the <code>filters</code> array to sort the results<br>possible sorting types:<br><code>asc</code> - results will be sorted in the ascending order<br><code>desc</code> - results will be sorted in the descending order<br>you should use a comma to set up a sorting type<br>example:<br><code>["meta.external_links_count,desc"]</code><br><strong>note that you can set no more than three sorting rules in a single request</strong><br>you should use a comma to separate several sorting rules<br>example:<br><code>["page_timing.dom_complete,asc","size,desc"]</code>

tagstring nullable

<em>user-defined task identifier</em><br>optional field<br><em>the character limit is 255</em><br>you can use this parameter to identify the task and match it with the result<br>you will find the specified <code>tag</code> value in the <code>data</code> object of the response

Example request

[
  {
    "id": "02241700-1535-0216-0000-034137259bc1",
    "url": "https://www.etsy.com/about/jobs.workco2018.js?"
  }
]

Response

Successful operation

versionstring nullable

the current version of the API

status_codeinteger nullable

general status code you can find the full list of the response codes here

status_messagestring nullable

general informational message you can find the full list of general informational messages here

timestring nullable

total execution time, seconds

costnumber double nullable

total tasks cost, USD

tasks_countinteger nullable

the number of tasks in the tasks array

tasks_errorinteger nullable

the number of tasks in the tasks array returned with an error

Changes

    • info

      added subschema #1 subschema #2 to the /////////////////////// response property allOf list for the response status

    • info

      removed subschema #1 subschema #2 from the /////////////////////// response property allOf list for the response status

    • info

      added subschema #1 subschema #2 to the /////////////////////// response property allOf list for the response status

    • info

      removed subschema #1 subschema #2 from the /////////////////////// response property allOf list for the response status