Durable workflows · v1
Run work that outlives one HTTP request
Use durable jobs when a capture is explicitly async, when rich output is too large for an inline response, or when you need a batch, crawl, callback, retry, and cancellation boundary. Every durable submission returns a job ID and polling URL.
Accepted first
POST returns 202 with accepted/pending state and pollUrl.
Safe retries
Idempotency-Key replays identical durable submissions without duplicate work.
Cooperative stop
Cancel unstarted work; a browser already running may finish cleanly.
01 · Captures
Make a single capture durable
Set async: true on POST /screenshot to force worker execution. You should also handle automatic 202 responses: large rich JSON, multiple whole-DOM passes, or slow combinations such as rich analysis plus fullPage can be promoted even without the flag.
Accepted shape
The response includes status, jobId, pollUrl, and possibly autoPromoted or metadata.autoPromotedAsync. The completed job contains result, an error object, safe timing, a result summary, and counts. It does not promise saved-capture retention or artifact descriptors.
02 · Batch
Submit up to 100 independent captures
A batch is a parent job with one child job per request. Each item may use a URL or inline HTML and the normal screenshot options, but async, save, callbackUrl, and callbackSecret belong to the parent and are rejected inside an item.
Parent status
GET /batch/{jobId} returns aggregate counts and completed child items. Each item has status, URL/canonical URL, depth, timestamps, error, and resultSummary.
Quota timing
Creating the parent is not a page capture. A child consumes normal capture quota only when it is about to start browser work.
Reserved fieldsFields beginning with _ are reserved for orchestration and rejected. Every child is checked against the same plan and entitlement gates as direct captures; batch cannot bypass a capability gate.
03 · Crawl
Crawl a bounded site frontier
Crawls create one queued child per discovered page. They require seedUrl and a non-empty list of HTTPS allowedOrigins. The seed and every discovered URL must pass the service SSRF guard and the explicit allowlist.
Plan access for workflows.The cleanup shown in this template is available on Pro+; crawls are Business+. A 403 FEATURE_NOT_ENABLED with a platform reason means the operator has temporarily paused this product group for everyone.
Discovery
Fragments are removed, URLs are canonicalized, and include/exclude patterns bound the frontier.
Robots
robots.txt is always respected. Sending respectRobots: false is rejected; there is no bypass.
Usage & completion
Each started child follows the normal included-quota → prepaid-credit → permitted-overage waterfall. There is no crawl-only quota; the parent terminalizes promptly once all created children are terminal.
Crawl patterns are bounded for safety. Catastrophic backtracking patterns such as nested quantifiers, overlapping repeated alternatives, or more than 40 quantifiers are rejected; a CPU budget can also stop admitting remaining candidates and report patternWarning.
04 · Poll
Poll, read metadata, and cancel
The metadata endpoint returns state, timing breakdowns, result summaries, and aggregate counts without echoing job input. It does not expose S3 keys or promise saved-artifact metadata. Use GET /capture/{captureId} with the owning account's API key for a retained saved capture's finite expiry or legacy permanent state and short-lived signed downloads. That route has no separate S3-key field, but its URL can contain storage-path information and is a secret capability. Cancelling an already-terminal owned job returns safe terminal metadata; unknown or foreign jobs return 404.
05 · Delivery
Receive signed callbacks and replay them safely
Batch and crawl requests may supply a public HTTPS callbackUrl. Legacy per-job callbacks remain supported. Callback destinations must pass private-address, metadata-address, DNS, and redirect checks at admission and delivery.
Verify exactly
Use the exact received payload and the timestamp header verbatim. Sign the string timestamp + "." + JSON_PAYLOAD with the configured HMAC secret, then compare safely.
Retries and replay
Durable deliveries retry at 1, 5, 15, and 60 minutes. POST /webhooks/deliveries/{deliveryId}/replay requeues the stored signed payload without launching Chromium.
06 · Retention & billing
Know what persists and what costs quota
Only capture-producing work consumes quota: direct captures, started batch children, and started crawl children. A crawl child uses the same included-quota → prepaid-credit → permitted-overage waterfall as a direct capture; it has no separate crawl quota. Job reads, metadata reads, cancellation, webhook replay, GET /credits, and POST /feedback are control-plane operations. Credits and plans are separate: credits pay for captures but do not unlock plan capabilities.
07 · Recover