web_search (Anthropic)
Tool : A precise action the AI can call · requires anthropic-api
Server-side web search by Anthropic, with citations, enabled by a parameter in the API call.
The simplest way to give Claude access to fresh web content; the retrieved content may contain injected instructions.
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
Claude, Anthropic's model, has a knowledge cutoff date and cannot answer questions about recent news, real-time prices, or recent events. The web_search tool solves this by giving Claude direct access to the web at the time of the request.
In practice, you simply add the web_search type parameter to your API call. Claude decides on its own when to run a search based on the question, the API executes the search server-side at Anthropic, then returns the results to Claude, which formulates its final response with citations to the sources. This cycle can repeat multiple times within a single call.
Three versions are available: the basic version (web_search_20250305), a version with dynamic filtering that reduces token consumption by keeping only relevant content (web_search_20260209), and a version with response inclusion control useful for agentic workflows (web_search_20260318). Dynamic filtering relies on server-side code execution, provisioned automatically at no extra charge.
This tool is aimed at developers integrating Claude via the API who want their applications to respond with up-to-date information. It is not available to end users without API access, and is not accessible on Amazon Bedrock or certain specific cloud configurations.
What it offers
- ·Real-time server-side web search, triggered automatically by Claude based on the request (paid).
- ·Systematic source citations in the final response, with URL, title, and excerpt of cited text (paid).
- ·Dynamic filtering of results via code execution to reduce token consumption, available from version web_search_20260209 (paid).
- ·max_uses parameter to limit the number of searches per request and control costs (paid).
- ·Domain filtering via allowed_domains or blocked_domains to restrict or exclude certain sources (paid).
- ·Localization of results using the user_location parameter (city, region, country, timezone) (paid).
- ·Response inclusion control with response_inclusion to lighten responses in agentic workflows, available from version web_search_20260318 (paid).
In practice
- Price
- Paid · from 9 €
- 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 May 2025
How to install web_search (Anthropic)
pip install anthropic