Common Patterns
Recipes for frequent tasks.
Batch scraping
Create a session, scrape a list of URLs, delete the session:
Parallel sessions
Run multiple sessions concurrently for throughput:
The workspace limit is 10 concurrent sessions. Stay under that, or queue creations.
Extracting data with evaluate
Setting cookies before navigation
The session arrives with a clean state. If you need pre-set cookies:
Waiting for elements
Session reuse
A session can handle hundreds of navigations within its TTL. Don’t create a new session per page — create one session, navigate many times, delete it when you’re done.