Follow Discord
Sweep 06 Nov 2026 · 01:32Z Build v2.1.319 537 read Stable v2.1.311 Latest v2.1.319 Next v2.1.319 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

web-fetch-tool changedagents-and-tools/tool-use/web-fetch-tool

Nearest release: v2.1.319, published an hour 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+27added
Lines−32removed
From line 65 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits25to this page, all time

The whole hunk

from line 65, old and new numbered
/
lines
from line 65
6565 If data exfiltration is a concern, consider:
6666 
6767 * Disabling the web fetch tool entirely
68 * Using the `max_uses` parameter to limit the number of requests
68 * Using the [`max_uses`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#max-uses) parameter to limit the number of fetches in a turn
6969 * Using the `allowed_domains` parameter to restrict to known safe domains
7070 * Using the `url_sources` parameter to stop client-side tool results from counting as a source (see [URL sources](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#url-sources))
7171</Warning>
from line 136
136136 ```
137137 
138138 ```bash CLI
139 ant messages create <<'YAML'
140 model: claude-opus-5-5
141 max_tokens: 4096
142 messages:
143 - role: user
144 content: >-
145 Fetch the content at https://example.com/research-paper
146 and extract the key findings.
147 tools:
148 - type: web_fetch_20260318
149 name: web_fetch
150 YAML
139 ant messages create \
140 --model claude-opus-5-5 \
141 --max-tokens 4096 \
142 --message '{role: user, content: "Fetch the content at https://example.com/research-paper and extract the key findings."}' \
143 --tool '{type: web_fetch_20260318, name: web_fetch}'
151144 ```
152145 
153146 ```python Python
from line 239
246239 messages: [
247240 ['role' => 'user', 'content' => 'Fetch the content at https://example.com/research-paper and extract the key findings.']
248241 ],
249 model: 'claude-opus-5-5',
242 model: Model::CLAUDE_OPUS_5_5,
250243 tools: [[
251244 'type' => 'web_fetch_20260318',
252245 'name' => 'web_fetch',
from line 252
259252 client = Anthropic::Client.new
260253 
261254 message = client.messages.create(
262 model: "claude-opus-5-5",
255 model: Anthropic::Model::CLAUDE_OPUS_5_5,
263256 max_tokens: 4096,
264257 messages: [
265258 { role: "user", content: "Fetch the content at https://example.com/research-paper and extract the key findings." }
from line 284
291284 -H "content-type: application/json" \
292285 -d '{
293286 "model": "claude-opus-5-5",
294 "max_tokens": 1024,
287 "max_tokens": 4096,
295288 "messages": [
296289 {
297290 "role": "user",
from line 302
309302 ```bash CLI
310303 ant messages create \
311304 --model claude-opus-5-5 \
312 --max-tokens 1024 \
305 --max-tokens 4096 \
313306 --message '{role: user, content: "Please analyze the content at https://example.com/article"}' \
314307 --tool '{type: web_fetch_20250910, name: web_fetch, max_uses: 5}'
315308 ```
from line 312
319312 
320313 response = client.messages.create(
321314 model="claude-opus-5-5",
322 max_tokens=1024,
315 max_tokens=4096,
323316 messages=[
324317 {
325318 "role": "user",
from line 329
336329 
337330 const response = await client.messages.create({
338331 model: "claude-opus-5-5",
339 max_tokens: 1024,
332 max_tokens: 4096,
340333 messages: [
341334 {
342335 role: "user",
from line 354
361354 var parameters = new MessageCreateParams
362355 {
363356 Model = Model.ClaudeOpus5_5,
364 MaxTokens = 1024,
357 MaxTokens = 4096,
365358 Messages = [new UserMessageParam { Content = "Please analyze the content at https://example.com/article" }],
366359 Tools = [new ToolUnion(new WebFetchTool20250910() { MaxUses = 5 })]
367360 };
from line 368
375368 
376369 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
377370 Model: anthropic.ModelClaudeOpus5_5,
378 MaxTokens: 1024,
371 MaxTokens: 4096,
379372 Messages: []anthropic.MessageParam{
380373 anthropic.NewUserMessage(anthropic.NewTextBlock("Please analyze the content at https://example.com/article")),
381374 },
from line 392
399392 
400393 MessageCreateParams params = MessageCreateParams.builder()
401394 .model(Model.CLAUDE_OPUS_5_5)
402 .maxTokens(1024L)
395 .maxTokens(4096L)
403396 .addUserMessage("Please analyze the content at https://example.com/article")
404397 .addTool(WebFetchTool20250910.builder()
405398 .maxUses(5L)
from line 408
415408 $client = new Client();
416409 
417410 $message = $client->messages->create(
418 maxTokens: 1024,
411 maxTokens: 4096,
419412 messages: [
420413 ['role' => 'user', 'content' => 'Please analyze the content at https://example.com/article']
421414 ],
422 model: 'claude-opus-5-5',
415 model: Model::CLAUDE_OPUS_5_5,
423416 tools: [[
424417 'type' => 'web_fetch_20250910',
425418 'name' => 'web_fetch',
from line 426
433426 client = Anthropic::Client.new
434427 
435428 message = client.messages.create(
436 model: "claude-opus-5-5",
437 max_tokens: 1024,
429 model: Anthropic::Model::CLAUDE_OPUS_5_5,
430 max_tokens: 4096,
438431 messages: [
439432 { role: "user", content: "Please analyze the content at https://example.com/article" }
440433 ],
from line 450
457450 "type": "web_fetch_20250910",
458451 "name": "web_fetch",
459452 
460 // Optional: Limit the number of fetches for each request
453 // Optional: Limit the number of fetches
461454 "max_uses": 10,
462455 
463456 // Optional: Only fetch from these domains
from line 478
485478 
486479### Max uses
487480 
488The `max_uses` parameter limits the number of web fetches performed. Failed fetches count against the limit. If Claude attempts more fetches than allowed, the `web_fetch_tool_result` is an error with the `max_uses_exceeded` error code. There is currently no default limit.
481The `max_uses` parameter limits the number of web fetches in a single turn. Failed fetches count against the limit. If Claude calls web fetch directly more times than allowed, the `web_fetch_tool_result` is an error with the `max_uses_exceeded` error code. If Claude calls web fetch from code execution more times than allowed, the code execution run ends with an error. There is no default limit.
489482 
483A turn can span several requests. A request continues a turn when it resumes after [`pause_turn`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#the-server-side-loop-and-pause-turn) or when its last message contains only `tool_result` blocks. Fetches from earlier requests in that turn count against the limit, unless Claude ran them from code execution through [dynamic filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#dynamic-filtering).
484 
490485### Domain filtering
491486 
492487For domain filtering with `allowed_domains` and `blocked_domains`, see [Server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#domain-filtering).
from line 522
527522 Requires `web_fetch_20260318` or later.
528523</Note>
529524 
530The `response_inclusion` parameter controls how fetch result blocks appear in the API response when the result was consumed by a completed [code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) call in the same turn. Set `"response_inclusion": "excluded"` to drop those nested `server_tool_use` and result block pairs entirely from the response, reducing output token costs for agentic workflows that don’t need to echo raw page content back to the client. The default is `"full"`. Results from direct calls, or from code execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.
525The `response_inclusion` parameter controls how fetch result blocks appear in the API response when a completed [code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) call in the same response consumed the result. Set `"response_inclusion": "excluded"` to drop those nested `server_tool_use` and result block pairs entirely from the response, for agentic workflows that don’t need the raw page content. Token usage is unaffected, because Claude reads the code’s output rather than these blocks. The default is `"full"`. The API always returns results from direct calls, or from code execution calls that paused before completing, in full so that you can send them back in the next request.
531526 
532527```json
533528{
from line 927
932927 messages: [
933928 ['role' => 'user', 'content' => 'Find recent articles about quantum computing and analyze the most relevant one in detail']
934929 ],
935 model: 'claude-opus-5-5',
930 model: Model::CLAUDE_OPUS_5_5,
936931 tools: [
937932 [
938933 'type' => 'web_search_20250305',
from line 949
954949 client = Anthropic::Client.new
955950 
956951 message = client.messages.create(
957 model: "claude-opus-5-5",
952 model: Anthropic::Model::CLAUDE_OPUS_5_5,
958953 max_tokens: 4096,
959954 messages: [
960955 { role: "user", content: "Find recent articles about quantum computing and analyze the most relevant one in detail" }
from line 1014
10191014 
10201015## Batch requests
10211016 
1022You can include the web fetch tool in the [Messages Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing). Web fetch tool calls through the Messages Batches API are priced the same as those in regular Messages API requests.
1017You can include the web fetch tool in the [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing). Web fetch tool calls through the Message Batches API are priced the same as those in regular Messages API requests.
10231018 
10241019## Usage and pricing
10251020 
Feedback