Skip to main content
POST
Run an endpoint on many URLs
Starts a batch of one endpoint and returns 202 with a job id. Read results with GET /batch/{endpoint}/{id}. Free to submit. Each URL answered costs what one call of that endpoint costs. Failed requests are never charged.

Guide: Batches

Options, results, webhooks, credits and examples.

Authorizations

X-API-Key
string
header
required

Your Prefetch API key. Obtain one from the dashboard.

Path Parameters

endpoint
enum<string>
required

What every URL is run through. /batch/scrape has its own page.

Available options:
brand,
enrich,
company,
classify,
screenshot,
styleguide
Example:

"enrich"

Body

application/json
urls
string[]
required

The URLs or bare domains to run (1–500). Duplicates run once. domains is accepted too.

Example:
options
object

The endpoint's own parameters, as GET /{endpoint} takes them, applied to every URL — e.g. {"design_tokens": true} for brand or enrich, {"device": "iphone_15"} for screenshot. Typed JSON or strings.

Example:
concurrency
integer

URLs run in parallel (1–5). Default: 2. Batches of brand, enrich, screenshot and styleguide run at most 3 at a time, and default to 3.

ignore_invalid_urls
boolean

Drop URLs that fail validation (listed in invalid_urls) instead of rejecting the whole batch. Default: false.

webhook

Where to send progress. Each delivery is signed — X-Prefetch-Signature: t=<unix>,v1=<hex>, HMAC-SHA256 of <t>.<raw body> with the secret returned when the job is created — the same scheme as monitor webhooks.

Response

Batch queued.

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required