OnPage

‌‌ This endpoint allows parsing the content on any page you specify and will return the structured content of the target page, including link URLs, anchors, headings, and textual content.

post/v3/on_page/content_parsing

Request

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

Request body

urlstring

<em>URL of the content to parse</em><br><strong>required field</strong><br>URL of the page to parse<br>example:<br>https://dataforseo.com/blog/a-versatile-alternative-to-google-trends-exploring-the-power-of-dataforseo-trends-api

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><strong>note:</strong> the <code>enable_content_parsing</code> parameter in the POST request must be set to <code>true</code><br>example:<br><code>"07131248-1535-0216-1000-17384017ad04"</code>

markdown_viewboolean nullable

<em>return page content as markdown</em><br>optional field<br>if set to <code>true</code>, the markdown-formatted content of the page will be returned in the <code>page_as_markdown</code> field of the response;<br>default value: <code>false</code>

Example request

[
  {
    "url": "https://dataforseo.com/blog/a-versatile-alternative-to-google-trends-exploring-the-power-of-dataforseo-trends-api",
    "id": "11161551-1535-0216-0000-500b3f307f92"
  }
]

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

    • breaking

      added to the /////////////////////////////////// response property oneOf list for the response status

    • breaking

      added to the ////////////////////////////// response property oneOf list for the response status

    • info

      removed from the /////////////////////////////////// response property oneOf list for the response status

    • info

      removed from the ////////////////////////////// response property oneOf list for the response status

    • info

      api operation id OnPageContentParsing removed and replaced with ContentParsing