Async tasks
Queue a search
A live search with one more parameter. Instead of the results, you get a task id at once.
GET
https://api.scraperdata.com/v1/search?pingback_url=Credits
The credits the search needs are held now and charged when it ends: one per results page that comes back, nothing if it fails.
Request parameters
All parameters of a live search work the same, such as q, gl, location, type and num_pages. This one makes it a queued search:
| Field | Type | Description |
|---|---|---|
pingback_url | string | requiredYour URL to call when the search ends. It must be a public http or https address of up to 2,048 characters, without a user name or password. URL-encode it in the query string (see Pingback).Example: https://example.com/hook |
Response
Status 202 Accepted, with a Location header pointing at the task.
| Field | Type | Description |
|---|---|---|
id | string | The task id. Keep it to read the answer. |
status | string | queued |
created_at | string | When the search was queued, in ISO 8601. |
result_url | string | Where to read the answer: GET /v1/tasks/{id}. |
credits_reserved | integer | Credits held for the search until it ends. |
charged | boolean | false: nothing is charged yet. |
Errors
400 invalid_pingback_url: the URL is not a public http or https address.429 queue_full: 10,000 of your searches are already waiting or running.429 quota_exceeded,spend_limit_reachedandhourly_limit_reachedstill apply.