fetch
Fetch any web page and return clean markdown, HTML, or text. Handles JavaScript-rendered and Cloudflare-protected sites for reliable reading.
Instructions
Fetch a webpage and return clean markdown/html/text. Use whenever the agent needs to READ any web page - blogs, docs, articles, JS-rendered SPAs, Cloudflare-protected sites. Static pages are served over plain HTTP (~100ms tier:"http"); pages that need JS get the full browser (tier:"browser"). render_tier selects auto (default) / http (pure HTTP, refuses the upgrade) / browser (always the JS browser).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to fetch | |
| format | No | Output format: "markdown", "html", or "text" (default: markdown) | markdown |
| sanitize | No | Strip prompt-injection payloads from the text output (default true): zero-width/steganographic characters, instruction-shaped lines ("ignore previous instructions", chat markup tokens, CJK variants), and text hidden via opacity:0 / tiny fonts. A `sanitize_report` field counts what was removed — stripping is observable, never silent. Set false for raw output. | |
| selector | No | CSS selector to extract specific content | |
| max_chars | No | Maximum characters to return (default: 50000) | |
| use_proxy | No | Route through proxy (for blocked foreign sites) | |
| wait_secs | No | Seconds to wait for JS rendering | |
| js_extract | No | JS expression to extract from the page after rendering | |
| capture_xhr | No | Capture script-initiated API responses: a list of URL substrings (e.g. ["/api/"]) whose matching fetch/XHR bodies come back in an `xhr` array; an empty list captures every XHR/Fetch. Forces browser rendering (script-initiated requests only exist after JS runs). | |
| render_tier | No | Rendering strategy: "auto" (default), "http", or "browser" | auto |
| tls_fingerprint | No | TLS fingerprint override (stealth mode only): "chrome145", "firefox133", etc. | |
| auto_bypass_challenge | No | Auto-detect and bypass Cloudflare Turnstile challenges (default: true) |