Data API / DataForSEO / On Page
OnPage API Raw HTML
The stored HTML of one crawled url. 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. ⚠️ Only available if the crawl was submitted with store_raw_html set - otherwise there is nothing to return, and the crawl cannot be amended after the fact. For parsed content rather than source use post_dataforseo_on_page_content_parsing. 💰 Free upstream: querying a finished crawl costs nothing, only the crawl itself does.
Параметры
Параметров пути, запроса и заголовков нет.
Тело запроса
idstringОбязательныйID of the task required field you can get this ID in the response of the Task POST endpoint example: “07131248-1535-0216-1000-17384017ad04”
urlstringНеобязательныйpage url required field the absolute URL of a page to request HTML Note: this field is optional if the task was set using the Instant Pages endpoint
Пример запроса
curl -X POST "https://openapi.felo.ai/v1/beta/dataforseo/on_page/raw_html" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "<string>",
"url": "<string>"
}'Ответ
Поля ответа
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
max_crawl_pagesintegerНеобязательныйmaximum number of pages to crawl indicates the max_crawl_pages limit you specified when setting a task
pages_in_queueintegerНеобязательныйnumber of pages that are currently in the crawling queue
pages_crawledintegerНеобязательныйnumber of crawled pages
items_countintegerНеобязательныйnumber of items in the results array
itemsobjectНеобязательныйitems object
htmlstringНеобязательныйHTML page