Skip to main content
POST
Scrape a list of URLs
Starts a batch scrape and returns 202 with a job id. Read the pages with GET /batch/scrape/{id}. Free to submit. 1 credit per page returned, 4 with summary, json or check_prompt_injection. 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.

Body

application/json
urls
string[]
required

The pages to scrape (1–500). Duplicates are scraped once.

Required array length: 1 - 500 elements
Example:
concurrency
integer
default:2

Pages fetched in parallel.

Required range: 1 <= x <= 5
ignore_invalid_urls
boolean
default:false

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

webhook

Where to send progress: an https URL, or an object. Events: batch_scrape.started, batch_scrape.page (one per page), batch_scrape.completed, batch_scrape.failed. Each delivery is signed — X-Prefetch-Signature: t=<unix>,v1=<hex>, HMAC-SHA256 of <t>.<raw body> with the secret returned when the batch is created — the same scheme as monitor webhooks.

Example:

"https://example.com/hooks/prefetch"

scrape_options
object

How each crawled page is fetched and rendered. The same options GET /scrape takes.

Response

Batch queued.

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