Anchor Browser provides built-in stealth capabilities that help avoid detection by anti-bot systems and website fingerprinting. These features enable automated browsing that mimics human behavior and bypasses common detection mechanisms.
Extra Stealth mode is available on the Growth plan.
Extra Stealth Mode leverages a specialized Chrome browser environment that provides:
- 🔒 Advanced Anti-Detection - Bypass sophisticated bot detection systems and CAPTCHAs
- 🛡️ Automation Consistency - Maintain consistent access without getting blocked
- 👤 Human-Like Behavior - Mimic real user patterns to avoid suspicion
Quick start - Enable stealth features
Create a session with extra stealth enabled
Create a browser session with extra stealth features enabled using the SDK:Extra stealth mode requires proxy configuration to be active. If proxy is disabled, extra stealth will be automatically disabled by the system.Read more about Proxy Configuration import Anchorbrowser from "anchorbrowser";
const anchorClient = new Anchorbrowser()
const session = await anchorClient.sessions.create({
browser: {
extra_stealth: {
active: true
}
},
session: {
proxy: {
active: true
}
}
});
console.log(session);
from anchorbrowser import Anchorbrowser
import os
anchorClient = Anchorbrowser(api_key=os.getenv("ANCHOR_API_KEY"))
session = anchorClient.sessions.create(
browser={
"extra_stealth": {
"active": True
}
},
session={
"proxy": {
"active": True
}
}
)
print(session)
Use the session for automated browsing
Once your stealth session is created, you can use it for automated browsing that bypasses common detection mechanisms:import Anchorbrowser from "anchorbrowser";
const anchorClient = new Anchorbrowser()
// Create stealth session
const session = await anchorClient.sessions.create({
browser: {
extra_stealth: {
active: true
}
},
session: {
proxy: {
active: true
}
}
})
// Use the session for automated tasks
const result = await anchorClient.agent.task(
"Navigate to a website and check if I'm detected as a bot",
{
sessionId: session.data.id
}
);
console.log(result);
from anchorbrowser import Anchorbrowser
import os
anchorClient = Anchorbrowser(api_key=os.getenv("ANCHOR_API_KEY"))
# Create stealth session
session = anchorClient.sessions.create(
browser={
"extra_stealth": {
"active": True
}
},
session={
"proxy": {
"active": True
}
}
)
# Use the session for automated tasks
result = anchorClient.agent.task(
session_options=session,
prompt="Navigate to a website and check if I'm detected as a bot"
)
print(result)
Using stealth with tasks
Save stealth settings on the task via task_default_browser_configuration — a one-time setup. Include browser.extra_stealth and an active session.proxy (required):
curl -X PATCH "https://api.anchorbrowser.io/v1/tools/{toolId}" \
-H "anchor-api-key: $ANCHOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"task_default_browser_configuration": {
"browser": { "extra_stealth": { "active": true } },
"session": { "proxy": { "active": true } }
}
}'
If you pass a session_id to /run, that session’s config is used instead. See Run a Task.
Usage with Profiles
Use stealth mode with saved browser profiles for persistent authenticated sessions:
import Anchorbrowser from "anchorbrowser";
const anchorClient = new Anchorbrowser()
const session = await anchorClient.sessions.create({
browser: {
extra_stealth: {
active: true
},
profile: {
name: 'stealth-profile',
persist: true // Only on Profile Creation
}
},
session: {
proxy: {
active: true
}
}
})
console.log(session)
from anchorbrowser import Anchorbrowser
import os
anchorClient = Anchorbrowser(api_key=os.getenv("ANCHOR_API_KEY"))
session = anchorClient.sessions.create(
browser={
"extra_stealth": {
"active": True
},
"profile": {
"name": "stealth-profile",
"persist": true # Only on Profile Creation
}
},
session={
"proxy": {
"active": True
}
}
)
print(session)
Enabling Console Logs
When extra stealth mode is enabled, page.on('console') events are disabled by default to prevent detection. If you need to capture console output, you must explicitly enable it.
To receive console log events while using extra stealth, enable console_logs in your session configuration:
import Anchorbrowser from "anchorbrowser";
const anchorClient = new Anchorbrowser();
const session = await anchorClient.sessions.create({
browser: {
extra_stealth: { active: true },
console_logs: { active: true }
},
session: {
proxy: { active: true }
}
});
// Connect to the browser
const browser = await anchorClient.browser.connect(session.data.id);
const context = browser.contexts()[0];
const page = context.pages()[0];
// Now page.on('console') will work
page.on('console', (msg) => {
console.log(`[${msg.type()}] ${msg.text()}`);
});
await page.goto("https://example.com");
from anchorbrowser import Anchorbrowser
import os
anchor_client = Anchorbrowser(api_key=os.getenv("ANCHOR_API_KEY"))
session = anchor_client.sessions.create(
browser={
"extra_stealth": {"active": True},
"console_logs": {"active": True}
},
session={
"proxy": {"active": True}
}
)
# Connect to the browser
with anchor_client.browser.connect(session.data.id) as browser:
context = browser.contexts[0]
page = context.pages[0]
# Now page.on('console') will work
def handle_console(msg):
print(f"[{msg.type}] {msg.text}")
page.on("console", handle_console)
page.goto("https://example.com")
Catching Captcha Events
When using stealth mode with captcha solving enabled, you can listen to captcha lifecycle events via CDP (Chrome DevTools Protocol). This allows you to track when captchas are detected, solved, or failed.
import Anchorbrowser from "anchorbrowser";
const anchorClient = new Anchorbrowser();
// Create a session with extra stealth and captcha solving enabled
const session = await anchorClient.sessions.create({
browser: {
extra_stealth: { active: true },
captcha_solver: { active: true }
},
session: {
proxy: { active: true }
}
});
// Connect to the browser
const browser = await anchorClient.browser.connect(session.data.id);
const context = browser.contexts()[0];
const page = context.pages()[0];
// Create CDP session and listen to captcha events
const client = await context.newCDPSession(page);
client.on('Captcha.lifecycle', (event) => {
if (event.name === 'detected') {
console.log(`${event.captchaType} captcha detected on ${event.url}`);
}
if (event.name === 'solved') {
console.log(`Captcha solved in ${event.timeToSolve}ms`);
}
if (event.name === 'failed') {
console.log(`Captcha failed: ${event.error}`);
}
});
// Navigate to a page with captcha
await page.goto("https://example.com");
from anchorbrowser import Anchorbrowser
import os
anchor_client = Anchorbrowser(api_key=os.getenv("ANCHOR_API_KEY"))
# Create a session with extra stealth and captcha solving enabled
session = anchor_client.sessions.create(
browser={
"extra_stealth": {"active": True},
"captcha_solver": {"active": True}
},
session={
"proxy": {"active": True}
}
)
# Connect to the browser
with anchor_client.browser.connect(session.data.id) as browser:
context = browser.contexts[0]
page = context.pages[0]
# Create CDP session and listen to captcha events
client = context.new_cdp_session(page)
def handle_captcha_event(event):
if event["name"] == "detected":
print(f"{event['captchaType']} captcha detected on {event['url']}")
if event["name"] == "solved":
print(f"Captcha solved in {event['timeToSolve']}ms")
if event["name"] == "failed":
print(f"Captcha failed: {event['error']}")
client.on("Captcha.lifecycle", handle_captcha_event)
# Navigate to a page with captcha
page.goto("https://example.com")
Event Types
| Event Name | Description | Properties |
|---|
detected | Fired when a captcha is detected on the page | captchaType, url |
solved | Fired when the captcha is successfully solved | timeToSolve (in milliseconds) |
failed | Fired when captcha solving fails | error |