Skip to main content
POST
From 1 credit per page Requires batches:write permission. See the guide for examples and usage.

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <API_KEY>. Keys have full access unless restricted to scopes.

Headers

Idempotency-Key
string

Unique key per submission. Retrying with the same key and body returns the original batch; a different body returns 409.

Maximum string length: 200

Body

application/json

Create an asynchronous scraping job.

input
Scrape · object
required

Scrape a list of up to 100,000 URLs.

webhookUrl
string<uri>

Legacy URL notified when the batch finishes. Preserves one best-effort attempt. Cannot be combined with webhook.

webhook
object

Where to send the batch's final-status event. Omit retry for one attempt; {} uses the default retry schedule.

tags
string[]

Tags stored on the batch. Filter the batch list by them later.

Maximum array length: 20
Required string length: 1 - 50
Example:
policies
string[]

Access policy IDs to apply to every page. A URL must pass every policy.

Example:

Response

Batch stored. Reserved page counts and credits remain zero until background preparation finishes. Read progress and results from GET /batch/{batch_id}.

id
string
required

Batch ID. Poll GET /batch/{batch_id} with it.

Example:

"batch_9f2c8a"

status
enum<string>
required

Current state. pending means waiting for execution capacity or background validation. Capacity-limited batches remain pending until a slot opens. completed, cancelled, and failed are final.

Available options:
pending,
queued,
running,
cancelling,
completed,
cancelled,
failed
mode
enum<string>
required

How pages will be selected.

Available options:
scrape,
crawl
tags
string[]
required

Tags stored on the batch.

Example:
crawl
Crawl controls · object | null
required

How the crawl was configured. Null for scrape batches.

input
object
required

What the submission accepted.

credits
object
required

Credits are reserved after background validation, before scraping starts.

created_at
string
required

When the batch was created.

invalid_urls
object[]
required

Rejected URLs (first 100).

cache_metadata
object
required

Whether this response came from cache.

formats
object
required

Outputs requested for each page. Matches input.data.formats on submission.

Example:
request_id
string<uuid>
required

Unique ID of this request, also in X-Request-Id. Include it when contacting support.

Example:

"3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"

webhook_secret
string

Secret for verifying X-Context-Signature. Only submit returns it, so store it.

key_metadata
object

Credits this request used and your remaining balance.