batchId back immediately, then poll it or register a webhook to collect the results. One credit per URL scraped.
Batch vs. crawl
Batch
You provide the URLs. No discovery. Best when you already know exactly which pages you want.
Crawl
Hydrafetch discovers the URLs from a starting page. Best when you want a whole site or section.
When to use
- You have a known set of URLs (from your own database, a sitemap, or a Map call) and want them all scraped in one job.
- You want the same scrape options applied uniformly across every URL.
Example request
Send aPOST to /v1/web/batch with urls and, optionally, shared scrapeOptions.
Example response
The batch is accepted right away:Request options
string[]
required
The explicit list of URLs to scrape. Each must be
http(s). 1–1000 URLs.object
How to scrape each URL —
formats, onlyMainContent, includeTags, excludeTags, removeBase64Images, blockAds, renderJs, waitFor, timeout, location, headers, preferStructure, maxAge. Same options as a single Scrape, with per-page formats limited to markdown, html, rawHtml, links, and structured.object
Register a callback instead of polling.
webhook.url receives progress and completion events; webhook.headers are extra headers sent with each callback (e.g. for authentication).Poll for results
PollGET /v1/web/batch/{id} for progress and per-URL results. The response shares the same shape as a crawl status, with kind set to batch.
Response fields
string
The batch id.
string
batch for a batch job.string
Overall job state:
running, completed, failed, or cancelled.string
null for a batch — there is no starting URL to discover from.number
Total URLs in this job.
number
URLs scraped so far.
number
URLs that failed.
number
Credits consumed so far. One per scraped URL.
object[]
Per-URL results, each with
url, status (queued, running, completed, failed), depth, error, and data (the scraped page, once completed).A batch costs one credit per URL scraped, reflected in
creditsUsed. Failed URLs do not consume a credit — you are only charged on success.Next steps
Batch API reference
Full request and response schema with a live playground.
Crawl a whole site
When you want us to discover the URLs.
Map a site
Enumerate a site’s URLs to feed into a batch.
Scrape one URL
The per-page primitive behind a batch.