For AI agents: a documentation index is available at /llms.txt
Skip to main content

Run Concurrent Browser Sessions

Launch multiple browser sessions in parallel to speed up large-scale scraping, testing, or automation. Each session runs independently on Browserless infrastructure.

Prerequisites
  • A Browserless API token from your account dashboard
  • A Browserless plan that supports the concurrency level you need

Steps

Each REST request opens an independent browser session on Browserless. Fire them concurrently using your language's async primitives. No WebSocket connection needed.

View Full Code on GitHub

1. Send requests in parallel

Each REST API call opens an independent browser session. Run them concurrently with &:

curl -s -X POST \
"https://production-sfo.browserless.io/screenshot?token=YOUR_API_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/page/1", "options": { "type": "png", "fullPage": true } }' \
--output page-1.png &

curl -s -X POST \
"https://production-sfo.browserless.io/screenshot?token=YOUR_API_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/page/2", "options": { "type": "png", "fullPage": true } }' \
--output page-2.png &

curl -s -X POST \
"https://production-sfo.browserless.io/screenshot?token=YOUR_API_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/page/3", "options": { "type": "png", "fullPage": true } }' \
--output page-3.png &

wait
echo "All screenshots saved"

2. Check the output

All three screenshots are captured simultaneously. Total time is roughly the duration of the slowest single request.

Tips

  • Concurrency limits — your plan determines how many sessions can run simultaneously. Requests beyond that limit queue automatically.
  • Reuse a saved profile — add &profile=my-profile to the WebSocket URL to start every concurrent session pre-authenticated. See Save Logins to Authenticated Profiles.
  • Rate limiting — add a concurrency cap in your own code (e.g. p-limit in Node.js) to avoid overwhelming the target site.

Next steps