scrape() with an array of URLs and a concurrency setting. Reader handles the parallelism, browser pool checkout, error tracking, and result aggregation.
Minimal example
batchConcurrency: 2 means Reader processes two URLs in parallel. With the default browser pool of size: 2, that fully utilizes both browsers. If you want more parallelism, increase both size and batchConcurrency together.
Progress tracking
Pass anonProgress callback to get updates as URLs complete:
setImmediate or a small async queue.
Tuning concurrency
The optimalbatchConcurrency depends on:
- Browser pool size - you can’t scrape more URLs in parallel than you have browsers
- Target site rate limits - hammering a single domain from multiple parallel requests will get you rate-limited
- Memory - each concurrent request uses a browser instance (300-500 MB)
| Scenario | Pool size | Concurrency |
|---|---|---|
| Dev, small scripts | 2 | 2 |
| Scraping many domains | 5 | 5 |
| Scraping one domain with rate limits | 5 | 1-2 |
| Large batch across many domains | 10 | 8-10 |
Handling partial failures
Batch scrapes never throw on individual URL failures. The result’sbatchMetadata.errors array lists the failed URLs:
result.data.length matches successfulUrls, not the input length. If you need to track which input URL corresponds to which output, use a map:
Batch timeout
ThebatchTimeoutMs option sets a total time budget for the entire batch:
Where to go next
Browser Pool
Understand how pool size interacts with concurrency.
Proxy Configuration
Rotate proxies across batch requests.

