{ data }, and a job comes back as an id you poll — or a webhook that calls you when it’s done.
Scrape: synchronous by default
A scrape waits for the result and returns it inline. You get{ data } with the formats you asked for.
async: true — it returns a job id instead, with a 201:
string
waiting, active, completed, or failed.object
The scraped page, present when
status is completed.string
Set when
status is failed.Set
async: true up front when you know a page is heavy — a JavaScript-rendered app, a long settle time — so your request never blocks waiting for it.Crawl and batch: always async
A crawl (discover and scrape a whole site) and a batch (scrape an explicit list of URLs) always run as background jobs. Starting one returns an id immediately with a201:
- Poll
- Webhook
Request the job’s status endpoint for live progress and per-page results:Batches use
GET /v1/web/batch/{id}. Both return the same status shape:status moves through running to completed (or failed / cancelled). Each entry in pages carries its own status and, once done, its scraped data.Verifying a webhook
Your webhook endpoint is a public URL, so anyone who finds it can POST to it. Set awebhook.secret and we sign every callback, letting you prove a request came from us and reject anything that didn’t.
Each signed delivery carries these headers:
To verify, recompute the HMAC over the raw request body — not a re-serialized version of the parsed JSON, which may produce different bytes and never match:
Which calls return what
Next: Errors
The structured error model and every status you’ll see.