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:

curl --request POST \
  --url 'https://api.browserbase.com/v1/sessions' \
  --header 'Content-Type: application/json' \
  --header "X-BB-API-Key: $BROWSERBASE_API_KEY" \
  --data '{
    "projectId": "'"$BROWSERBASE_PROJECT_ID"'",
    "region": "us-east-1"
  }'

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:

RegionGeographyConnect URL
us-west-2Oregonwss://connect.usw2.browserbase.com
us-east-1Virginiawss://connect.use1.browserbase.com
eu-central-1Frankfurtwss://connect.euc1.browserbase.com
ap-southeast-1Singaporewss://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.