Open Browser

This endpoint allows you to open a browser with advanced configurations, including custom browser arguments, custom proxy settings, and more.

POST /api/v1/Browser/Open

Parameter
Type
Description

args

string[]

A list of custom browser arguments. If null, default arguments will be used.

ignoredDefaultArgs

string[]

A list of default arguments to ignore. If null, default ignored arguments will be used.

headless

bool

Indicates whether the browser should open in headless mode (true) or with a graphical interface (false). Default is false.

stealth

bool

Enables or disables stealth mode. Default is true.

browser

number

0 – Chrome

2 – Chromium

3 – ChromeHeadlessShell Default is 0

keepOpen

number

Seconds of inactivity before the browser automatically closes. The value 0 is never, default is 300 seconds.

proxy

BrowserOptionsProxy

Custom proxy configuration. If not specified, the service will use an automatically assigned proxy.

label

string

Specifies the instance name, useful for recognizing it in the list of open remote desktops.

saveSession

bool

If true, the browser session is saved periodically and at the end, cookies and local storage, but not the open tabs. Default is false.

recoverSession

bool

If true, the label is loaded when starting a previous session (in case it exists), to know which session we saved/restored. Default is false.

Request Example:

curl -X POST https://production.cloudbrowser.ai/api/v1/Browser/Open \
-H "Authorization: Bearer <your-api-token>" \
-d '{
  "Args": ["--no-sandbox", "--disable-gpu"],
  "IgnoredDefaultArgs": ["--enable-automation"],
  "Headless": true,
  "Stealth": true,
  "Browser": 2,
  "KeepOpen": 60,
  "Proxy": {
      "Host": "my-proxy.com",
      "Port": "8080",
      "Username": "user",
      "Password": "password"
  },
  "Label": "app-worker01",
  "saveSession": true,
  "recoverSession": true
}'

Response:

{
  "address": "browserprovider-worker-*.cloudbrowser.ai/devtools/browser/*",
  "status": 200
}

HTTP response:

  • 200 – Success: The browser was successfully opened.

  • 401 – AuthorizationError: Incorrect token.

  • 402 – NoSubscription: No active subscription.

  • 403 – NoUnits: All units have been consumed. This can be avoided by enabling additional units in the web settings.

  • 404 – BrowserLimit: Your subscription does not allow opening more browsers in parallel.

  • 0 – Unknown: Unexpected error.

Last updated