web-search-tool changedagents-and-tools/tool-use/web-search-tool
Nearest release: v2.1.310, published 11 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+5added
Lines−5removed
From line
415
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits18to this page, all time
The whole hunk
from line 415, old and new numbered
/
from line 415
415415 "type": "web_search_20250305",
416416 "name": "web_search",
417417
418 // Optional: Limit the number of searches per request
418 // Optional: Limit the number of searches for each request
419419 "max_uses": 5,
420420
421421 // Optional: Only include results from these domains.
from line 488
488488
489489Here's an example response structure:
490490
491```text Output
491```json Output
492492{
493493 "role": "assistant",
494494 "content": [
from line 583
583583
584584When the web search tool encounters an error (such as hitting rate limits), the Claude API still returns a 200 (success) response. The error is represented within the response body using the following structure:
585585
586```text Output wrap
586```json Output
587587{
588588 "type": "web_search_tool_result",
589589 "tool_use_id": "srvtoolu_a93jad",
from line 621
621621
622622With streaming enabled, you'll receive search events as part of the stream. There is a pause while the search runs:
623623
624```text Output
624```sse Output
625625event: message_start
626626data: {"type": "message_start", "message": {"id": "msg_abc123", "type": "message"}}
627627
from line 656
656656
657657Web search usage is charged in addition to token usage:
658658
659```text wrap
659```json
660660{
661661 "usage": {
662662 "input_tokens": 105,
No line in this hunk matches that.