Article
How Claude's Web Search Tool Cites Sources
Short answer
Claude’s web search tool lets Claude decide when a question needs current web content. It runs the searches and answers with citations attached (Anthropic (Claude docs)). Each citation carries the page’s URL, its title and up to 150 characters of the cited text (Anthropic (Claude docs)).
So if your page gets used, what travels with the answer is a short slice of your words. That’s worth knowing before you write the next one.
A scope note first. Everything below comes from Anthropic’s developer documentation for the web search tool in the Claude API. That page doesn’t describe the consumer Claude app, and it doesn’t name the search index behind the tool, so we won’t guess.
How Claude decides to search
The tool gives Claude direct access to real-time web content (Anthropic (Claude docs)). The documented flow is short:
- Claude determines when to search based on the prompt (Anthropic (Claude docs)).
- The API runs the searches and hands Claude the results, and this can repeat multiple times in a single request (Anthropic (Claude docs)).
- At the end of its turn, Claude gives a final response with cited sources (Anthropic (Claude docs)).
Claude searches when a request depends on information that is current, changing, or outside its training data (Anthropic (Claude docs)). The docs list examples like recent news, current prices or statistics, and information about specific organizations, people, or products that might have changed (Anthropic (Claude docs)). It answers directly without searching when the request draws on stable knowledge, such as established facts or math (Anthropic (Claude docs)).
Developers can nudge this. The docs say triggering is steerable through the system prompt, toward searching more readily or answering directly (Anthropic (Claude docs)). For a hard limit in the Messages API, they can use max_uses to cap searches per request (Managed Agents doesn’t offer it) (Anthropic (Claude docs)).
Our read: if your page explains something timeless, Claude may never search for that question at all. Pages about things that change (prices, product details, who runs what) sit right where the docs say a search is likely.
How the tool gets switched on
Web search is enabled for an organization unless an administrator has disabled it in the Claude Console, where they can also restrict which domains it searches (Anthropic (Claude docs)). In the Messages API, a developer adds a web_search tool to the request’s tools (Anthropic (Claude docs)). In Managed Agents, it’s on by default in the agent toolset (Anthropic (Claude docs)).
Here’s the basic request example from Anthropic’s docs:
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-opus-5-5",
max_tokens=1024,
messages=[{"role": "user", "content": "What's the weather in NYC?"}],
tools=[{"type": "web_search_20250305", "name": "web_search", "max_uses": 5}],
)
print(response)There are three versions of the tool: web_search_20250305 for basic search, web_search_20260209, which adds dynamic filtering, and web_search_20260318, which adds response inclusion control (Anthropic (Claude docs)).
The settings that shape what Claude sees
| Setting | Required? | What it does |
|---|---|---|
max_uses | Optional | Limits searches per request. Going over returns a max_uses_exceeded error (Anthropic (Claude docs)) |
allowed_domains | Optional | Only includes results from the listed domains (Anthropic (Claude docs)) |
blocked_domains | Optional | Never includes results from the listed domains (Anthropic (Claude docs)) |
user_location | Optional | Localizes results. Takes type: "approximate" plus at least one of city, region, country or timezone (Anthropic (Claude docs)) |
Watch out
Watch out: a developer can use allowed_domains or blocked_domains, not both, and a request with both gets a 400 error (Anthropic (Claude docs)).
Domain entries are bare domains with an optional path, like example.com/blog, without a scheme (Anthropic (Claude docs)). The country field takes a two-letter ISO 3166-1 alpha-2 code, and the API rejects an unsupported code with a 400 error (Anthropic (Claude docs)).
Our read: these filters belong to whoever builds the app, not to you. A developer can keep your domain out entirely, or limit Claude to a short list of sites, and nothing on your page changes that.
What comes back: results and citations
Each search result includes url, title, encrypted_content and page_age, which the docs describe as when the site was last updated (Anthropic (Claude docs)).
Citations are always enabled for web search (Anthropic (Claude docs)). Each citation (web_search_result_location) includes url, title, encrypted_index and cited_text, which holds up to 150 characters of the cited content (Anthropic (Claude docs)).
Note
Note: when apps show API outputs directly to end users, citations must be included to the original source (Anthropic (Claude docs)). If the output gets modified or combined with other material, the docs say to display citations based on consultation with a legal team (Anthropic (Claude docs)).
There’s also a filtering step worth understanding. With basic web search, every result is loaded into Claude’s context window, and much of it can be irrelevant (Anthropic (Claude docs)). With web_search_20260209 or later, Claude writes and runs code that filters the results first, so only relevant content reaches the context window (Anthropic (Claude docs)). Dynamic filtering is available with Claude 4.6 and later models and Claude Mythos Preview (Anthropic (Claude docs)).
Pricing and limits
Web search on the Claude API costs $10 USD per 1,000 searches, plus standard token costs for search-generated content (Anthropic (Claude docs)). Each search counts as one use regardless of how many results come back, and searches that hit an error aren’t billed (Anthropic (Claude docs)). Comparative or multi-entity research can use 10 or more searches (Anthropic (Claude docs)).
When the tool hits an error, the API still returns a 200 success response, with the error inside the response body (Anthropic (Claude docs)). Codes include too_many_requests and query_too_long (Anthropic (Claude docs)). A search that matches nothing returns an empty content list, not an error (Anthropic (Claude docs)).
Watch out
The catch: not every platform gets every version. On Claude Models on Google Cloud (Google managed), only the basic tool without dynamic filtering is available (Anthropic (Claude docs)). Microsoft Foundry deployments hosted on Azure also support only the basic tool (Anthropic (Claude docs)). The Batches API throttles web search requests per organization, so big batches can take longer (Anthropic (Claude docs)).
Our read: what this means for getting cited
None of this is a ranking guide. The docs don’t say how Claude picks which pages to cite, so anyone claiming a formula is selling something. (Here’s how Be In GEO works if you want our approach.) But the documented mechanics do hint at sensible writing habits.
| Write facts that survive being cut out | Our read: with cited_text capped at 150 characters, a sentence that only makes sense with the paragraph around it is a weak candidate. A line like Our studio is open 9 to 5, Monday to Friday works alone. A line like As mentioned above, those are our hours doesn’t. |
|---|---|
| Put the answer near the question | Our read: dynamic filtering keeps relevant content and drops the rest. A page that states its answer plainly under a matching heading gives that filter less to throw away than one burying the fact in paragraph six. |
| Keep changing details current and honest | Our read: searches lean toward things that change, and results carry a page_age field. Update prices and product details when they actually change. Fake “updated” dates on unchanged pages are a bad habit everywhere. |
| Accept what you can’t control | Our read: domain filters, location settings and search caps sit with the developer. Your job is making the page worth citing if it shows up. |
Key takeaway
What to do next
- List the questions about your business where the answer changes over time (prices, availability, product specs, team).
- For each one, find the page that answers it and check the answer appears in one plain sentence under 150 characters.
- Move that sentence near the top, under a heading that matches how people phrase the question.
- Set a reminder to update those pages when the facts change, and show the real date.
- Use the free worksheet to track which questions you’ve covered.
Get the worksheet
Want to see which sites AI answers cite for the questions your customers ask? Grab the free worksheet at beingeo.com/checklist. You’ll also get short emails with each new teardown.