The Browserbase platform supports running browsers in multiple geographic regions. Running browser sessions in or near your region will confer substantial performance gains.

You can can specify a browser region using the region parameter in the Sessions API.

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.

Was this page helpful?