Integration

BrowseFleet + Puppeteer

Puppeteer is Google's official Node.js library for controlling Chrome and Chromium. BrowseFleet provides a CDP WebSocket endpoint that Puppeteer can connect to directly, letting you move from local to cloud browsers with a single line change. All Puppeteer APIs work as expected: page navigation, DOM manipulation, screenshots, PDF generation, and network interception.

Installation

terminal
npm install puppeteer-core browsefleet

Code Example

example
import { BrowseFleet } from 'browsefleet';
import puppeteer from 'puppeteer-core';

const bf = new BrowseFleet({ apiKey: 'bf_...' });

// Create a cloud browser session
const session = await bf.sessions.create({
  stealth: 'full',
  viewport: { width: 1920, height: 1080 },
});

// Connect Puppeteer - the only line that changes
const browser = await puppeteer.connect({
  browserWSEndpoint: session.websocketUrl,
});

// Use Puppeteer exactly as you would locally
const page = await browser.newPage();
await page.goto('https://example.com');

const title = await page.title();
console.log('Page title:', title);

// Screenshots
await page.screenshot({ path: 'screenshot.png' });

// PDF generation
await page.pdf({ path: 'page.pdf', format: 'A4' });

// DOM extraction
const data = await page.evaluate(() => ({
  heading: document.querySelector('h1')?.textContent,
  links: Array.from(document.querySelectorAll('a'))
    .map(a => a.href),
}));

await browser.close();
await session.close();

Supported Features

  • Full CDP WebSocket connectivity
  • Page navigation and interaction
  • Screenshot capture (viewport and full-page)
  • PDF generation with formatting options
  • DOM evaluation and data extraction
  • Network request interception
  • Cookie management
  • File upload and download
  • Multi-page and multi-tab workflows
  • Stealth mode with fingerprint spoofing

Try BrowseFleet with Puppeteer

Free tier includes 500 daily requests. Connect Puppeteer in minutes.