Data API / DataForSEO / On Page
OnPage API Content Parsing
Parses one crawled url into structured content, with markdown_view for a markdown rendering. Reads a finished crawl, so it needs the id from post_dataforseo_on_page_submit and returns crawl_progress plus a crawl_status of max_crawl_pages, pages_in_queue and pages_crawled - check those before trusting a small result, because a crawl still running simply has less to report. The standalone twin post_dataforseo_on_page_content_parsing_live parses any URL without a crawl - prefer that unless the page is already part of one.
Параметры
Параметров пути, запроса и заголовков нет.
Тело запроса
urlstringОбязательныйURL of the content to parse required field URL of the page to parse example: https://dataforseo.com/blog/a-versatile-alternative-to-google-trends-exploring-the-power-of-dataforseo-trends-api
idstringОбязательныйID of the task required field you can get this ID in the response of the Task POST endpoint note: the enable_content_parsing parameter in the POST request must be set to true example: "07131248-1535-0216-1000-17384017ad04"
markdown_viewbooleanНеобязательныйreturn page content as markdown optional field if set to true, the markdown-formatted content of the page will be returned in the page_as_markdown field of the response; default value: false
Пример запроса
curl -X POST "https://openapi.felo.ai/v1/beta/dataforseo/on_page/content_parsing" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "<string>",
"id": "<string>",
"markdown_view": false
}'Ответ
Поля ответа
versionstringНеобязательныйthe current version of the API
status_codeintegerНеобязательныйgeneral status code you can find the full list of the response codes here Note: we strongly recommend designing a necessary system for handling related exceptional or error conditions
status_messagestringНеобязательныйgeneral informational message you can find the full list of general informational messages here
timestringНеобязательныйexecution time, seconds
costnumberНеобязательныйtotal tasks cost, USD
tasks_countintegerНеобязательныйthe number of tasks in the tasks array
tasks_errorintegerНеобязательныйthe number of tasks in the tasks array returned with an error
tasksstring[]Необязательныйarray of tasks
idstringНеобязательныйtask identifier unique task identifier in our system in the UUID format
status_codeintegerНеобязательныйstatus code of the task generated by DataForSEO; can be within the following range: 10000-60000 you can find the full list of the response codes here
status_messagestringНеобязательныйinformational message of the task you can find the full list of general informational messages here
timestringНеобязательныйexecution time, seconds
costnumberНеобязательныйcost of the task, USD
result_countintegerНеобязательныйnumber of elements in the result array
pathstring[]НеобязательныйURL path
dataobjectНеобязательныйcontains the same parameters that you specified in the POST request
resultstring[]Необязательныйarray of results
crawl_progressstringНеобязательныйstatus of the crawling session possible values: in_progress, finished
crawl_statusobjectНеобязательныйdetails of the crawling session
items_countintegerНеобязательныйnumber of items in the results array
itemsstring[]Необязательныйitems array
typestringНеобязательныйtype of the returned item = ‘сontent_parsing_element’
fetch_timestringНеобязательныйdate and time when the content was fethced example: "2022-11-01 10:02:52 +00:00"
status_codeintegerНеобязательныйstatus code of the page
page_contentobjectНеобязательныйparsed content of the page
headerobjectНеобязательныйparsed content of the header
primary_contentstring[]Необязательныйprimary content on the page you can find more information about content priority calculation in this help center article
textstringНеобязательныйcontent text
urlstringНеобязательныйpage URL displayed in case the text is a link anchor
urlsstring[]Необязательныйcontains other URLs and anchors found in the content element
urlstringНеобязательныйother URL found in the content element
anchor_textstringНеобязательныйtext of the URL’s anchor
secondary_contentstring[]Необязательныйsecondary content on the page you can find more information about content priority calculation in this help center article
textstringНеобязательныйcontent text
urlstringНеобязательныйpage URL displayed in case the text is a link anchor
urlsstring[]Необязательныйcontains other URLs and anchors found in the content element
urlstringНеобязательныйother URL found in the content element
anchor_textstringНеобязательныйtext of the URL’s anchor
table_contentstring[]Необязательныйcontent of the table on the page
headerstring[]Необязательныйcontent of the header of the table
row_cellsstring[]Необязательныйcontent of the row cells of the header
textstringНеобязательныйtext in the row cell
urlsstring[]Необязательныйcontains other URLs and anchors found in the cell
urlstringНеобязательныйURL found in the cell
anchor_textstringНеобязательныйtext of the URL’s anchor
is_headerbooleanНеобязательныйindicates if the text belongs to the header
bodystring[]Необязательныйcontent of the body of the table
row_cellsstring[]Необязательныйcontent of the row cells of the header
textstringНеобязательныйtext in the row cell
urlsstring[]Необязательныйcontains other URLs and anchors found in the cell
urlstringНеобязательныйURL found in the cell
anchor_textstringНеобязательныйtext of the URL’s anchor
is_headerbooleanНеобязательныйindicates if the text belongs to the header
footerstring[]Необязательныйcontent of the footer of the table
row_cellsstring[]Необязательныйcontent of the row cells of the header
textstringНеобязательныйtext in the row cell
urlsstring[]Необязательныйcontains other URLs and anchors found in the cell
urlstringНеобязательныйURL found in the cell
anchor_textstringНеобязательныйtext of the URL’s anchor
is_headerbooleanНеобязательныйindicates if the text belongs to the header
footerobjectНеобязательныйparsed content of the footer
main_topicstring[]Необязательныйmain topic on the page you can find more information about topic priority calculation in this help center article
h_titlestringНеобязательныйmeta title
main_titlestringНеобязательныйmain title of the block
authorstringНеобязательныйcontent author name
languagestringНеобязательныйcontent language
levelstringНеобязательныйHTML level
primary_contentstring[]Необязательныйprimary content on the page you can find more information about content priority calculation in this help center article
textstringНеобязательныйcontent text
urlstringНеобязательныйpage URL displayed in case the text is a link anchor
urlsstring[]Необязательныйcontains other URLs and anchors found in the content element
urlstringНеобязательныйother URL found in the content element
anchor_textstringНеобязательныйtext of the URL’s anchor
secondary_contentstring[]Необязательныйsecondary content on the page you can find more information about content priority calculation in this help center article
secondary_topicstring[]Необязательныйsecondary topic on the page you can find more information about topic priority calculation in this help center article
h_titlestringНеобязательныйmeta title
main_titlestringНеобязательныйmain title of the block
authorstringНеобязательныйcontent author name
languagestringНеобязательныйcontent language
levelstringНеобязательныйHTML level
primary_contentstring[]Необязательныйprimary content on the page you can find more information about content priority calculation in this help center article
textstringНеобязательныйcontent text
urlstringНеобязательныйpage URL displayed in case the text is a link anchor
urlsstring[]Необязательныйcontains other URLs and anchors found in the content element
urlstringНеобязательныйother URL found in the content element
anchor_textstringНеобязательныйtext of the URL’s anchor
secondary_contentstring[]Необязательныйsecondary content on the page you can find more information about content priority calculation in this help center article
ratingsstring[]Необязательныйcontains objects with rating information for the products displayed on the page
namestringНеобязательныйrating name Note: this field is not used in this particular object, and its value is always set to null
rating_valueintegerНеобязательныйthe value of the rating
max_rating_valueintegerНеобязательныйmaximum value for the rating
rating_countintegerНеобязательныйthe amount of feedback
relative_ratingnumberНеобязательныйrelative rating can take values from 0 to 1
offersstring[]Необязательныйarray of products displayed on the page contains objects with information on products displayed on the page
namestringНеобязательныйname of the product
priceintegerНеобязательныйprice of the product
price_currencystringНеобязательныйprice currency
price_valid_untilintegerНеобязательныйdisplays the date and time until which the price is valid in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00” example: "2022-11-01 10:02:52 +00:00"
commentsstring[]Необязательныйarray of comments displayed on the page contains objects with information on comments related to displayed products
ratingobjectНеобязательныйproduct’s rating contains information about the rating a customer has given to the product
namestringНеобязательныйrating name Note: this field is not used in this particular object, and its value is always null
rating_valueintegerНеобязательныйthe value of the rating
max_rating_valueintegerНеобязательныйmaximum value for the rating
rating_countintegerНеобязательныйthe amount of feedback Note: this field is not used in this particular object, and its value is always null
relative ratingnumberНеобязательныйrelative rating can take values from 0 to 1
titlestringНеобязательныйtitle of the customer’s comment
publish_datestringНеобязательныйdate when the comment was published
authorstringНеобязательныйauthor of the comment
primary_contentstring[]Необязательныйprimary content on the page you can find more information about content priority calculation in this help center article
textstringНеобязательныйtext of the comment
urlstringНеобязательныйdisplayed in case the text is a link anchor
urlsstring[]Необязательныйcontains other URLs and anchors found in the content element
contactsobjectНеобязательныйcontact information contains contact information displayed on the page
telephonesstring[]Необязательныйarray of telephone numbers
emailsstring[]Необязательныйarray of emails
page_as_markdownstringНеобязательныйpage content in the markdown format page content in the text-to-HTML markdown format specify markdown_view as true in the request to return the value