extract_web_content
Extract token-optimized, clean Markdown content from a target website for LLM consumption.
Instructions
Extract token-optimized, clean Markdown content from a target website for LLM consumption.
What it does Fetches a URL, strips HTML bloat (scripts, styles, inline SVGs, tracking tags, navigation, footers, redundant forms) and returns readable Markdown — cutting token usage by ~73% to 90% versus the raw page.
How to use
Use for any web page, article, or docs you want as LLM-ready text.
mode="fast" (default): native HTTP GET. mode="deep": headless Chrome with stealth fingerprint for JS-heavy or Cloudflare/Turnstile-protected pages.
css_selector scopes to a single element (e.g. "main", "article", "#content").
Pass headers/cookies for gated or geo-restricted content. Providing any of headers/cookies/proxy bypasses the SQLite cache.
No auth required. Respects robots/rate-limit via retry backoff.
Returns Markdown text. Cache hits are prefixed with a NOTE marker. Unsupported URLs (non-http, private IP, SSRF) fail with isError: true and a reason.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Target website URL to extract content from. | |
| mode | No | Crawl mode: 'fast' (native HTTP fetch) or 'deep' (headless Playwright browser with JS execution). | fast |
| proxy | No | Optional HTTP/SOCKS5 proxy URL (e.g. 'http://proxy.example.com:8080'). | |
| actions | No | Optional pre-crawl automation actions for mode='deep' (e.g. click cookie consent, load more, scrolling). | |
| cookies | No | Optional custom HTTP cookies key-value dictionary. | |
| headers | No | Optional custom HTTP request headers key-value dictionary. | |
| image_mode | No | Image handling: 'ignore' (omit images), 'alt_only' (> 🖼️ *[Imagem: alt]*), or 'markdown' (). Default: ignore. | ignore |
| link_format | No | Link formatting: 'inline' ([text](url)), 'references' ([text][1] footnote citations at end), or 'strip' (plain text). Default: inline. | inline |
| max_retries | No | Maximum retry attempts for transient errors or rate limits (default: 3). | |
| css_selector | No | Optional CSS selector to scope content extraction to a specific HTML node (e.g. 'main', 'article'). |