Allscreenshots Docs
Features

Stealth mode

Capture screenshots from websites with anti-bot protection

Stealth mode

Some websites use anti-bot systems that block automated browsers, returning blank pages, CAPTCHAs, or access denied errors. Stealth mode uses a specialized capture engine that bypasses these protections.

Usage

Add stealthMode: true to your request:

{
  "url": "https://protected-site.com",
  "stealthMode": true
}
ParameterTypeDefaultDescription
stealthModebooleanfalseRoute the capture through the stealth engine to bypass anti-bot detection

When to use it

Use stealth mode when standard capture returns:

  • Blank or empty pages — the site detected an automated browser and refused to render
  • CAPTCHA challenges — reCAPTCHA, hCaptcha, or Cloudflare challenges appear instead of the page
  • Access denied / 403 errors — the site blocks requests from known automation tools
  • Incomplete renders — critical content is missing because anti-bot scripts prevented loading

If standard capture works fine for your target URL, there's no need to enable stealth mode.

Stealth mode adds latency compared to standard capture. Only enable it for sites that need it.

CAPTCHA handling

When stealth mode detects a CAPTCHA on the page, it automatically retries the capture with exponential backoff (up to 3 attempts). If the CAPTCHA persists after all retries, the screenshot is still captured and returned.

Works with all capture options

Stealth mode is compatible with every other capture option — viewport, dark mode, custom CSS, selectors, blocking, timing, and output format all work as expected.

{
  "url": "https://protected-site.com",
  "stealthMode": true,
  "darkMode": true,
  "blockCookieBanners": true,
  "fullPage": true,
  "format": "webp"
}

Available on all endpoints

Stealth mode works across every capture method:

Examples

Basic stealth capture

curl -X POST 'https://api.allscreenshots.com/v1/screenshots' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://protected-site.com",
    "stealthMode": true
  }' --output screenshot.png

Stealth with blocking and dark mode

curl -X POST 'https://api.allscreenshots.com/v1/screenshots' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://protected-site.com",
    "stealthMode": true,
    "darkMode": true,
    "blockAds": true,
    "blockCookieBanners": true,
    "viewport": {
      "width": 1440,
      "height": 900
    }
  }' --output stealth-dark.png

Async stealth capture

curl -X POST 'https://api.allscreenshots.com/v1/screenshots/async' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://protected-site.com",
    "stealthMode": true,
    "webhookUrl": "https://your-server.com/webhook"
  }'

Best practices

Try standard capture first

Not all sites need stealth mode. Test with standard capture and only enable stealth if you see blank pages, CAPTCHAs, or access denied errors.

Allow extra time

Stealth captures take longer than standard captures. If you're using tight timeouts, consider increasing them:

{
  "stealthMode": true,
  "timeout": 60000
}

Use async for protected sites

Protected sites often load slowly. Combine stealth mode with async capture to avoid blocking your application:

{
  "stealthMode": true,
  "webhookUrl": "https://your-server.com/webhook"
}

On this page