October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Puppeteer Documentation: Getting Started and API Reference

Start Puppeteer with the right package, a compatible browser, and a simple launch-to-close workflow; then use the API Reference to find exact methods and options.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To start with Puppeteer, install puppeteer if you want it to download a compatible browser for you, or puppeteer-core if you manage the browser yourself or connect to one remotely. Then launch or connect to a browser, create a page, navigate, interact with the page, and close the browser. The official getting-started guide walks through that loop; the API Reference is where to look up classes, types, and individual methods.

What Puppeteer does

Puppeteer is a JavaScript library for controlling Chrome or Firefox through the DevTools Protocol (CDP) or WebDriver BiDi. It runs headless by default. Chrome automation uses CDP by default; Firefox uses WebDriver BiDi by default. Puppeteer also supports WebDriver BiDi with Chrome. See the official overview and FAQ for the current protocol details.

Choose the right package

Package Choose it when Browser setup
puppeteer You want the conventional local setup and Puppeteer’s browser defaults. Normally downloads a compatible Chrome for Testing browser and headless shell during installation.
puppeteer-core You manage the browser yourself or connect to a remote browser. Does not download Chrome. Supply a browser executable path or an appropriate Chrome channel for a local browser, or connect to a remote instance.

These behaviors are described in the official installation guide. Its download-size estimates are approximately 170 MB for macOS, 282 MB for Linux, and 280 MB for Windows; they are vendor-published approximate figures, not independent measurements. If browser downloads are blocked in your environment, the installation guide explains how to permit the package install script or install the browser separately.

Check runtime and platform requirements

The Puppeteer documentation retrieved for v25.12.0 specifies Node 22.12 or newer, and TypeScript 5.0.1 or newer when using TypeScript. Browser dependencies also vary by operating system. Requirements change, so check the system requirements page for the Puppeteer version you install rather than treating these minimums as permanent.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Puppeteer and run the basic workflow

The following CommonJS example follows the official workflow: launch, create a page, navigate, set a viewport, interact with a locator, inspect the page, and close the browser.

  1. In a project with a compatible Node.js version, install the package: npm install puppeteer.
  2. Save the script below as example.cjs and run it with node example.cjs.
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  try {
    const page = await browser.newPage();
    await page.setViewport({ width: 1280, height: 800 });
    await page.goto('https://example.com');

    const heading = page.locator('h1');
    await heading.wait();
    console.log(await heading.ariaSnapshot());
  } finally {
    await browser.close();
  }
})();

The finally block closes the browser even if navigation or interaction fails, which helps prevent a script from leaving browser processes running. Puppeteer locators provide a way to find and interact with page elements; see the official getting-started example and the API reference for locator methods available in your installed release.

Use TypeScript

For a TypeScript project, install Puppeteer and TypeScript, then use the same browser-page-navigation pattern. The documented TypeScript minimum for Puppeteer v25.12.0 is 5.0.1.

import puppeteer from 'puppeteer';

async function main(): Promise<void> {
  const browser = await puppeteer.launch();
  try {
    const page = await browser.newPage();
    await page.setViewport({ width: 1280, height: 800 });
    await page.goto('https://example.com');
    console.log(await page.title());
  } finally {
    await browser.close();
  }
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Connect to a browser you manage

With puppeteer-core, install the library and provide the browser endpoint or executable configuration appropriate to your environment. For a locally managed executable, the pattern is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const puppeteer = require('puppeteer-core');

(async () => {
  const browser = await puppeteer.launch({
    executablePath: '/path/to/chrome'
  });
  try {
    const page = await browser.newPage();
    await page.goto('https://example.com');
    console.log(await page.title());
  } finally {
    await browser.close();
  }
})();

Replace the example path with the actual browser executable for your operating system. For a browser running elsewhere, use Puppeteer’s connect method with the connection information for that browser; consult the current API Reference for its options. A browser you select manually is not guaranteed to match your Puppeteer release.

Or skip the browser setup

If you only need a website screenshot rather than browser automation, ScreenshotNeo provides a one-request screenshot API. Its clean-shot steps accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies page verdict and billing status in headers. It also has an MCP server with screenshot, page-info, and PDF tools for AI agents.

Example cURL request, using the API details in the ScreenshotNeo documentation:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for free.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Match Puppeteer to a compatible browser

Puppeteer releases are paired with browser builds so the automation library and browser protocols work together. The supported-browsers table for Puppeteer v25.12.0 lists Chrome for Testing 154.0.8037.57 and Firefox 156.0.1. These are version-specific pairings, not a promise that any system browser will work with every Puppeteer release. Check the official supported browsers table for your installed version. If an exact Puppeteer release is missing from that table, the page advises using the browser version paired with the immediately prior listed Puppeteer version.

The project says it has bundled Chrome for Testing since Puppeteer v20 and supports both Chrome and Firefox from v23. Verify the compatibility table when upgrading because browser versions and support details change.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Find your way around the API Reference

The API Reference is an index of Puppeteer’s classes, types, and methods, not a replacement for the step-by-step guide. Start from the workflow you need, then look up the method and its options:

  • Browser startup and connection: review launch for starting a browser and connect for connecting to one.
  • Pages: use the page methods relevant to navigation, viewport settings, element interaction, and retrieving results.
  • Types and configuration: consult the linked types and configuration entries when you need exact option names and accepted values.
  • Browser downloads and cache management: use the separate @puppeteer/browsers API.

The API entry and its options can change by release; use documentation matching the Puppeteer version in your project.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshooting common setup problems

Installation completes, but launch cannot find Chrome

A package manager may have blocked install scripts, preventing Puppeteer’s automatic browser download. Allow the package script under your package manager’s policy or follow the installation guide’s browser-install command to download the browser manually. Then retry with the same project environment.

Best Value
The SQL Programming Language: .
  • Used Book in Good Condition

A manually installed browser fails to launch or behaves unexpectedly

Check the supported-browsers table for the browser build paired with your Puppeteer release. With puppeteer-core, verify that executablePath points to the intended browser or that the remote connection details are correct. An arbitrary system Chrome version is not necessarily a compatible match.

Setup fails on a new machine or operating system

Confirm the Node.js minimum, platform support, and required browser utilities on the system requirements page for your installed Puppeteer release. Browser dependencies are platform-specific.

Automation works in Chrome but not Firefox

Chrome and Firefox use different default automation protocols in Puppeteer: CDP for Chrome and WebDriver BiDi for Firefox. Check current browser support and the relevant API details before assuming protocol behavior is identical.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Where is the official Puppeteer API reference?

Use pptr.dev/api for classes, types, and methods.

Does Puppeteer run headless by default?

Yes. Puppeteer runs headless by default; the current launch options are documented in the API Reference.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.