Runs and polling
Runs cost credits and can take minutes. The API handles them in two ways depending on the service.
Synchronous: scraping_run, scraping_start and crawling_run do the work within the request and can take more than two minutes. Use a long timeout and do not retry automatically: repeating after a timeout charges twice.
Queued: scraping groups, video analysis and searches respond 202 right away. Poll the status on the main host every few seconds until it reaches a terminal status.
| Status | Terminal | Meaning |
|---|---|---|
| created | No | Queued. |
| running | No | Running. |
| completed | Yes | Finished successfully. |
| partial | Yes | Part succeeded and part did not. What succeeded is already charged. |
| error | Yes | Returned no data. The reason is in error. |
| blocked_no_credits | Yes | Stopped for lack of credits. |