cdpfleet Docs GitHub Dashboard

Stealth-patched Chromium

Patchright

Chromium launched with Patchright's anti-detection patches (leaner automation flags, no Runtime.enable leak). The patches apply on our side, so connect with ordinary Playwright.

Launch
POST https://starter.cdpfleet.com/patchright/session
Connect
chromium.connect(wsUrl, { headers: { 'x-api-key': KEY } })
Playwright client
1.60.x
Versions now
release1.60.2
Required
proxy

Example

// npm install [email protected]
// Browsers run on cdpfleet, so no `npx playwright install` is needed.
import { chromium } from 'playwright';

const KEY = process.env.CDPFLEET_API_KEY;

// 1. Launch the browser
const res = await fetch('https://starter.cdpfleet.com/patchright/session', {
  method: 'POST',
  headers: { 'x-api-key': KEY, 'content-type': 'application/json' },
  body: JSON.stringify({
    proxy: 'http://user:[email protected]:8080',
    headless: 'new',
  }),
});
if (!res.ok) throw new Error(`launch failed: ${res.status} ${await res.text()}`);
const { wsUrl } = await res.json();

// 2. Connect and drive it
const browser = await chromium.connect(wsUrl, { headers: { 'x-api-key': KEY } });
const page = await browser.newPage();
await page.goto('https://example.com');
console.log(await page.title());
await browser.close(); // ends the session and stops billing

Want different options or a specific version? Open this browser in the code builder.

Launch options

Send these as the JSON body of the launch request. Everything is optional except proxy; unknown fields are ignored. Context options such as viewport, user agent or cookies are set client-side after connecting (browser.newContext({...})).

OptionTypeDefaultWhat it does
proxystring | object | arraynone — required

A proxy URL (http://user:pass@host:port, https://…, socks5://user:pass@host:port; no scheme means http://), an object { "server": "http://host:port", "username": "…", "password": "…" }, or a list of proxies used round-robin as a pool. SOCKS5 with authentication works on every browser.

Required for every session: a launch without a proxy returns 400 proxy_required, so your sessions never browse from our servers' own IPs. An unparseable proxy returns 400.

Example: "http://user:[email protected]:8080"
proxy_rulesarraynone

A list of { "name": "…", "hosts": [...], "proxy": "…" | [...] } rules. Requests to a host matching a rule use that rule's proxy (round-robin when it is a list); every other host uses proxy. Host patterns support * wildcards, e.g. *.cdn.example.com or static.*. The optional name (up to 64 characters) labels the rule's traffic on your dashboard's Proxy traffic page and in its CSV export.

Needs proxy to be set as the default route. Rules route through a proxy only; routing a host with no proxy (direct from our servers) is not available. The first matching rule wins — keep rules from overlapping so traffic is attributed to the right one.

Example: [{"name":"dc-assets","hosts":["*.cloudfront.net","static.example.com"],"proxy":["http://u:[email protected]:4444","http://u:[email protected]:4444"]}]
inactivity_timeoutnumber | string60s

The timer resets on any protocol traffic in either direction. A number of seconds (90, 1.5) or a string with a unit: 500ms, 45s, 10m, 2h (digits only, no spaces or decimals). Clamped to 1 s – 24 h. An unparseable value silently falls back to the default.

A slow page load through a proxy can produce no traffic for a while, so keep it at 60 s or more. Shared threads can lower it but not raise it above 60 s; dedicated threads can set up to 24 h. Never longer than the session's overall timeout.

Example: "2m"
overall_timeoutnumber | stringyour plan's maximum session length (24 h)

A number of seconds (90, 1.5) or a string with a unit: 500ms, 45s, 10m, 2h (digits only, no spaces or decimals). Clamped to 1 s – 24 h. An unparseable value silently falls back to the default. cdpfleet also caps it at your plan's maximum session length (24 h) and, for shared threads, at your remaining daily minutes.

Example: "30m"
headlessboolean | "new" | "shell"false (headful, on a virtual display)

true or "new" runs Chrome's new headless mode; "shell" runs the lightweight headless shell. Anything else — including 1 and "false" — runs headful on a virtual display, which is harder to detect and is billed as 2 threads (headless is 1).

Example: "new"