# Puppeteer — card for AI agents

Open-source Node.js library to control headless Chrome/Firefox for automation, scraping and testing.

Maker: Google (Chrome team) · category: Browser automation (cloud)

## Price (official page)
- Free tier: none listed
- Free tier terms: open source (read from the wording above and the pricing page; empty = not stated)
- Note: Library, not a hosted service: free, runs the browser on your own infrastructure. For MCP, pptr.dev points to Google's chrome-devtools-mcp.

## Connect
- Official MCP server: chrome-devtools-mcp
- npm: `npm install puppeteer`
- Repository: https://github.com/puppeteer/puppeteer

## For AI agents on Google (Chrome team)'s own site (AgentGid check 2026-11-13: 2 of 6)
- llms.txt: none found
- OpenAPI description: none found at the usual places
- Official MCP server: yes · official SDK: yes · status page: no
- robots.txt: none found

## Price history in AgentGid's catalog (since 2026-10-10)
- Changes recorded: 0 (a vendor price change or an editor's correction; the evidence archive keeps the pricing page of each date)

## Other APIs in this category
- Browserless: https://agentgid.com/apis/browserless/agent.md
- Browserbase: https://agentgid.com/apis/browserbase/agent.md
- Browser Use Cloud: https://agentgid.com/apis/browser-use-cloud/agent.md
- Hyperbrowser: https://agentgid.com/apis/hyperbrowser/agent.md
- Steel: https://agentgid.com/apis/steel/agent.md

## Links
- AgentGid page: https://agentgid.com/apis/puppeteer/


## Puppeteer: let your code drive a Chrome browser

Puppeteer is a free open-source JavaScript library from Google's Chrome team, not an online service. Your Node.js code opens a hidden Chrome or Firefox and uses it like a person would, clicking, typing and visiting pages. Typical jobs are screenshots, PDFs of web pages and automated tests; the browser runs on your own computer or server.

### Where to use it
- Screenshots of web pages: Save a picture of any page or of one part of it, for example to make preview images or check how a page looks after a change.
- PDF invoices and reports from HTML: Design an invoice or report as a normal web page, then save it as a PDF file to email or download.
- Automatic checks of sign-up forms: Fill in and submit your own forms in a real browser after every change, so a broken sign-up page is caught before users see it.
- Pre-rendered pages for search engines: Load a page built with JavaScript in the browser and save the finished HTML, so search engines and link previews see the content.
- Find why a page is slow: Record what the browser does while your page loads, to see which script or image makes it slow.
- Let a coding assistant use Chrome: Give your AI coding assistant a real Chrome to open your site, read console errors and take screenshots while it fixes bugs.

### How to start
- Install the package in your Node.js 22.12+ project; it also downloads a matching Chrome for Testing.

```
npm i puppeteer
```

- If your package manager blocked the install script, download the browser yourself.

```
npx puppeteer browsers install
```

- Launch the browser, open a page and save a screenshot (official example).

```
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://news.ycombinator.com', {
  waitUntil: 'networkidle2',
});
await page.screenshot({
  path: 'hn.png',
});
await browser.close();
```


### License
Puppeteer is free under the Apache 2.0 license, including in paid products; keep its license and notice files when you ship it. The Chrome it downloads comes with its own terms from Google.

### Good to know
- It is a library, not a hosted service, so there is no account or key; you run and pay for the machine yourself.
- Installing it downloads a full browser of about 170 to 280 MB, stored in a cache folder in your home directory.
- It needs Node.js 22.12 or newer.
- On Linux servers, Chrome needs extra system packages, and it may refuse to start without a working sandbox.
- Each Puppeteer version is built for one specific Chrome and Firefox version; mixing other versions can break it.

Checked 2026-11-10 against: https://pptr.dev, https://pptr.dev/guides/what-is-puppeteer, https://pptr.dev/guides/getting-started, https://pptr.dev/guides/installation, https://pptr.dev/guides/system-requirements, https://pptr.dev/guides/configuration, https://pptr.dev/guides/screenshots, https://pptr.dev/guides/pdf-generation, https://pptr.dev/guides/headless-modes, https://pptr.dev/guides/page-interactions, https://pptr.dev/guides/network-interception, https://pptr.dev/guides/docker, https://pptr.dev/troubleshooting, https://pptr.dev/faq, https://pptr.dev/api/puppeteer.timeouterror, https://pptr.dev/api/puppeteer.page.pdf, https://pptr.dev/api/puppeteer.page.screenshot, https://github.com/puppeteer/puppeteer/blob/main/README.md, https://github.com/puppeteer/puppeteer/blob/main/LICENSE, https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/README.md, https://registry.npmjs.org/puppeteer/latest, https://registry.npmjs.org/puppeteer-core/latest, https://registry.npmjs.org/chrome-devtools-mcp/latest

### Mistakes to avoid
- Don't: Installing with a package manager that blocks install scripts (pnpm, Yarn Berry, Bun, newer npm) and expecting Chrome to be there. → Do: Run npx puppeteer browsers install after installing, or allow Puppeteer's install script in package.json. (The browser download is skipped and launch fails with "Could not find Chrome".)
- Don't: Building the app in one step (Docker build, CI) and running it elsewhere while the browser stays in ~/.cache/puppeteer. → Do: Set cacheDirectory in .puppeteerrc.cjs inside the project and reinstall, so the browser ships with the app. (The default cache folder is in the home directory and is lost when the build output is moved.)
- Don't: Adding --no-sandbox to make Chrome start on a Linux server that opens pages you do not control. → Do: Configure the Chrome sandbox on the host; use --no-sandbox only for content you fully trust. (The sandbox protects the server from untrusted web content.)
- Don't: Using puppeteer-core and relying on .puppeteerrc or PUPPETEER_* environment variables. → Do: With puppeteer-core pass executablePath (or channel) to launch(), or switch to the puppeteer package. (puppeteer-core ignores configuration files and environment variables and downloads no browser.)
- Don't: Navigating to plain http:// addresses on remote hosts and treating the failure as a site error. → Do: Use https:// addresses, or launch Chrome with --disable-features=HttpsFirstBalancedModeAutoEnable. (Chrome for Testing turns such navigations into net::ERR_BLOCKED_BY_CLIENT.)

### Questions
- Do I need an account or a key? No. Puppeteer is an open-source library; it controls a browser on your own machine.
- Does it work with Firefox? Yes, since version 23 it supports both Chrome and Firefox; Firefox is driven over WebDriver BiDi.
- What is the difference between puppeteer and puppeteer-core? puppeteer downloads a browser and has defaults; puppeteer-core downloads nothing and is for a browser you manage or a remote one.
- Can I see the browser while it works? Yes. It is hidden by default; launch with headless set to false to see it.

---
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.
