Web fetch is the precision counterpart to web search. Both are server tools — they run on Anthropic's infrastructure, so you add them to the tools array and receive finished results without executing anything yourself. The difference is intent: search answers "find me pages about X," while fetch answers "read me this page." Given a URL from the user, from an earlier search, or from your own prompt, Claude retrieves the content and reasons over the actual text rather than its recollection of it.
Versions and how fetch behaves
The current version is web_fetch_20260209, which — like its web search sibling — includes dynamic filtering: Claude can process fetched content in code before it enters the model's context window, keeping boilerplate and navigation cruft out of your token bill. No beta header is required. The _20260209 web tools require code_execution_20260120 or later alongside them, because the filtering runs in that sandbox. As with all server tools, multi-step fetching runs in a server-side loop with a default limit of 10 iterations; if a task hits the ceiling you get stop_reason: "pause_turn" and simply re-send the conversation to resume.
Size limits and content handling
Fetched pages consume input tokens like any other content, and pages vary wildly in size. The official pricing guidance offers useful mental math: an average 10 kB web page lands around 2,500 tokens, a 100 kB documentation page around 25,000 tokens, and a 500 kB PDF around 125,000 tokens. That last number should give you pause — a handful of large PDFs can eat a meaningful slice of even a large context window. The tool's max_content_tokens parameter caps how much fetched content is admitted, which is the right guardrail for agents that fetch URLs you don't control. For content-type specifics beyond HTML and PDF, check the official documentation for the current handling rules.
_20260209 web tools are present, the companion code execution tool is also free.When to prefer fetch over search
A simple decision rule covers most cases:
| Situation | Use |
|---|---|
| You (or the user) already have the URL | Fetch — no search fee, no irrelevant results |
| You need to discover which pages are relevant | Search first, then fetch promising hits |
| Monitoring a known page for changes | Fetch — deterministic target, predictable cost |
| Open-ended research question | Search + fetch together in one request |
Enabling both tools in one request is common and works well: Claude searches to find candidates, then fetches the one or two pages worth reading in full.
Platform availability
Web fetch follows the same 3P fault line as code execution: generally available on the first-party Claude API and Claude Platform on AWS, in beta on Microsoft Foundry, and not available on Amazon Bedrock or Google Vertex AI. Notably, Vertex AI carries the basic web search variant but no web fetch at all. On Bedrock or Vertex, the standard workaround is client-side: fetch the URL in your own code and pass the content to Claude as a document — you lose the convenience, keep the capability.
from anthropic import AnthropicAWS # Claude Platform on AWS
client = AnthropicAWS()
resp = client.messages.create(
model="claude-sonnet-5",
max_tokens=2048,
tools=[
{"type": "web_fetch_20260209", "name": "web_fetch"},
{"type": "code_execution_20260120", "name": "code_execution"},
],
messages=[{"role": "user", "content":
"Summarize the breaking changes at https://example.com/changelog"}],
)
One governance note: fetched pages are untrusted input and can contain adversarial text. Constrain which domains your application passes to the model where you can, and keep fetch-enabled agents away from unreviewed consequential actions.
Where to go next
Read the web search article for the discovery half of the pair, and code execution for the sandbox both 2026 web tools build on. Availability details live in the feature matrix.