When to use async
Inline requests (POST /v1/fetch, POST /v1/crawl, etc.) have a maximum execution time of 15 seconds. For operations that take longer — large crawls, multi-step interactions, YouTube crawl jobs — use the Jobs API.
Any surface can be run as an async job by submitting to POST /v1/jobs.
Cloudflare-protected targets
A target site protected by Cloudflare can take well over 15 seconds to resolve — a single bypass attempt can take up to 90 seconds on its own, and may need to be retried. Passing atimeout_ms large enough to realistically clear a Cloudflare challenge will automatically promote the request past the 15-second inline ceiling into an async job, so plan for this as async work rather than expecting an inline response from these targets.
Submitting a job
202 Accepted):
kind values: fetch, crawl, interact, search, map.
Polling for status
Job lifecycle
result_available: true means you can fetch the result. Poll until this is true or the status is failed/cancelled.
Retrieving the result
Onceresult_available is true, fetch the result:
fetch jobs:
Idempotency
Send anIdempotency-Key header to safely retry job submission without creating duplicate jobs:
Idempotency-Key with the same body again, the original job is returned. A different body returns 409 Conflict.
Polling strategy
A reasonable polling interval is 2–5 seconds for short jobs, 15–30 seconds for crawls. Do not poll more than once per second.Result retention
Job results do not currently expire automatically — there is no default retention window, so a completed job’s result stays available via/v1/jobs/{id}/result until you stop needing it. Don’t rely on this as a permanent guarantee; retrieve results you need to keep rather than treating job storage as long-term archival.