search help

Stealth mode allows you to emulate a real user's browser as closely as possible. This lets you bypass web scraping protections such as reCAPTCHA V3.

You can use stealth mode in the Apify app when using Web Scraper (apify/web-scraper), Puppeteer Scraper (apify/puppeteer-scraper). In addition, you can also use it in the Apify SDK.

In the Apify app

When using Web Scraper and Puppeteer Scraper, you can activate stealth mode in the Proxy and browser configuration input section.

In the Apify SDK

To use stealth mode, you'll need to use PuppeteerCrawler. All you need to do is specify the headless and stealth parameters in launchPuppeteerOptions as true.

const crawler = new Apify.PuppeteerCrawler({
requestList,
launchPuppeteerOptions: {
headless: true,
stealth: true,
useChrome: true,
},
handlePageFunction: async ({ request, $ }) => {
const title = $('title').text();
console.log(`The title of "${request.url}" is: ${title}.`);
},
});
await crawler.run();

For more details and to learn how to customize stealth mode, visit the Apify SDK documentation.


If you come across a website that still blocks your headless Chrome with stealth mode turned on, please share your feedback with us and we will try our best to improve it.

Did this answer your question?