What is the Session API?
The Session API gives you full, programmatic control over managed Chrome sessions:- Create/stop sessions on demand
- Retrieve a CDP URL to drive the browser with Playwright, Puppeteer, or any CDP-compatible tool
- Integrate browser sessions into backends, workflows, and automations
Prerequisites
- A Browser API key (from the Dashboard)
- Any HTTP client (curl/fetch) or Node.js 18+ if using the TypeScript SDK
Option 1 — TypeScript SDK
You can install our SDK from NPM with:create():
nodeId to create(). If the node is offline, your request will fail.
Option 2 — REST API
You can call the REST endpoints directly if you prefer no SDK.1) Create a session
2) Get the CDP URL
Once the session request returns, thecdpUrl field in the response will be populated.
Use that CDP URL with Playwright/Puppeteer, or any other tool that supports CDP connections.
3) Stop the session
Once you’re done with the session, be sure to stop it to avoid unnecessary billing:Notes
- Sessions may take up to 20 seconds to start
- CDP URLs expire with the session; create a new session to get a fresh URL
- For long-running automations, reconnect your client if the network blips — the remote browser keeps running until you stop it, up to one hour
- Session entries may be deleted at any time after completion.
See also
- Quickconnect (zero-config CDP): Using Quickconnect