web_fetch (Anthropic)
Tool : A precise action the AI can call · requires anthropic-api
Fetches and reads a page or PDF at a given URL.
Useful alongside web_search; it is the classic indirect injection vector and should be scoped by domain.
Security reflects where data goes, requested permissions and incidents on record at the verification date. It is not a guarantee of zero risk: check the deployment mode and the connections you enable.
What it does, concretely
When an agent or application needs to read the content of a web page or PDF document at a specific address, it requires a mechanism to retrieve that content and pass it to the model without the developer having to manage network requests manually. That is exactly what web_fetch solves.
In practice, you add the tool to your API request and Claude decides on its own when to trigger a fetch, based on URLs present in the conversation. The API performs the request server-side, inserts the text content into the context, and Claude can then analyse, summarise or cite that content. For PDFs, the content is returned as base64-encoded data and processed like a directly attached document. Recent versions of the tool allow Claude to write and execute code to filter fetched content before it enters the context window, reducing token consumption.
This tool is aimed at developers building agents or automation pipelines via the Claude API who need the model to read documentation pages, articles or PDFs at known URLs. It works well on its own or combined with web_search, which can first locate a resource before web_fetch reads its content.
It is not suited to pages rendered dynamically by JavaScript, interactive forms or interfaces requiring a real browser: for those cases, the browser_use tool is more appropriate. It is also not available on Amazon Bedrock or Google Cloud, and Azure-hosted deployments on Microsoft Foundry only have access to the basic version without dynamic filtering.
What it offers
- ·Server-side retrieval of web pages and PDFs at a given URL, with no network code to write. (paid)
- ·Dynamic content filtering: Claude writes and executes code to keep only relevant passages before they enter the context, reducing token consumption (versions web_fetch_20260209 and later). (paid)
- ·allowed_domains parameter to restrict fetches to a list of approved domains. (paid)
- ·blocked_domains parameter to explicitly exclude certain domains (cannot be combined with allowed_domains). (paid)
- ·max_uses parameter to limit the number of fetches per request. (paid)
- ·max_content_tokens parameter to cap the amount of content loaded into the context. (paid)
- ·Optional citations of retrieved passages, enabled via the citations parameter. (paid)
- ·On-demand cache bypass via use_cache: false, to retrieve fresh content from rapidly changing sources (version web_fetch_20260309 and later). (paid)
In practice
- Price
- Paid
- Commercial use
- Commercial use: yes
- Available on
- api
- Host
- anthropic-api
- FR interface
- No
Security and data
- Rating
- Security: one caveat, see the card
- Capabilities
- readswritesexecutesnetwork
- Your data
- Data with the vendor
- Maintenance
- Active
Links and repository checked on 25 October 2026 · added on 1 August 2025
How to install web_fetch (Anthropic)
tools=[{"type":"web_fetch_20260209","name":"web_fetch"}]