stealth_mode
Bypass Cloudflare, Datadome, and bot-detection blocks after 403/429/CAPTCHA failures. Renders pages in Playwright with randomized fingerprints and human-like behavior, respecting robots.txt.
Instructions
Use this when a site blocks normal scraping - Cloudflare, Datadome, or other bot-detection systems. Renders in a Playwright browser with randomized fingerprints, human behavior simulation, WebRTC/canvas spoofing. operation:"scrape" is the one-shot path: it creates a context, navigates, returns the requested formats and tears down. The create_context -> create_page -> cleanup operations remain for multi-step work. robots.txt is respected on every navigation. Not a first choice: try scrape first and switch here after a 403/429/CAPTCHA/challenge page or an empty shell. Cost: 5 credits per browser operation; configure, enable, disable, get_stats and cleanup cost 1. Example: stealth_mode({operation:"scrape", url:"https://example.com", formats:["markdown","links"]})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to scrape — required for operation:"scrape" | |
| engine | No | Browser engine: "playwright" (Chromium, default) or "camoufox" (Firefox-based, higher anti-detect score — install with npm install camoufox) | playwright |
| formats | No | Formats to return from operation:"scrape" (default: ["markdown"]). "screenshot" returns a crawlforge://screenshot/{id} resource URI. | |
| verbose | No | Return the full generated fingerprint from create_context instead of a summary | |
| wait_for | No | Extra wait after page load, in ms — for content that renders after DOMContentLoaded | |
| contextId | No | Browser context ID for page operations | |
| operation | No | Stealth operation to perform | configure |
| urlToTest | No | URL to navigate to when creating a page | |
| redact_pii | No | Redact personal data from the text this call returns, before it reaches your context window. true means the free regex pass over EMAIL, PHONE, FINANCIAL and SECRET. The result carries redaction:{entities,count}. Default: off | |
| stealthConfig | No | Stealth browser configuration with anti-detection settings | |
| respect_robots | No | Respect the target site's robots.txt (default: true). Setting this to false is honoured, returns a warning in the response, and is recorded against your API key — it is your decision, not a silent default. | |
| max_inline_chars | No | Largest result to return inline, in characters of its JSON. Over it, the call returns a preview plus a result_handle for read_result instead of the whole result (default 40,000; env CRAWLFORGE_MAX_INLINE_CHARS) |