Connect API
Connect or create a Session on-the-fly.
The Connect API is available both as:
- a WebSocket endpoint:
wss://connect.browserbase.com
- an HTTP endpoint:
http://connect.browserbase.com/webdriver
Puppeteer and Playwright connect over the WebSocket API while Selenium relies on the HTTP API.
Puppeteer and Playwright: Connect over WebSocket
Authentication
The Connect WebSocket API authentication relies on the apiKey
query parameter
as follows:
Available query parameters
On top of the apiKey
query parameter, the wss://connect.browserbase.com
endpoints offers the following optional parameters:
You can pass the ID of an already created Session.
Enable proxy by passing &enableProxy=true
. Learn more about
Proxying.
Selenium: Connect over HTTP
Custom HTTP Agent and Authentication
Selenium Node.js and Python do not yet support connecting over a WebSocket.
Instead, you’ll need a provide a custom HTTP Agent that provide the required
authentication header (x-bb-api-key
) to connect to the
http://connect.browserbase.com/webdriver
endpoint as follows:
Available headers parameters
The Session ID created via the HTTP API.
Enable proxy by passing the enable-proxy
header. Learn more about
Proxying.
Was this page helpful?