fetch
Retrieve any URL and convert it to clean, LLM-ready markdown with metadata, link extraction, and prompt injection scanning—so you can safely feed web content to language models.
Instructions
Fetch a URL and return clean, LLM-ready markdown with metadata and prompt injection scanning.
Args: url: The URL to fetch. timeout: Request timeout in seconds. max_words: Optional word cap on extracted body content. strict: When True and high-risk injection is detected, the response is marked as an error. js: Use Playwright for JavaScript-rendered pages (requires playwright + chromium). links: Link extraction mode — "domains" (default) or "full" for all URLs with anchor text. auth_token: Bearer token for Authorization header (e.g. "my-api-key"). headers: Deprecated. Use auth_token instead. Custom HTTP headers to include in the request.
Returns: A structured dict with url, body (markdown), metadata, links, risk_level, injection_matches, sanitization stats, and edge case info.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| js | No | ||
| url | Yes | ||
| links | No | domains | |
| strict | No | ||
| headers | No | ||
| timeout | No | ||
| max_words | No | ||
| auth_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||