stealth_mode
Bypass Cloudflare, Datadome, and other bot-detection blocks by rendering pages in a real browser with randomized fingerprints and human-like behavior. Use after a normal scrape returns 403, 429, CAPTCHA, or an empty shell.
Instructions
Use this when a site blocks normal scraping - Cloudflare, Datadome, or other bot-detection systems. Renders in a real browser with randomized fingerprints, human behavior simulation, WebRTC/canvas spoofing - Camoufox (Firefox) when it is installed, Chromium otherwise, and the result names the one that ran. 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: "auto" (default — camoufox when it is installed, Chromium otherwise, and the result says which), "camoufox" (Firefox-based, higher anti-detect score; fails if not installed), or "chromium" ("playwright" is the same engine under its old name) | auto |
| 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) |