{
 "kind": "api",
 "slug": "puppeteer",
 "path": "apis/puppeteer/",
 "name": "Puppeteer",
 "logo": "https://agentgid.com/media/avatars/puppeteer.png",
 "maker": "Google (Chrome team)",
 "density": "full",
 "crumbs": [
  [
   "APIs",
   "apis/"
  ],
  [
   "Browser automation (cloud)",
   "apis/browser/"
  ]
 ],
 "lead": "Let your code drive a Chrome browser.",
 "chips": [
  {
   "label": "Browser automation (cloud)",
   "path": "apis/browser/"
  },
  {
   "label": "Official MCP server"
  }
 ],
 "primary": {
  "label": "Copy prompt for your agent",
  "copy": "Add Puppeteer to my Node.js server to turn /invoice/:id into a PDF: pin puppeteer@25.16.0, keep the Chrome sandbox on, close the browser in a finally block, and set cacheDirectory in .puppeteerrc.cjs so the browser is found after deploy."
 },
 "links": [
  {
   "label": "Website",
   "href": "https://pptr.dev"
  },
  {
   "label": "GitHub",
   "href": "https://github.com/puppeteer/puppeteer"
  }
 ],
 "track": "Outages, price changes and new versions on your dashboard",
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Open source",
   "status": "yes",
   "sub": "Run it yourself for free",
   "quote": null,
   "note": "No free tier on the pricing page. As reported on the official pricing page, checked Oct 10, 2026.",
   "src": "https://pptr.dev"
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "Allowed",
   "status": "yes",
   "sub": null,
   "quote": "\"license\":\"Apache-2.0\"",
   "note": "Apache-2.0 allows commercial use.",
   "src": "https://registry.npmjs.org/puppeteer/latest"
  },
  {
   "key": "key",
   "label": "Key & sign-up",
   "value": "API key",
   "status": "info",
   "sub": "Env var none (PUPPETEER_CACHE_DIR only sets where the browser is stored)",
   "quote": null,
   "note": "None. Puppeteer is a local library with no account or key. There is no secret to leak; Puppeteer itself runs in Node.js on a server or computer, not in a visitor's browser page.",
   "src": "https://pptr.dev/guides/installation"
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Official MCP server",
   "status": "yes",
   "sub": "SDK",
   "quote": "Install chrome-devtools-mcp , a Puppeteer-based MCP server for browser automation and debugging.",
   "note": "The README config uses @latest; pin a version (1.12.0 on npm on 2026-11-10) and add --no-usage-statistics if you do not want usage data sent to Google. Our agent check: 2 of 6 (Nov 13, 2026).",
   "src": "https://pptr.dev"
  }
 ],
 "vfoot": "Checked against the maker's official pages, pricing on Oct 10, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Puppeteer does",
   "parts": [
    {
     "t": "prose",
     "text": "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."
    },
    {
     "t": "list",
     "items": [
      "Puppeteer is one of 17 APIs in the Browser automation (cloud) category on AgentGid.",
      "It is one of 12 that can be started for free.",
      "It ships an official MCP server, like 7 others here.",
      "Its official SDK is the 1st most downloaded in the category (15.9M a week)."
     ],
     "muted": true
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Screenshots of web pages",
       "text": "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.",
       "idea": false
      },
      {
       "title": "PDF invoices and reports from HTML",
       "text": "Design an invoice or report as a normal web page, then save it as a PDF file to email or download.",
       "idea": false
      },
      {
       "title": "Automatic checks of sign-up forms",
       "text": "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.",
       "idea": false
      },
      {
       "title": "Pre-rendered pages for search engines",
       "text": "Load a page built with JavaScript in the browser and save the finished HTML, so search engines and link previews see the content.",
       "idea": false
      },
      {
       "title": "Find why a page is slow",
       "text": "Record what the browser does while your page loads, to see which script or image makes it slow.",
       "idea": false
      },
      {
       "title": "Let a coding assistant use Chrome",
       "text": "Give your AI coding assistant a real Chrome to open your site, read console errors and take screenshots while it fixes bugs.",
       "idea": false
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Puppeteer popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "16M",
       "l": "SDK downloads a week",
       "d": "+37.7% on the 4-week average",
       "up": true
      },
      {
       "n": "251",
       "l": "public agent repos use its SDK"
      },
      {
       "n": "95.9K",
       "l": "GitHub stars, puppeteer/puppeteer"
      }
     ]
    },
    {
     "t": "small",
     "text": "SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026."
    }
   ]
  },
  {
   "id": "pricing",
   "nav": "Pricing and limits",
   "h2": "Pricing",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Free tier",
       "v": "None"
      },
      {
       "l": "Cheapest plan",
       "v": "No monthly plan"
      },
      {
       "l": "Usage price",
       "v": "—"
      },
      {
       "l": "Plans",
       "v": "Library, not a hosted service: free, runs the browser on your own infrastructure. For MCP, pptr.dev points to Google's chrome-devtools-mcp."
      }
     ]
    },
    {
     "t": "small",
     "text": "As reported on the official pricing page, checked Oct 10, 2026. Prices change: confirm before you buy.",
     "link": "",
     "href": null
    }
   ]
  },
  {
   "id": "access",
   "nav": "Access and terms",
   "h2": "Key and access",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "How it signs in",
       "v": "None. Puppeteer is a local library with no account or key."
      },
      {
       "l": "Environment variable",
       "v": "none (PUPPETEER_CACHE_DIR only sets where the browser is stored)",
       "code": true
      },
      {
       "l": "Safe in browser code",
       "v": "Yes",
       "status": "yes"
      },
      {
       "l": "Card at sign-up",
       "v": "No"
      }
     ]
    }
   ]
  },
  {
   "id": "terms",
   "nav": null,
   "spy_as": "access",
   "h2": "Commercial use and your data",
   "parts": [
    {
     "t": "prose",
     "text": "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."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid app",
       "v": "Yes",
       "status": "yes",
       "sub": "Apache-2.0 allows commercial use.",
       "quote": "\"license\":\"Apache-2.0\"",
       "src": "https://registry.npmjs.org/puppeteer/latest"
      },
      {
       "l": "inside-app-bundle",
       "v": "With conditions",
       "status": "cond",
       "sub": "Keep the Apache-2.0 license text and any NOTICE when you ship it; the downloaded Chrome has Google's own terms.",
       "quote": "You must give any other recipients of the Work or Derivative Works a copy of this License",
       "src": "https://github.com/puppeteer/puppeteer/blob/main/LICENSE"
      },
      {
       "l": "redistribute-files",
       "v": "With conditions",
       "status": "cond",
       "sub": "Allowed under Apache-2.0 with the license, notices and a note of changed files.",
       "quote": "You must cause any modified files to carry prominent notices stating that You changed the files",
       "src": "https://github.com/puppeteer/puppeteer/blob/main/LICENSE"
      },
      {
       "l": "client-work",
       "v": "Yes",
       "status": "yes",
       "sub": "Apache-2.0 allows use in work for clients.",
       "quote": "\"license\":\"Apache-2.0\"",
       "src": "https://registry.npmjs.org/puppeteer/latest"
      }
     ]
    }
   ]
  },
  {
   "id": "errors",
   "nav": null,
   "spy_as": "access",
   "h2": "Errors to handle",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Could not find Chrome (ver. ...)",
       "v": "The browser was not downloaded, usually because the install script was blocked.",
       "sub": "Run npx puppeteer browsers install, or allow Puppeteer's install script."
      },
      {
       "l": "TimeoutError",
       "v": "An operation such as waitForSelector or launch took longer than its timeout.",
       "sub": "Check the selector or page, then retry or raise the timeout for that call."
      },
      {
       "l": "No usable sandbox!",
       "v": "Chrome on Linux found no working sandbox and crashed at launch.",
       "sub": "Configure the sandbox on the host (AppArmor or user namespaces); use --no-sandbox only for trusted content."
      },
      {
       "l": "net::ERR_BLOCKED_BY_CLIENT",
       "v": "Chrome for Testing blocked a navigation to a plain http:// address.",
       "sub": "Use https, or launch with --disable-features=HttpsFirstBalancedModeAutoEnable."
      },
      {
       "l": "Chrome doesn't launch on Linux",
       "v": "System libraries that Chrome needs are missing.",
       "sub": "Install the packages from the troubleshooting list (ldd chrome | grep not shows which)."
      }
     ]
    }
   ]
  },
  {
   "id": "agent",
   "nav": "For agents",
   "h2": "Use it from an agent",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Our agent check",
       "v": "2 of 6: llms.txt no, OpenAPI no, SDK yes, MCP yes, status page no, AI assistants allowed no",
       "sub": "Checked Nov 13, 2026."
      },
      {
       "l": "MCP server",
       "v": "Chrome DevTools MCP (chrome-devtools-mcp), from the Chrome DevTools team, built on Puppeteer",
       "sub": "{ \"mcpServers\": { \"chrome-devtools\": { \"command\": \"npx\", \"args\": [\"-y\", \"chrome-devtools-mcp@latest\"] } } }"
      },
      {
       "l": "npm",
       "v": "npm install puppeteer",
       "code": true
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Puppeteer",
       "me": true,
       "facts": [
        "Free (open source)",
        "No free tier",
        "Official MCP"
       ]
      },
      {
       "name": "Browserless",
       "why": "Pick Browserless when you want managed headless browsers over HTTP instead of running Chrome on your own server.",
       "path": "apis/browserless/",
       "facts": [
        "$2 / 1k requests",
        "Free tier"
       ]
      },
      {
       "name": "Browserbase",
       "why": "Pick Browserbase when you need cloud browsers for AI browser agents, with search and fetch tools from the same provider.",
       "path": "apis/browserbase/",
       "facts": [
        "from $0.1/hour",
        "Free tier",
        "Official MCP"
       ]
      }
     ],
     "more": "All browser automation (cloud) APIs",
     "more_path": "apis/browser/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Add Puppeteer to my Node.js server to turn /invoice/:id into a PDF: pin puppeteer@25.16.0, keep the Chrome sandbox on, close the browser in a finally block, and set cacheDirectory in .puppeteerrc.cjs so the browser is found after deploy."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Install the package in your Node.js 22.12+ project; it also downloads a matching Chrome for Testing.",
       "code": "npm i puppeteer",
       "src": "https://pptr.dev/guides/installation"
      },
      {
       "text": "If your package manager blocked the install script, download the browser yourself.",
       "code": "npx puppeteer browsers install",
       "src": "https://pptr.dev/guides/installation"
      },
      {
       "text": "Launch the browser, open a page and save a screenshot (official example).",
       "code": "import puppeteer from 'puppeteer';\n\nconst browser = await puppeteer.launch();\nconst page = await browser.newPage();\nawait page.goto('https://news.ycombinator.com', {\n  waitUntil: 'networkidle2',\n});\nawait page.screenshot({\n  path: 'hn.png',\n});\nawait browser.close();",
       "src": "https://pptr.dev/guides/screenshots"
      }
     ]
    },
    {
     "t": "h3",
     "text": "First request"
    },
    {
     "t": "tabs",
     "label": "First request",
     "items": [
      {
       "tab": "Request",
       "code": "const browser = await puppeteer.launch();\nconst page = await browser.newPage();\nawait page.goto('https://news.ycombinator.com', {\n  waitUntil: 'networkidle2',\n});\n// Saves the PDF to hn.pdf.\nawait page.pdf({\n  path: 'hn.pdf',\n});\nawait browser.close();",
       "intro": "Puppeteer is a library, not a hosted API; this is the smallest official example (PDF generation guide), and its result is a file, not a network reply."
      },
      {
       "tab": "Response",
       "code": "// Saves the PDF to hn.pdf."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Installing with a package manager that blocks install scripts (pnpm, Yarn Berry, Bun, newer npm) and expecting Chrome to be there.",
       "fix": "Run npx puppeteer browsers install after installing, or allow Puppeteer's install script in package.json.",
       "why": "The browser download is skipped and launch fails with \"Could not find Chrome\"."
      },
      {
       "dont": "Building the app in one step (Docker build, CI) and running it elsewhere while the browser stays in ~/.cache/puppeteer.",
       "fix": "Set cacheDirectory in .puppeteerrc.cjs inside the project and reinstall, so the browser ships with the app.",
       "why": "The default cache folder is in the home directory and is lost when the build output is moved."
      },
      {
       "dont": "Adding --no-sandbox to make Chrome start on a Linux server that opens pages you do not control.",
       "fix": "Configure the Chrome sandbox on the host; use --no-sandbox only for content you fully trust.",
       "why": "The sandbox protects the server from untrusted web content."
      },
      {
       "dont": "Using puppeteer-core and relying on .puppeteerrc or PUPPETEER_* environment variables.",
       "fix": "With puppeteer-core pass executablePath (or channel) to launch(), or switch to the puppeteer package.",
       "why": "puppeteer-core ignores configuration files and environment variables and downloads no browser."
      },
      {
       "dont": "Navigating to plain http:// addresses on remote hosts and treating the failure as a site error.",
       "fix": "Use https:// addresses, or launch Chrome with --disable-features=HttpsFirstBalancedModeAutoEnable.",
       "why": "Chrome for Testing turns such navigations into net::ERR_BLOCKED_BY_CLIENT."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Do I need an account or a key?",
       "a": "No. Puppeteer is an open-source library; it controls a browser on your own machine.",
       "evidence": {
        "url": "https://pptr.dev/guides/what-is-puppeteer",
        "quote": "Puppeteer is a JavaScript library which provides a high-level API to control Chrome or Firefox over the DevTools Protocol or WebDriver BiDi ."
       }
      },
      {
       "q": "Does it work with Firefox?",
       "a": "Yes, since version 23 it supports both Chrome and Firefox; Firefox is driven over WebDriver BiDi.",
       "evidence": {
        "url": "https://pptr.dev/faq",
        "quote": "From Puppeteer v23.0.0 onwards Puppeteer provides support for both Chrome and Firefox."
       }
      },
      {
       "q": "What is the difference between puppeteer and puppeteer-core?",
       "a": "puppeteer downloads a browser and has defaults; puppeteer-core downloads nothing and is for a browser you manage or a remote one.",
       "evidence": {
        "url": "https://pptr.dev/guides/installation",
        "quote": "You should use puppeteer-core if you are connecting to a remote browser or managing browsers yourself ."
       }
      },
      {
       "q": "Can I see the browser while it works?",
       "a": "Yes. It is hidden by default; launch with headless set to false to see it.",
       "evidence": {
        "url": "https://pptr.dev/guides/headless-modes",
        "quote": "To launch a \"headful\" version of Chrome, set the headless to false option when launching a browser:"
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Maker",
   "Google (Chrome team)"
  ],
  [
   "Category",
   "Browser automation (cloud)"
  ],
  [
   "Price",
   "Free (open source)"
  ],
  [
   "Official SDK",
   "npm puppeteer"
  ],
  [
   "Latest SDK",
   "25.16.0 on npm"
  ],
  [
   "Agent check",
   "2 of 6"
  ],
  [
   "Pricing checked",
   "Oct 10, 2026"
  ]
 ],
 "good": [
  "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."
 ],
 "checked_line": "Read by AgentGid from 23 official pages, card checked Nov 10, 2026; usage numbers update daily."
}