Lightpanda CDP over WebSocket
Version 1.0.0
AsyncAPI 2.6 description of Lightpanda's programmable interface. Lightpanda is a headless browser; it does **not** expose a REST API. Its interface is the **Chrome DevTools Protocol (CDP)**, a bidirectional JSON-RPC 2.0-style wire protocol carried over a single **WebSocket** connection. This is the same protocol Chrome/Chromium expose for remote automation, which is why existing **Puppeteer**, **Playwright**, and **chromedp** clients work against Lightpanda unchanged - they simply connect to Lightpanda's WebSocket endpoint instead of Chrome's. Two deployment surfaces share this protocol: - **Local / self-hosted** (open source, AGPL-3.0): start the server with `lightpanda serve --host 127.0.0.1 --port 9222`. The CDP endpoint is `ws://127.0.0.1:9222`. Connect Puppeteer with `puppeteer.connect({ browserWSEndpoint: "ws://127.0.0.1:9222" })`, or Playwright/chromedp via `connectOverCDP`. - **Lightpanda Cloud** (managed): regional secure-WebSocket endpoints such as `wss://euwest.cloud.lightpanda.io/ws` and `wss://uswest.cloud.lightpanda.io/ws`. Authentication is a `token` query-string parameter (`?token=YOUR_TOKEN`). Optional query parameters include `browser=lightpanda|chrome` to choose the engine and `proxy` to configure egress. On the wire, the client sends CDP **command** messages (each an object with a numeric `id`, a `method` such as `Page.navigate` or `Runtime.evaluate`, and a `params` object) and the server returns matching command **results** (keyed by the same `id`) plus asynchronous **events** (objects with a `method` such as `Page.loadEventFired` and a `params` object, and no `id`). Lightpanda implements a subset of CDP sufficient for Puppeteer/Playwright automation.
Channels
Messages
Servers
127.0.0.1:9222
cloud.lightpanda.io/ws