Multi-Region
Use Browserbase in your region.
The Browserbase platform supports running browsers in multiple geographic regions. Running browser sessions in or near your region will confer substantial performance gains.
Using the API, there are two ways to create multi-region sessions: explicitly using the Sessions API, or implicitly using the Connect API.
Explicit Invocation
Explicit session creation allows you to decouple session creation and connection. This supports many use cases such as those involving parallelizing jobs or ones requiring long running sessions. It also supports customizing sessions settings.
To create a session in a specific region, use the Sessions API. Specify your desired region by setting the
region
value in the request payload:
Available regions: us-west-2
(Oregon), us-east-1
(Virginia),
eu-central-1
(Frankfurt), and ap-southeast-1
(Singapore). All sessions are
created in us-west-2
by default.
Then, use the connectUrl
returned in the response payload to connect to the session. The URL contains an encrypted payload
that’s used to authenticate your session.
For Selenium, seleniumRemoteUrl
provides the HTTP multi-region endpoint used
to connect. Include the signingKey
data in your x-bb-signing-key
request
header.
Implicit Invocation
You can also create new session on the fly by invoking the Connect API directly using your API key for authentication. In this case you indicate your region with the connect URL you use:
Region | Geography | Connect URL |
---|---|---|
us-west-2 | Oregon | wss://connect.usw2.browserbase.com |
us-east-1 | Virginia | wss://connect.use1.browserbase.com |
eu-central-1 | Frankfurt | wss://connect.euc1.browserbase.com |
ap-southeast-1 | Singapore | wss://connect.apse1.browserbase.com |
Connecting with wss://connect.browserbase.com
will default to us-west-2
.
For Selenium, append /webdriver
to your HTTP connect URL. For example, for
Singapore use http://connect.apse1.browserbase.com/webdriver
.
Was this page helpful?