Skip to main content
POST
Run an endpoint on many URLs

Overview

/batch/{endpoint} runs one endpoint over a list of URLs or bare domains — up to 500 — as a single job: You get a job id straight away. Each URL is answered exactly as a single call would answer it — curated data first, then a live extraction — and results are read from GET /batch/{endpoint}/{id}, or delivered to your webhook as each URL finishes. One request instead of hundreds, and no concurrency limit to manage on your side. To scrape a list of pages into markdown, use POST /batch/scrape.

Example requests

Example response

Options

options are the endpoint’s own parameters, as GET /{endpoint} takes them, applied to every URL — snake_case or camelCase, typed JSON or strings: They are checked before anything is queued: an invalid option is a 400 naming it. Also: concurrency (URLs in parallel, 1–5, default 2), ignore_invalid_urls (drop malformed or blocklisted URLs, listed in invalid_urls, instead of rejecting the batch), and webhook. Duplicates — including the same site under another spelling — run once.

Webhooks

webhook works as it does for crawls, with events named for the endpoint: batch_enrich.started, batch_enrich.page (one per URL, carrying its result), batch_enrich.completed and batch_enrich.failed. Each delivery is signed with the secret returned when the batch is created. Webhooks are not available through RapidAPI: poll the status endpoint instead.

Credits

Submitting is free. Each URL answered costs what one call of that endpoint costs — 12 for enrich, 10 for brand or styleguide, 5 for company or classify, 1 for screenshot — charged as URLs complete: when you poll the status endpoint, or when the batch ends, whichever comes first, and never twice. URLs that fail are never charged. A batch your key cannot pay for is refused up front with CREDITS_EXHAUSTED, and the message says how many URLs fit: a 500-domain /batch/enrich can cost up to 6,000 credits.

GET /batch/{endpoint}/{id}

Read progress and results.

POST /batch/scrape

A list of pages as markdown.

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.

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