In short.
Anthropic’s web search documentation is a guide for developers building Claude apps that use current web sources, but compatibility and data-handling eligibility depend on configuration. It covers basic search, code-based result filtering and response inclusion controls across three tool versions. The stated Claude API price is $10 per 1,000 searches plus token charges. Detailed availability notes conflict with some broader statements on the page. No requests were executed, and accuracy, latency and token savings were not assessed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is the complete captured documentation page at [https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool.md], including its metadata, examples, pricing, availability notes and data-handling notices. Linked pages are excluded, including detailed retention rules, model references, domain-filtering rules and web fetch documentation. Conflicting availability statements are retained as limitations. No code or API request was executed; performance, deployment compatibility and actual data-handling behavior remain unassessed.
The overview
Identity
This is Anthropic’s documentation for its server-operated web search tool, which lets Claude obtain current web information and cite sources. The resource is an implementation guide rather than a separate application or downloadable search engine.
The source is the complete page at [https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool.md]. It covers the Messages API and Claude Managed Agents, including differences in configuration and platform availability.
Assessment
The guide is useful for developers who already use Claude and need answers grounded in changing information, such as recent announcements or current product details. It provides concrete request fields, SDK examples, response structures and error conditions rather than only describing benefits.
Its practical value is implementation guidance. It does not establish search completeness, citation accuracy, answer quality or production reliability. Those outcomes remain unassessed, and the page’s broad availability claims need to be read alongside its narrower exceptions.
Users
Beginners who can make an API request get examples in cURL, the Anthropic CLI, Python, TypeScript, C#, Go, Java, PHP and Ruby. They still need familiarity with API credentials, JSON requests and model responses; this page does not provide a complete introduction to those topics.
Experienced developers get details relevant to research assistants and agents: search limits, domain restrictions, code-based filtering, encrypted conversation content, streaming, batch requests and continuation after a paused turn.
Capabilities
The guide distinguishes three versions. web_search_20250305 provides basic search. web_search_20260209 adds dynamic filtering, where Claude writes and runs code to retain relevant search content before it reaches the model’s context. web_search_20260318 adds control over whether certain search blocks appear in the API response.
Developers can allow or block domains, supply an approximate location and cap searches with max_uses in the Messages API. Domain entries omit the URL scheme and may include a path; allowed_domains and blocked_domains cannot be combined. Location settings accept city, region, country or timezone, with at least one supplied.
Search responses include source citations and search usage counts. The page also documents streaming events and Message Batches support. Managed Agents exposes domain and location settings but does not provide max_uses, citations or cache_control settings.
Using it
Requirements
Messages API examples require an Anthropic API key, a supported model and a web_search entry in tools. Organization administrators can disable search or restrict its domains. Including the tool when organization-level search is disabled produces an HTTP 400 invalid_request_error.
The page recommends checking capabilities.server_tools.web_search.supported through the Models API before sending a request. It describes dynamic filtering as available with Claude 4.6 and later models and Claude Mythos Preview, while models without programmatic tool calling require allowed_callers set to ["direct"].
Hosting matters. Detailed notes restrict Google-managed Google Cloud and Azure-hosted Microsoft Foundry deployments to basic web_search_20250305. The body says Anthropic-hosted Foundry deployments support all versions, although the page’s opening platform metadata is less specific and lists Foundry as basic-only.
Mechanism
Claude decides whether to search from the prompt, Anthropic runs the searches, and Claude uses the results to produce a cited answer. A single request can involve several searches. Adding the tool enables search but does not ensure that every prompt triggers it; the guide describes prompt-based steering and max_uses as an upper limit.
Basic search loads search results into the model’s context. With web_search_20260209 and later, allowed_callers defaults to ["code_execution_20260120"]. The API automatically provisions the code execution needed for dynamic filtering, so developers do not need to add a separate code execution tool. Setting allowed_callers to ["direct"] bypasses that filtering route.
For subsequent conversation turns, return assistant content blocks unchanged, including encrypted_content and citation references. Missing or altered encrypted content causes a 400 validation error. A pause_turn response also requires sending the paused assistant message back unchanged to continue.
Setup
For the Messages API, add a tool object with name set to web_search and type set to the chosen version. Place max_uses, domain settings and user_location on that object. The documented requests use [https://api.anthropic.com/v1/messages], an x-api-key header and anthropic-version: 2026-10-21.
Start by matching the version to the model and hosting platform. For basic search, the page demonstrates web_search_20250305 with max_uses set to 5. For newer versions, choose whether to use the default filtering route or allowed_callers: ["direct"].
For Managed Agents, web search is on by default once the relevant toolset is added. Domain and location controls belong on the toolset’s web_search entry rather than being copied wholesale from the Messages API configuration.
Example
A documented starter request asks, “What is the weather in NYC?” using model claude-opus-5-5, max_tokens set to 4096 and a web_search_20250305 tool with max_uses set to 5. This illustrates enabling search for information that changes frequently; the limit permits up to five searches rather than requesting exactly five.
A separate example response illustrates a search for Claude Shannon’s birth date. It contains a server_tool_use block, a web_search_tool_result block and a final text block with source citations. These are documentation examples. No request was executed, and no resulting answer was independently checked.
Assessment & evidence
Limitations
The page’s general statement that search is available on every model and eligible for zero data retention and HIPAA is broader than its detailed model, hosting and dynamic-filtering exceptions. The detailed restrictions are essential when assessing compatibility; this source alone does not resolve every inconsistency.
Search errors can arrive inside an HTTP 200 response, so checking HTTP status alone misses failures. Error content is a single object, whereas successful results use a list; a successful search with no matches returns an empty list. Documented errors include rate limits, invalid queries, excessive query length, oversized requests, exhausted search limits and internal unavailability.
Failed searches consume max_uses even though they are not billed. The limit applies across requests that continue a turn, but the page gives an exception for earlier searches run through dynamic filtering. Exact rate limits, latency, search coverage and retrieval quality are not established.
Reasoning
The documented tradeoffs suggest basic direct search when broad hosting compatibility is important, and dynamic filtering when a supported workflow must process substantial search content. Filtering may reduce irrelevant input, but its value for a specific task remains unknown without workload measurements, and its data-handling exclusions can rule it out.
For web_search_20260318, response_inclusion: "excluded" removes nested search call and result pairs only when a completed code execution call consumed them. Direct-call results and results needed after an incomplete code execution call still appear in full. This controls response content rather than token charges, so smaller API responses should not be interpreted as demonstrated cost savings.
Alternatives
The page identifies Anthropic’s web fetch tool as an adjacent option for reading content from specific URLs: [https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool]. This suggests a different starting point when an application already knows which page it needs. The linked documentation was not included, so its detailed capabilities, restrictions and pricing are unknown here.
Within this guide, the main choices are basic search, newer versions called directly, and newer versions using dynamic filtering. For stable knowledge or analysis of content already supplied in the conversation, the page describes Claude answering without search. It does not compare competing search providers.
Evidence
The evidence consists of one complete capture of Anthropic’s Web search tool documentation at [https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool.md]. It includes feature metadata, configuration examples, response examples, pricing, availability tables and data-handling notices.
This is first-party documentation describing intended behavior, not independent performance evidence. Linked references, live model capabilities, console settings and actual API behavior were not inspected. Nothing was executed, and the page’s sample responses do not establish measured results.
Access & freshness
Costs
The stated Claude API price is $10 USD per 1,000 searches, equivalent to $0.01 per search, plus standard token charges. Five successful searches therefore cost $0.05 in search fees before tokens. Each search counts once regardless of how many results it returns; searches that fail with an error are not billed.
Search results count as input tokens during the search turn and in later conversation turns. Dynamic filtering is described as reducing irrelevant content and token use, but the page supplies no measured savings. Automatically provisioned filtering code execution adds no separate execution fee beyond standard token costs.
Message Batches search calls have the same search pricing, although organization limits can slow large batches. Exact model token charges, hosting-platform charges and total cost for a particular workload are unknown from this page. response_inclusion: "excluded" does not reduce token usage.
Rights
The page does not provide a license granting redistribution rights for the documentation, examples or retrieved third-party content. Those rights are unknown from this source. It says applications displaying API output directly to users must include citations to the original sources; for modified or combined outputs, it directs developers to determine appropriate citation display with their legal team.
The detailed data-handling table describes web search as eligible for zero data retention, with Covered Models excluded, and for HIPAA eligibility. Dynamic filtering is explicitly excluded from both. The linked model-specific retention requirements and allowed_callers guidance are outside this page’s scope, so eligibility for a particular deployment is not established here.
Freshness
The supplied page was captured on 2026-11-25 at 08:07:22.483 UTC. Its source revision is sha256:990c51f9d9cb08f39fff7e7a4504296b17219dc6b17e7c94f006106c8e22e639. The capture timestamp establishes when this text was obtained, not when Anthropic last updated it.
The page documents tool versions web_search_20250305, web_search_20260209 and web_search_20260318 and uses anthropic-version: 2026-10-21 in request examples. Availability, pricing and data-handling claims reflect this captured text; subsequent changes are unknown.
Actions
Before integrating, confirm the chosen model’s web search capability, organization settings and hosting-specific version support. Decide whether dynamic filtering’s exclusions fit the application’s data requirements, then configure domain restrictions, location and search limits where supported.
Implement handling for in-body search errors, empty results and pause_turn, and preserve encrypted content and citation references across turns. Keep original-source citations visible when displaying outputs directly.
An application evaluation should measure source relevance, citation support, latency and total search-plus-token cost on representative requests. These measurements have not been performed, so this guide alone cannot establish fitness for a particular production workload.
