ScraperData

Async tasks

Task result

Reads a search you queued with a pingback URL: its status while it waits or runs, then its answer.
GEThttps://api.scraperdata.com/v1/tasks/{id}

Credits

Reading a task is free. Answers are kept for 7 days.

Call it when your pingback arrives, with the id it carries. While the search waits or runs the answer is 202 with its status; once it ends it is 200 with the result or the error.

Path parameters

FieldTypeDescription
idstringrequiredThe task id from the 202 answer of a queued search.Example: 5b0f6c2e9a8d...

Status codes

  • 202: the search is queued or running.
  • 200: the search is done (see result) or failed (see error).
  • 404 with task_not_found: no task with this id in your account, or it is older than 7 days.

Response

FieldTypeDescription
idstringThe task id.
statusstringqueued or running while it waits, then done or failed.
created_at, started_at, finished_atstringWhen it was sent, started and ended, in ISO 8601.
credits_chargedintegerCredits it cost: one per page that came back, nothing when it failed.
pingbackobjectThe call to your URL.
urlstringYour pingback URL.
statusstringwaiting for the search, then pending, sent or failed.
attemptsintegerHow many times we called it.
last_status_codeintegerThe status your server answered, 0 when it did not answer.
resultobjectThe answer, the same JSON a live search returns. Only when done.
errorobjectThe reason, with a code and a message. Only when failed.