web-fetch-2025-09-10
in your API requests.Please use this form to provide feedback on the quality of the model responses, the API itself, or the quality of the documentation.max_uses
parameter to limit the number of requestsallowed_domains
parameter to restrict to known safe domainsclaude-opus-4-1-20250805
)claude-opus-4-20250514
)claude-sonnet-4-20250514
)claude-3-7-sonnet-20250219
)claude-3-5-sonnet-latest
)claude-3-5-haiku-latest
)max_uses
parameter limits the number of web fetches performed. If Claude attempts more fetches than allowed, the web_fetch_tool_result
will be an error with the max_uses_exceeded
error code. There is currently no default limit.
example.com
instead of https://example.com
)example.com
covers docs.example.com
)example.com/blog
)allowed_domains
or blocked_domains
, but not both in the same request.аmazon.com
(using Cyrillic ‘а’) may appear identical to amazon.com
but represents a different domain.When configuring domain allow/block lists:max_content_tokens
parameter limits the amount of content that will be included in the context. If the fetched content exceeds this limit, it will be truncated. This helps control token usage when fetching large documents.
max_content_tokens
parameter limit is approximate. The actual number of input tokens used can vary by a small amount."citations": {"enabled": true}
to enable Claude to cite specific passages from fetched documents.
url
: The URL that was fetchedcontent
: A document block containing the fetched contentretrieved_at
: Timestamp when the content was retrievedinvalid_input
: Invalid URL formaturl_too_long
: URL exceeds maximum length (250 characters)url_not_allowed
: URL blocked by domain filtering rules and model restrictionsurl_not_accessible
: Failed to fetch content (HTTP error)too_many_requests
: Rate limit exceededunsupported_content_type
: Content type not supported (only text and PDF)max_uses_exceeded
: Maximum web fetch tool uses exceededunavailable
: An internal error occurredcache_control
breakpoints in your request. Cached fetch results can be reused across conversation turns.
max_content_tokens
parameter to set appropriate limits based on your use case and budget considerations.
Example token usage for typical content: