Stealth Routes
Our stealth routes implement path-based semantics and leverage libraries that speak the Chrome DevTools Protocol to provide stronger anti-detection behavior than typical solutions such as puppeteer-stealth.
-
Stealth Route (Recommended) -
/stealth
Our recommended managed stealth environment with advanced anti-detection and realistic fingerprinting. This route applies comprehensive browser fingerprint mitigations and entropy injection for maximum effectiveness against bot detection systems. -
Chromium Stealth -
/chromium/stealth
Optimized for our platform, this route applies a comprehensive set of fingerprinting mitigations and entropy injection tailored to Chromium. It modifies browser APIs with subtle, realistic values to closely emulate a real browser and reduce detectability. Chromium's flexibility allows this route to be better tailored at stealthiness compared to/chrome/stealth. -
Chrome Stealth -
/chrome/stealth
Designed for the standard Chrome experience, this route delivers anti-detection protections adjusted to preserve Chrome's native behaviors, while also providing enhanced resistance to bot-detection systems.
Stealth routes work seamlessly today, and while we spoof features like WebGL, Canvas, or WebRTC, we make sure to minimize web-compatibility issues as much as possible. However, as more APIs are spoofed, certain automation tasks that depend on those technologies could theoretically see unexpected results. To give you flexibility, these advanced stealth options will be offered as toggleable settings so you can choose the right balance of stability and protection.
- Puppeteer
- Playwright
// Stealth (Recommended):
await puppeteer.connect({
browserWSEndpoint:
"wss://production-sfo.browserless.io/stealth?token=YOUR_API_TOKEN_HERE",
});
// Chromium:
await puppeteer.connect({
browserWSEndpoint:
"wss://production-sfo.browserless.io/chromium/stealth?token=YOUR_API_TOKEN_HERE",
});
// Chrome:
await puppeteer.connect({
browserWSEndpoint:
"wss://production-sfo.browserless.io/chrome/stealth?token=YOUR_API_TOKEN_HERE",
});
- Javascript
- Python
- Java
- C#
// Stealth (Recommended)
const stealthBrowser = await playwright.chromium.connectOverCDP(
"wss://production-sfo.browserless.io/stealth?token=YOUR_API_TOKEN_HERE"
);
// Chromium
const chromiumBrowser = await playwright.chromium.connectOverCDP(
"wss://production-sfo.browserless.io/chromium/stealth?token=YOUR_API_TOKEN_HERE"
);
// Chrome
const chromeBrowser = await playwright.chromium.connectOverCDP(
"wss://production-sfo.browserless.io/chrome/stealth?token=YOUR_API_TOKEN_HERE"
);
import asyncio
from playwright.async_api import async_playwright
STEALTH_URL = "wss://production-sfo.browserless.io/stealth?token=YOUR_API_TOKEN_HERE"
CHROMIUM_URL = "wss://production-sfo.browserless.io/chromium/stealth?token=YOUR_API_TOKEN_HERE"
CHROME_URL = "wss://production-sfo.browserless.io/chrome/stealth?token=YOUR_API_TOKEN_HERE"
async def main():
async with async_playwright() as p:
# Stealth (Recommended)
stealth_browser = await p.chromium.connect_over_cdp(STEALTH_URL)
# Chromium
chromium_browser = await p.chromium.connect_over_cdp(CHROMIUM_URL)
# Chrome
chrome_browser = await p.chromium.connect_over_cdp(CHROME_URL)
asyncio.run(main())
import com.microsoft.playwright.*;
public class PlaywrightConnectExample {
public static void main(String[] args) {
String STEALTH_URL = "wss://production-sfo.browserless.io/stealth?token=YOUR_API_TOKEN_HERE";
String CHROMIUM_URL = "wss://production-sfo.browserless.io/chromium/stealth?token=YOUR_API_TOKEN_HERE";
String CHROME_URL = "wss://production-sfo.browserless.io/chrome/stealth?token=YOUR_API_TOKEN_HERE";
try (Playwright playwright = Playwright.create()) {
// Stealth (Recommended)
Browser stealthBrowser = playwright.chromium().connectOverCDP(STEALTH_URL);
// Chromium
Browser chromiumBrowser = playwright.chromium().connectOverCDP(CHROMIUM_URL);
// Chrome
Browser chromeBrowser = playwright.chromium().connectOverCDP(CHROME_URL);
}
}
}
using System;
using System.Threading.Tasks;
using Microsoft.Playwright;
class Program
{
static async Task Main(string[] args)
{
string stealthUrl = "wss://production-sfo.browserless.io/stealth?token=YOUR_API_TOKEN_HERE";
string chromiumUrl = "wss://production-sfo.browserless.io/chromium/stealth?token=YOUR_API_TOKEN_HERE";
string chromeUrl = "wss://production-sfo.browserless.io/chrome/stealth?token=YOUR_API_TOKEN_HERE";
var playwright = await Playwright.CreateAsync();
// Stealth (Recommended)
var stealthBrowser = await playwright.Chromium.ConnectOverCDPAsync(stealthUrl);
// Chromium
var chromiumBrowser = await playwright.Chromium.ConnectOverCDPAsync(chromiumUrl);
// Chrome
var chromeBrowser = await playwright.Chromium.ConnectOverCDPAsync(chromeUrl);
}
}
Customizing Stealth Flags
Stealth routes apply a comprehensive set of Chrome flags by default to optimize anti-detection behavior. However, you can selectively remove specific flags if needed for your use case. This is particularly useful when:
- You have sufficient shared memory configured in your container and want to remove
--disable-dev-shm-usagefor better performance - You need to customize specific browser behaviors while maintaining other stealth protections
- You're troubleshooting compatibility issues with certain websites
Removing Stealth Flags
Use the ignoreDefaultArgs parameter in your launch options to remove specific stealth flags. This parameter accepts an array of flag names to exclude from the default stealth configuration.
Example: Remove --disable-dev-shm-usage flag
- Puppeteer
- Playwright
import puppeteer from "puppeteer-core";
const launchOptions = {
ignoreDefaultArgs: ["--disable-dev-shm-usage"]
};
const queryParams = new URLSearchParams({
token: 'YOUR_API_TOKEN_HERE',
launch: JSON.stringify(launchOptions)
});
const browser = await puppeteer.connect({
browserWSEndpoint: `wss://production-sfo.browserless.io/chromium/stealth?${queryParams.toString()}`,
});
import playwright from "playwright";
const launchOptions = {
ignoreDefaultArgs: ["--disable-dev-shm-usage"]
};
const queryParams = new URLSearchParams({
token: 'YOUR_API_TOKEN_HERE',
launch: JSON.stringify(launchOptions)
});
const browser = await playwright.chromium.connectOverCDP(
`wss://production-sfo.browserless.io/chromium/stealth?${queryParams.toString()}`
);
Example: Remove multiple flags
const launchOptions = {
ignoreDefaultArgs: [
"--disable-dev-shm-usage",
"--no-sandbox",
"--disable-infobars"
]
};
- All stealth flags are included by default for optimal anti-detection behavior
- Only flags explicitly listed in
ignoreDefaultArgswill be removed - Other stealth protections remain active even when specific flags are removed
- This feature is available on all stealth routes:
/stealth,/chromium/stealth, and/chrome/stealth
If you've configured sufficient shared memory (e.g., 2GB+) in your container, removing --disable-dev-shm-usage can improve performance on resource-intensive sites like Google Ads by enabling shared memory usage.
These routes incorporate many of the anti-detection mechanisms below, which you're free to try as well.
Additional Bot Detection Strategies
To further enhance your ability to bypass bot detection, consider the following approaches:
- Use Proxies: Many sites monitor IP addresses and may block data-center IPs or enforce rate limits. Browserless supports both built-in residential proxies and third-party proxies to help you avoid these restrictions. For setup details, see our Proxies documentation.
- Advanced Techniques: If proxies and standard stealth features aren't enough, contact us at support@browserless.io. We can assist with advanced solutions such as captcha solving, BQL methods, and specialized infrastructure available on our enterprise plans.
If you need more help or want to discuss your specific use case, don't hesitate to reach out. We're here to help you succeed with even the toughest bot detection challenges.