Skip to main content
Web fetch lets the model pull a specific URL and read its contents server-side. Available on the Anthropic messages API only.

Usage

client.messages.create(
    model="abliterated-model",
    max_tokens=4096,
    tools=[{
        "type": "web_fetch_2025_03_05",
        "name": "web_fetch",
        "max_uses": 3,
    }],
    messages=[{"role": "user", "content": "Summarize https://example.com/post"}],
)

Response blocks

Fetched pages return as web_fetch_tool_result blocks:
"content": [
  {"type": "server_tool_use", "id": "srvtoolu_...", "name": "web_fetch", "input": {"url": "https://example.com/post"}},
  {"type": "web_fetch_tool_result", "tool_use_id": "srvtoolu_...", "content": {
    "type": "web_fetch_result",
    "url": "https://example.com/post",
    "content": [{"type": "text", "text": "..."}]
  }},
  {"type": "text", "text": "The post argues..."}
]

Not available on OpenAI

Web fetch is not implemented on /v1/chat/completions or /v1/responses. For those surfaces, use web search and let the model pick a URL to cite.

Domain allow/block

Same as web search — projects can restrict reachable domains via Policy Gateway. See onboarding.