What is Puppeteer?

Puppeteer is a browser automation library developed by the Chrome Dev Tools team.

Simply put, it is a tool that allows you to control your web browser with NodeJS scripts.

In more technical terms it supports automating Chrome/Chromium over the non-standard DevTools Protocol.

There is experimental Firefox support as well.

You can do almost anything with Puppeteer that you normally do manually. According to the official website, this list of possible actions includes:

  • Generate screenshots and PDFs of pages.
  • Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e. "SSR" (Server-Side Rendering)).
  • Automate form submission, UI testing, keyboard input, etc.
  • Create an automated testing environment using the latest JavaScript and browser features.
  • Capture a timeline trace of your site to help diagnose performance issues.
  • Test Chrome Extensions.

But it is also widely used to scrape websites that uses a lot of JavaScript, as scraping those websites with a traditional web scraping library like Axios is not possible.

This library is currently maintained by the Chrome DevTools team, so, basically, by Google.

Related Puppeteer web scraping questions: