# Puppeteer — card for AI agents

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

Category: Scraping, browsers and parsing · npm package `puppeteer` · latest version 25.16.0 (checked 2026-11-01)
Install: `npm install puppeteer`
License: Apache-2.0 (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (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.

## What it is
- Puppeteer is a JavaScript library with a high-level API to control Chrome or Firefox over the Chrome DevTools Protocol (CDP) or WebDriver BiDi. It runs headless (no visible UI) by default. The GitHub repository was created on 2017-05-09 and is Apache-2.0 licensed. The docs site shows version 25.13.0.
- It ships as two packages. `puppeteer` downloads a compatible Chrome during installation. `puppeteer-core` installs the library only, without a browser. The FAQ says every release is "tightly bundled with a specific browser release." From v23.0.0, Chrome and Firefox are both supported. Chrome uses CDP by default, and Firefox uses WebDriver BiDi by default.
- The FAQ describes Puppeteer as a "Node.js based reference implementation" of browser automation with CDP and WebDriver BiDi. The Chrome Browser Automation team maintains it. The README also points to `chrome-devtools-mcp`, a Puppeteer-based MCP server for browser automation and debugging.

## Caveats
- 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 `npx puppeteer browsers install`, or adding `"puppeteer"` to `"allowScripts"`.
- 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."
- arm64 was a sticking point for one team: In a December 2024 post, Akto said it moved Puppeteer into a separate service partly because it wanted arm64 support. The post says Chrome and Chromium did not support that architecture at the time.

## Numbers (AgentGid data)
- Gid Score: 79.6 (#109 of all tools, 3 of 141 in its category)
- Used in 86 public projects set up for AI coding agents (1.4%)
- Downloads last week: 16,010,870 (as of 2026-11-24), +37.7% over 4 weeks
- GitHub stars: 95,896 (as of 2026-11-24)
- Last push: 2026-11-24

## Often used with
dotenv 50.0%, Axios 38.4%, Playwright (JavaScript) 44.2%, TypeScript 74.4%, Jest 24.4%, React 54.7%

## Checked alternatives (same job)
- Playwright Core: https://agentgid.com/tools/playwright-core/agent.md
- Stagehand (JavaScript): https://agentgid.com/tools/browserbasehq-stagehand/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/puppeteer/
- Homepage: https://github.com/puppeteer/puppeteer/tree/main#readme
- Repository: https://github.com/puppeteer/puppeteer
- Source: https://github.com/puppeteer/puppeteer#readme
- Source: https://github.com/puppeteer/puppeteer
- Source: https://github.com/puppeteer/puppeteer/releases
- Source: https://pptr.dev
- Source: https://pptr.dev/faq

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
