Skip to main content
POST
Scrape a list of URLs

Overview

/batch/scrape scrapes up to 500 URLs you already have, as one job. Each page is fetched and rendered exactly as GET /scrape would render it, configured through scrape_options. Nothing is followed and no sitemap is read: you get the pages you listed. It works like a crawl: you get an id straight away, then read progress and pages from GET /batch/scrape/{id}, or receive them by webhook. Use it instead of many /scrape calls when you have a list of URLs: one request instead of hundreds, and no concurrency limit to manage on your side.

Example request

Invalid URLs

Every URL gets the checks a single /scrape would. By default one invalid or blocklisted URL rejects the whole batch with a 400 that names it. Set ignore_invalid_urls: true to drop those URLs instead; they are listed in the response’s invalid_urls. Duplicate URLs, including the same page under another spelling (www., a trailing slash), are scraped once.

Webhooks

webhook works as it does for crawls, with events named batch_scrape.started, batch_scrape.page, batch_scrape.completed and batch_scrape.failed. See crawl webhooks for the payload and how to verify the signature. Not available through RapidAPI.

Credits

Submitting is free. You are charged 1 credit per page returned, or 4 when scrape_options asks for summary, json or check_prompt_injection. Pages are billed as they complete — when you poll the status endpoint, or when the batch ends — and failed pages are never charged. To run brand, enrich, company, classify, screenshot or styleguide over a list instead, see POST /batch/{endpoint}.
Over MCP, prefetch_batch_scrape submits the batch and waits for it, returning the pages when it finishes in time.

GET /batch/scrape/{id}

Read progress and pages.

GET /batch/scrape/{id}/errors

Which pages failed, and why.

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