POST/v2/batch/scrape

Requires an API key.

Parameters

Idempotency-Keyheader, string

A unique key, such as a UUID, to safely retry the request. Valid for 24 hours.

at most 255 characters, pattern ^[\x21-\x7e]+$

Request body

application/json, required, type BatchScrapeRequest

ignoreInvalidURLsboolean

Skip invalid URLs instead of rejecting the request.

Default true

requestOptionsRequestOptions

Options for the requests sent to the URLs.

1 field inside requestOptions
headersarray of RequestHeader or null

Headers to send, in this order and exactly as written. Omit to use the defaults. Redirect hops also carry the cookies the site sets. With headers, redirects to another site are not followed.

2 fields inside headers
namestringrequired

The header name.

at least 1 characters

valuestringrequired

The header value.

responseOptionsResponseOptions

Options for the content returned for each URL.

2 fields inside responseOptions
formatstring

The format to return the page in.

One of html, markdown

Default html

onlyMainContentboolean

Return only the page's main content, without navigation, headers and footers.

Default false

urlsarray of string or nullrequired

The URLs to scrape.

at least 1 items

webhookWebhook

Get notified as the batch scrape progresses.

5 fields inside webhook
eventsarray of string or null

Events to send. Defaults to all.

One of start, finish

at least 1 items

headersmap of string

Headers to include with each event.

metadatamap of string

Custom data included with each event.

secretstring

A secret to sign each event with, sent in the X-Webhook-Signature header.

urlstringrequired

The endpoint that receives events. Failed deliveries are retried.

at least 1 characters, at most 2048 characters

Responses

OK

Headers

Idempotent-Replayedstring

true when the response replays an earlier request with the same key.

One of true

Type BatchScrapeResponse

idstringrequired

The batch scrape ID.

invalidURLsarray of stringrequired

URLs skipped as invalid.

successbooleanrequired

Always true.

One of true

urlstringrequired

The URL to check the batch scrape status.