Skip to content

Web Fetch

IDweb_fetch
CategoryNetwork
FeaturesNone
DependenciesNone

Fetch content from URLs and convert HTML to markdown or plain text. Powered by fetchkit with built-in SSRF protection.

Fetch a URL and return its content.

ParameterTypeRequiredDescription
urlstringyesURL to fetch
methodstringnoHTTP method (default: GET)
as_markdownbooleannoConvert HTML to markdown
as_textbooleannoConvert HTML to plain text

Returns: content body, status code, metadata (size, content type, filename, last modified).

  • Research — fetch documentation, API references, or web articles
  • Data collection — retrieve JSON/CSV data from public APIs
  • Content extraction — convert web pages to clean markdown for processing
  • Link verification — check if URLs are reachable and inspect response metadata
User: Summarize the Python 3.12 changelog
Agent:
→ web_fetch({ url: "https://docs.python.org/3/whatsnew/3.12.html", as_markdown: true })
← (markdown content of the changelog page)
"Python 3.12 introduces several key changes: ..."
  • Timeouts: 1s for first byte, 30s for body. Partial content returned on body timeout.
  • Binary content: Images, PDFs, etc. return metadata only (content type, size) — not the binary data.
  • SSRF protection: Private IPs (loopback, RFC1918, link-local, CGNAT) are blocked by default with DNS pinning to prevent rebinding attacks.
  • Excessive newlines: Automatically filtered from converted content.