Skip to content

SDK

The SDKs wrap the REST API, so a program can manage browsers without making raw HTTP calls.

Every SDK is configured through two environment variables:

  • REMOTEBROWSER_API_KEY: an API key from the workspace page (see API keys)
  • REMOTEBROWSER_URL: the URL of the Remote Browser server

Node.js

Requires Node.js 22 or later.

npm install @remotebrowser/sdk
import RemoteBrowser from '@remotebrowser/sdk';

const client = new RemoteBrowser();
const { browser_id } = await client.browsers.create({ browser: 'chrome' });
const cdpUrl = client.browsers.connectUrl(browser_id);

The CDP URL needs the API key in the Authorization: Bearer header. Pass client.authHeaders as the headers when you connect, for example with Playwright's connectOverCDP.

To try it quickly from the command line:

npx @remotebrowser/sdk create --browser chrome

See the repository for the full API, the command-line tool, error handling, and retries.

Python

Requires Python 3.11 or later.

pip install remotebrowser    # with pip
uv add remotebrowser         # with uv
from remotebrowser import RemoteBrowser

client = RemoteBrowser()
browser_id = client.browsers.create(browser="chrome")["browser_id"]
cdp_url = client.browsers.connect_url(browser_id)

The CDP URL needs the API key in the Authorization: Bearer header. Pass client.auth_headers as the headers when you connect, for example with Playwright's connect_over_cdp.

To try it quickly from the command line:

pipx run remotebrowser create --browser chrome    # with pipx
uvx remotebrowser create --browser chrome         # with uv

See the repository for the full API, the command-line tool, error handling, and retries.