{"library":"puppeteer-core","title":"Puppeteer Core","description":"puppeteer-core is a high-level API for controlling Chrome or Firefox over the DevTools Protocol or WebDriver BiDi. Unlike its sibling `puppeteer`, `puppeteer-core` does *not* download a browser binary during installation, making it suitable for environments where you manage the browser executable yourself (e.g., AWS Lambda, CI/CD, or existing browser installations). The current stable version is 24.41.0, released in April 2026. The project maintains a rapid release cadence, often synchronizing with Chrome and Firefox releases, typically with multiple updates per month to incorporate new browser features, bug fixes, and security patches. It is designed for scenarios requiring fine-grained control over the browser executable or minimal install size, offering the same powerful API for web scraping, test automation, and PDF generation.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install puppeteer-core"],"cli":null},"imports":["import puppeteer from 'puppeteer-core';","import { Browser, Page } from 'puppeteer-core';","const browser = await puppeteer.launch({...});"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import puppeteer from 'puppeteer-core';\nimport { Browser, Page } from 'puppeteer-core';\n\nasync function runAutomation() {\n  // IMPORTANT: For puppeteer-core, you MUST specify the executablePath.\n  // This path needs to point to your installed Chrome/Chromium/Firefox executable.\n  // Example for Linux: '/usr/bin/google-chrome'\n  // Example for macOS: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'\n  // Example for Windows: 'C:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe'\n  const browser: Browser = await puppeteer.launch({\n    executablePath: process.env.CHROME_EXECUTABLE_PATH || '/usr/bin/google-chrome', // Provide actual path or use an env variable\n    headless: true, // Use 'true' for new headless mode (default since Puppeteer v21)\n    args: ['--no-sandbox', '--disable-setuid-sandbox'] // Recommended for CI/Linux environments\n  });\n\n  const page: Page = await browser.newPage();\n\n  await page.goto('https://developer.chrome.com/docs/puppeteer/get-started/');\n\n  await page.setViewport({ width: 1080, height: 1024 });\n\n  await page.keyboard.press('/');\n\n  // Type into search box using accessible input name.\n  await page.waitForSelector('::-p-aria(Search)');\n  await page.locator('::-p-aria(Search)').fill('headless testing');\n\n  // Wait and click on the first search result.\n  await page.waitForSelector('.devsite-result-item-link');\n  await page.locator('.devsite-result-item-link').click();\n\n  // Wait for navigation and then locate the full title on the new page.\n  await page.waitForNavigation();\n  const textSelector = await page\n    .locator('::-p-text(Headless Chrome)')\n    .waitHandle();\n  const fullTitle = await textSelector?.evaluate(el => el.textContent);\n\n  console.log('Found title after search: \"%s\".', fullTitle?.trim());\n\n  await browser.close();\n}\n\nrunAutomation().catch(console.error);","lang":"typescript","description":"This quickstart demonstrates how to launch a browser using `puppeteer-core`, explicitly specifying the browser executable path, navigating to a page, interacting with elements, and logging content. It highlights `executablePath` which is crucial for `puppeteer-core`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}