Puppeteer & Node.js

Puppeteer Scraper Browser: Headless Chrome Automation

Puppeteer is the Google Chrome team's official Node.js library for headless browser automation. Learn how to launch Headless Chrome with stealth options, optimize memory consumption, and connect Puppeteer to remote cloud scraper browsers.

#1 Top Recommended Platform

2Captcha Browser API

Connects to puppeteer-core in one line. Completely eliminates the need to install 300MB Chromium binaries on your server.

Target Search Intent:
puppeteer headless browser (480/mo)puppeteer chrome (320/mo)headless browser puppeteer (50/mo)headless chrome puppeteer (40/mo)puppeteer launch headless (30/mo)chrome headless puppeteer (20/mo)puppeteer chrome headless (20/mo)puppeteer launch chrome (10/mo)puppeteer google chrome (10/mo)puppeteer open chrome (10/mo)puppeteer use chrome (10/mo)puppeteer with chrome (10/mo)
Quick Start: JAVASCRIPT IntegrationVerified 2026
import puppeteer from 'puppeteer-core';

// Connect puppeteer-core to remote 2Captcha scraper browser
const endpoint = 'wss://browser.2captcha.com/?apiKey=YOUR_API_KEY&country=us';

async function main() {
  const browser = await puppeteer.connect({ browserWSEndpoint: endpoint });
  const page = await browser.newPage();
  
  await page.goto('https://quotes.toscrape.com', { waitUntil: 'networkidle2' });
  console.log('Title:', await page.title());
  
  await browser.close();
}

main();

Puppeteer vs Puppeteer-Core: What's the Difference?

The standard `puppeteer` package downloads a bundled ~300MB Chromium binary during npm install. `puppeteer-core` is a lightweight alternative that does not download Chromium; it connects to an existing local Chrome browser or a remote cloud browser API like 2Captcha.

Configuring Puppeteer Launch Headless Mode

When running locally, always pass `headless: 'new'` in Puppeteer launch options: `puppeteer.launch({ headless: 'new', args: ['--no-sandbox', '--disable-setuid-sandbox'] })`. This ensures Puppeteer uses Google Chrome's modern rendering engine.

Why Puppeteer Scripts Get Detected and Blocked

Puppeteer scripts leak automation signatures through navigator.webdriver, CDP runtime bindings, and missing WebRTC/WebGL hardware noise. Connecting puppeteer-core to 2Captcha Browser API bypasses these checks at the protocol layer.

Architectural Benchmark & Pricing Comparison

SetupPackage SizeRam UsageAnti Bot
puppeteer (Local Binary)~320 MB300MB+ / tabRequires extra plugins
puppeteer-core + 2Captcha (#1)~5 MBUnder 25MBNative Automated (99.4%)

Frequently Asked Questions

How do I run Puppeteer with Google Chrome instead of Chromium?

Set executablePath in puppeteer.launch() to your local Chrome path (e.g., C:\Program Files\Google\Chrome\Application\chrome.exe on Windows or /usr/bin/google-chrome on Linux).

Why does Puppeteer crash in Docker?

Docker defaults to 64MB shared memory (/dev/shm). Pass '--disable-dev-shm-usage' in launch args or run Docker with '--shm-size=1gb'.

Launch Managed Cloud Headless Chrome in Seconds

Get instant access to genuine Chrome DevTools Protocol endpoints, automated CAPTCHA clearing, and residential proxies in 220+ countries.