cdpfleet Docs GitHub Dashboard

Quickstart

  1. Create an API key in the dashboard and export it:
    export CDPFLEET_API_KEY=cdpf_...
  2. Install the Playwright client shown at the top of your language's example — no browsers need to be installed locally.
  3. Replace the placeholder proxy with your own — every session requires one (formats).
  4. Run the program. It launches a headless Chromium, opens a page and prints its title.
// 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/chromium/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

Next: pick another browser, add a proxy, or build a custom configuration in the code builder.

What the launch returns

{
  "sessionId": "46903d7c-87d2-4320-b85b-cf109c0ec984",
  "wsUrl": "wss://router01.cdpfleet.com/session/46903d7c-87d2-4320-b85b-cf109c0ec984",
  "browser": "chromium",
  "resource_class": "linux_headless",
  "weight": 1,
  "expires_at": "2026-09-30T13:00:00.000Z"
}