For the complete documentation index, see llms.txt. This page is also available as Markdown.

Jobs & Discovery

Reference for submitting, batching, and collecting async scrape jobs, and for listing endpoints and parameters at runtime.

Section
Endpoints

Requests

POST /v1/async/scrape/{path}, POST /v1/async/scrape/batch/{path}, GET /v1/async/scrape/{request_id}

Discovery

GET /v1/scrapers, OPTIONS /v1/{endpoint}

Async requests

POST /v1/async/scrape/{path}

Submits one async scrape request. {path} is any scrape path with /v1/async/scrape/ in place of /v1/scrape/.

Modes: async

Name
Type
Required
Description

callback_url

string

no

Webhook URL for the finished request. Malformed URLs are rejected with 400

storage

object

no

Delivers the result to a bucket instead of the response

storage.type

string

yes, with storage

s3, s3_gzip, s3_compatible, gcs, or tos. Validated

storage.url

string

yes, with storage

Destination for the result. Validated for s3, s3_gzip, s3_compatible, and tos. Invalid values return 400 before the request is created

All other parameters are those of the endpoint being submitted.

Response – 202 Accepted

Field
Type
Description

state

string

pending

params

object

The request as executed, defaults filled in

metadata.timestamp

integer

Unix timestamp in seconds

metadata.request_id

string

The request ID. Use it to collect the result

POST /v1/async/scrape/batch/{path}

Submits one request per value in a list. {path} is any scrape path that has a batch mode.

Modes: batch

Name
Type
Required
Description

query

array of strings

yes, if the endpoint takes query

Values, one request per value

url

array of strings

yes, if the endpoint takes url

URLs, one request per value

callback_url

string

no

Webhook URL for each finished request

storage

object

no

Bucket delivery for each request. Same fields as above

All other parameters are those of the endpoint being submitted and apply to every request. Use the singular query or url field with an array value. queries and urls are not accepted.

Response – 202 Accepted

Field
Type
Description

data[]

array

One object per accepted request. Omitted when no requests are accepted

errors[]

array

One error object per rejected item. Omitted when no items are rejected

data[].state

string

pending

data[].params

object

The request as executed

data[].metadata.request_id

string

The request ID

There is no batch collection route: collect each request by its request_id. /v1/scrape/batch returns 404.

GET /v1/async/scrape/{request_id}

Returns the state and result of a submitted request. Send metadata.request_id from the submit response as the request_id path parameter.

Response – 200 OK

Field
Type
Description

state

string

pending while the request is queued or running, done when finished

results[]

array

Same shape as the realtime response. Populated when state is done

An unknown or expired request_id returns 404.

Discovery

GET /v1/scrapers

Lists implemented realtime scrape paths for the client.

Response – 200 OK

Field
Type
Description

scrapers

array of strings

Implemented realtime scrape paths available to the client

OPTIONS /v1/{endpoint}

Returns a parameter specification for an endpoint. The response is not an executable request body. It lists accepted parameters, annotated with their type, requirement, allowed values, default, length limits, and description.

OPTIONS /v1/search is not available.

Response (OPTIONS /v1/scrape)

Output format

Each parameter's value: [type] [required or optional] [constraints]. Description.

Token
Meaning

[string], [bool], [int], [json]

Parameter type

[required], [optional]

Whether the parameter must be sent. Not shown on every parameter

[enum: a, b]

Allowed values

[default: x]

Value used when the parameter is omitted

[min_len: n], [max_len: n]

Minimum and maximum length

Arrays shown as a single-element array holding the element's annotation. Nested objects are shown as objects. Async paths also list storage and callback_url.

Last updated

Was this helpful?