Puppeteer on Browserberg
Puppeteer talks CDP natively, so connecting to Browserberg is a one-argument change from puppeteer.launch to puppeteer.connect.
Connect in one line
import puppeteer from 'puppeteer-core';
const browser = await puppeteer.connect({
browserWSEndpoint: `wss://browserberg.com/v1/connect?token=${process.env.BB_TOKEN}`
});
const [page] = await browser.pages();
await page.goto('https://portal.example.de');
Things worth knowing
puppeteer-core, not puppeteer
The full puppeteer package downloads a Chromium you will never launch. puppeteer-core is the same API without the download.
browser.pages(), not newPage()
A session already has a page open. Reusing it keeps the restored profile; opening a new one in a fresh context does not.
Do not call browser.close()
Use disconnect(). Closing shuts the session down before the profile has been captured, and the next run starts logged out.
Details
| Protocol | Chrome DevTools Protocol over WebSocket |
|---|---|
| Package | puppeteer-core (no bundled browser needed) |
| Connect method | puppeteer.connect({ browserWSEndpoint }) |
| Browser engine | Chromium |
| Where sessions run | EU bare metal (OVHcloud) |
As of 2026-08-30
Questions people actually ask
Should I install puppeteer or puppeteer-core?
puppeteer-core. The full package downloads a Chromium you will never launch, which is pure image weight when the browser runs elsewhere.
Why disconnect() rather than close()?
close() shuts the session down. The profile is captured when a session ends cleanly through our lifecycle, and a client-initiated close can cut that short -- the next run then starts logged out with no obvious cause.
Does the request interception API work?
Yes. Interception is a CDP feature and it behaves the same over a remote connection. Bear in mind that blocking resources changes what the page renders, which is worth remembering when a selector suddenly stops matching.
Other integrations
- Playwright Playwright connects to Browserberg over the Chrome DevTools Protocol.
- Selenium Selenium reaches Browserberg through Chrome's CDP support.
- Chrome DevTools Protocol If you would rather not use a driver library at all, a session is a plain CDP WebSocket.
- LangChain LangChain agents drive Browserberg today through Playwright's toolkit, pointed at a remote CDP endpoint.
- MCP A Model Context Protocol server that exposes Browserberg sessions as tools to any MCP client.
Point an existing script at us
Five browser hours free, no card. If it runs locally, it runs here with one line changed.