     [Answers](https://scrapfly.io/blog)   /  [puppeteer](https://scrapfly.io/blog/tag/puppeteer)   /  [Getting started with Puppeteer Stealth](https://scrapfly.io/blog/answers/how-to-use-puppeteer-stealth-what-does-it-do)   # Getting started with Puppeteer Stealth

 by [Bernardas Alisauskas](https://scrapfly.io/blog/author/bernardas) Apr 25, 2023 1 min read [\#puppeteer](https://scrapfly.io/blog/tag/puppeteer) 

 [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-use-puppeteer-stealth-what-does-it-do "Share on LinkedIn")    

 

 

Puppeteer stealth is a popular extension for the [Puppeteer](https://scrapfly.io/blog/posts/web-scraping-with-puppeteer-and-nodejs) browser automation framework. This plugin patches Puppeteer runtime to be less likely to be detected by anti-scraping detection techniques.

Using puppeteer-stealth scrapers have better chance at bypassing [Cloudflare](https://scrapfly.io/blog/posts/how-to-bypass-cloudflare-anti-scraping), [Datadome](https://scrapfly.io/blog/posts/how-to-bypass-datadome-anti-scraping) and other popular anti scraping services.

[puppeteer-stealth](https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth) can be installed using NPM:

shell```shell
$ npm install puppeteer puppeteer-extra puppeteer-extra-plugin-stealth
# or
$ yarn add puppeteer puppeteer-extra puppeteer-extra-plugin-stealth
```



Then the `StealthPlugin` object needs to be attached to enable the extension:

javascript```javascript
// Note: import puppeteer-extra rather than puppeteer
const puppeteer = require('puppeteer-extra')

// add stealth plugin and use defaults (all evasion techniques)
const StealthPlugin = require('puppeteer-extra-plugin-stealth')
puppeteer.use(StealthPlugin())

// test run - check scrapfly.io browser fingerprint page
puppeteer.launch({ headless: true }).then(async browser => {
  console.log('Running tests..')
  const page = await browser.newPage()
  await page.goto('https://scrapfly.io/web-scraping-tools/browser-fingerprint')
  await page.waitForTimeout(5000)
  await page.screenshot({ path: 'testresult.png', fullPage: true })
  await browser.close()
  console.log(`All done, check the screenshot. ✨`)
})
```



Note that `puppeteer-stealth` features many patches for different detection techniques that can be customized and extended.

Alternatively, Scrapfly API automatically bypasses anti scraping protections using [anti scraping protection bypass](https://scrapfly.io/docs/scrape-api/anti-scraping-protection) feature



 

    



Scale Your Web Scraping

Anti-bot bypass, browser rendering, and rotating proxies, all in one API. Start with 1,000 free credits.

  No credit card required  1,000 free API credits  Anti-bot bypass included 

 [Start Free](https://scrapfly.io/register) [View Docs](https://scrapfly.io/docs/onboarding) 

 Not ready? Get our newsletter instead. 

 

## Explore this Article with AI

 [ ChatGPT ](https://chat.openai.com/?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-use-puppeteer-stealth-what-does-it-do) [ Gemini ](https://www.google.com/search?udm=50&aep=11&q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-use-puppeteer-stealth-what-does-it-do) [ Grok ](https://x.com/i/grok?text=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-use-puppeteer-stealth-what-does-it-do) [ Perplexity ](https://www.perplexity.ai/search/new?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-use-puppeteer-stealth-what-does-it-do) [ Claude ](https://claude.ai/new?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-use-puppeteer-stealth-what-does-it-do) 



 ## Related Articles

 [     

 blocking nodejs 

### Puppeteer Stealth: Complete Guide to Avoiding Detection

Complete guide to puppeteer-extra-plugin-stealth for avoiding bot detection. Learn how detection works, configure stealt...

 

 ](https://scrapfly.io/blog/posts/puppeteer-stealth-complete-guide) [  

 curl 

### How to Use cURL GET Requests

Here's everything you need to know about cURL GET requests and some common pitfalls you should avoid.

 

 ](https://scrapfly.io/blog/posts/how-to-use-curl-get-requests) [  

 python headless-browser 

### How to Scrape Dynamic Websites Using Headless Web Browsers

Introduction to using web automation tools such as Puppeteer, Playwright, Selenium and ScrapFly to render dynamic websit...

 

 ](https://scrapfly.io/blog/posts/scraping-using-browsers) 

  ## Related Questions

- [ Q How to use headless browsers with scrapy? ](https://scrapfly.io/blog/answers/how-to-use-headless-browsers-with-scrapy)
- [ Q What are some PhantomJS alternatives for automating browsers? ](https://scrapfly.io/blog/answers/what-are-some-phantomjs-alternatives)
- [ Q How to get page source in Puppeteer? ](https://scrapfly.io/blog/answers/how-to-get-page-source-in-puppeteer)
- [ Q 3 ways to install Python Requests library ](https://scrapfly.io/blog/answers/how-to-install-requests-python)
 
  



   



 Run headless browsers at scale, **1,000 free credits** [Start Free](https://scrapfly.io/register)