Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Puppeteer

Headless Chrome/Chromium automation for scraping, testing and screenshot generation.

Scraping, browsers and parsingNPM

GitHubWebsiteAPI page

1. License

License from npm.

github.com/puppeteer/puppeteer

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What Puppeteer does

Puppeteer is the Chrome Browser Automation team's own JavaScript library for driving Chrome or Firefox, and each release is pinned to a specific browser build so protocol changes do not break your scripts.

Puppeteer popularity

80 / 100
Gid Score, #109 overall
16M
downloads a week, npm
95.9K
GitHub stars
86
agent projects use it
Puppeteer: downloads per weeknpm, puppeteer 16,010,870
Puppeteer: GitHub starspuppeteer/puppeteer 95,896

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Puppeteer is used

  • Puppeteer is a dependency in 86 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (1.8% of the 4,867 JavaScript/TypeScript ones), #2 of 141 in scraping, browsers and parsing.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 252; those are left out of every share on this page.
  • The most used alternative in our scan is Playwright Core (80 projects).
  • Projects that use it most often also use dotenv (50.0%), Axios (38.4%), Playwright (JavaScript) (44.2%).
  • It is more common in projects set up for Continue (7.9%) than for GitHub Copilot (1.5%).

By coding agent

51 projects, 1.6%
47 projects, 1.5%
42 projects, 1.7%
11 projects, 2.3%
6 projects, 2.2%
5 projects, 1.5%
5 projects, 7.9%

Often used with

In 50.0% of its projects
In 38.4% of its projects
In 44.2% of its projects
In 74.4% of its projects
In 24.4% of its projects
In 54.7% of its projects
In 54.7% of its projects
In 57.0% of its projects

Puppeteer in practice

Strengths

Clicks and keystrokes look like a real user's

The FAQ says all input events Puppeteer generates are trusted and fire the accompanying events, such as <code>mousedown</code> and <code>mouseup</code> before a click. Websites can tell trusted events from ones created by Web APIs.

Browser version is pinned per release

Each Puppeteer release is bundled with a specific Chrome and Firefox release. The docs say this keeps browser changes from unexpectedly breaking Puppeteer. The pinned versions are listed in <code>revisions.ts</code>.

CDP stays alongside WebDriver BiDi

BiDi support is production-ready from v23.0.0. The maintainers write that they will keep supporting Chrome automation over CDP, both for existing scripts and for Chrome-only use cases.

Single-page app navigation counts

Puppeteer treats any URL change as a navigation. That includes anchor navigations and History API calls, not only full page loads.

Watch out for

Blocked install scripts mean no browser

The docs say npm, pnpm, Yarn, Bun and Deno block dependency install scripts by default. If the script is blocked, Chrome is not downloaded and you get errors at runtime. The fix is <code>npx puppeteer browsers install</code>, or adding <code>"puppeteer"</code> to <code>"allowScripts"</code>.

JavaScript only, no grid

The FAQ says bindings for other languages and tooling to orchestrate automation at scale are beyond Puppeteer's scope. It names Selenium Grid as an example of the latter.

API support differs between protocols

API support over WebDriver BiDi is not identical to CDP. The FAQ points to a separate guide for the "subtle differences."

Search a page and read a result title

import puppeteer from 'puppeteer';
// Or import puppeteer from 'puppeteer-core';

// Launch the browser and open a new blank page.
const browser = await puppeteer.launch();
const page = await browser.newPage();

// Navigate the page to a URL.
await page.goto('https://developer.chrome.com/');

// Set the screen size.
await page.setViewport({width: 1080, height: 1024});

// Open the search menu using the keyboard.
await page.keyboard.press('/');

// Type into search box using accessible input name.
await page.locator('::-p-aria(Search)').fill('automate beyond recorder');

// Wait and click on first result.
await page.locator('.devsite-result-item-link').click();

// Locate the full title with a unique string.
const textSelector = await page
  .locator('::-p-text(Customize and automate)')
  .waitHandle();
const fullTitle = await textSelector?.evaluate(el => el.textContent);

// Print the full title.
console.log('The title of this blog post is "%s".', fullTitle);

await browser.close();

More about Puppeteer

Head to head
Packages around it
  • dotenv: Loads .env variables
  • @playwright/test: Playwright test runner
  • axios: HTTP client
  • jsdom: DOM in Node.js
  • jest: Test runner
  • zod: Schema validation
More in Scraping, browsers and parsing

Alternatives

Puppeteer This page

Apache-2.0Gid 8016M/wk

Playwright Core

Headless browser automation library for cross-browser testing and web scraping.

Apache-2.0Gid 86203M/wk

Stagehand (JavaScript)

Browser agent SDK for building web automation agents.

MITGid 692.6M/wk

Compare Puppeteer with another tool

Get started

Install it.

npm install puppeteer

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## Puppeteer
- Install `puppeteer` when you want it to download a compatible Chrome. Install `puppeteer-core` when the project supplies its own browser.
- If the package manager blocks install scripts, run `npx puppeteer browsers install` after install, or add `"puppeteer"` to `"allowScripts"` in `package.json`. Otherwise expect runtime errors from a missing browser.
- Do not pair a Puppeteer version with an arbitrary browser version. Each release is bundled with a specific Chrome/Firefox build, listed in `revisions.ts`.
- Prefer `page.locator(...)` with `::-p-aria(...)` or `::-p-text(...)` selectors, as in the README example. Always call `browser.close()` when done.
- Use Puppeteer's input APIs for trusted events. Only use `page.evaluate` with DOM calls like `element.click()` when you deliberately need an untrusted event.
- When targeting Firefox or WebDriver BiDi, check the WebDriver BiDi guide for API differences from CDP.

AgentGid articles about Puppeteer

All guides