cdpfleet Pre-launch Get early access

cdpfleet / Browsers / WebKit

WebKit · Playwright build

WebKit, one socket away.

The WebKit build that ships with Playwright. Combine it with Playwright's iPhone device descriptors to emulate mobile WebKit. Like Safari on Linux, it refuses cookies for a domain on the Public Suffix List — httpbin.org and postman-echo.com are listed, so test cookies against www.httpbin.org instead.

  • /webkit/sessionlaunch endpoint
  • 1.60Playwright client
  • 1thread headless

Why WebKit

  • WebKit as built by Playwright: layout, fonts and CSS quirks in the WebKit engine.
  • Combine it with Playwright's iPhone device descriptors for mobile WebKit rendering checks.
  • It identifies as WebKit on Linux, so use it for rendering, not to impersonate another browser.

Versions on the fleet now

build26.4

One build per release, updated on the fleet as new versions ship.

New majors are announced on /docs/updates.

Launch it

One HTTPS call to POST /webkit/session returns a WebSocket URL; connect to it with Playwright's webkit.connect() (client 1.60). A headless session takes 1 thread, a headful one 2.

WebKit: launch, open a page, print its title
// npm install [email protected]
// Browsers run on cdpfleet, so no `npx playwright install` is needed.
import { webkit } from 'playwright';

const KEY = process.env.CDPFLEET_API_KEY;

// 1. Launch the browser
const res = await fetch('https://starter.cdpfleet.com/webkit/session', {
  method: 'POST',
  headers: { 'x-api-key': KEY, 'content-type': 'application/json' },
  body: JSON.stringify({
    proxy: 'http://user:[email protected]:8080',
    headless: true,
  }),
});
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 webkit.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

Launch options

OptionWhat it does
proxy_rulesSend specific destination hosts through specific proxies.
inactivity_timeoutEnd the session after this long with no traffic on its WebSocket.
overall_timeoutHard cap on the session's total lifetime, regardless of activity.
vpn_tunnelVPN Tunnel: UDP/WebRTC full support — all of the browser's traffic, UDP included, goes through the residential exit.
vpnOwn network (dedicated plans): send all of the browser's traffic through your own VPN instead of a proxy.
headlessRun without a display.
screencastStream the page to your code (Playwright page.screencast).
screen_sizeResolution of the session's own display (headful only).
keep_aliveKeep the session when your client disconnects (dedicated threads only).
start_urlOpen this page at launch so the session can be driven in live view with no client connected.
profileRestore a saved browser profile and save it again when the session ends.
recordOpt this session out of recording with false.

Every session also needs a proxy — yours, or the residential proxy.

Read next