ToolWebSearch20250305 - Python SDK
ToolWebSearch20250305 - Python SDK
ToolWebSearch20250305 method reference
ToolWebSearch20250305 - Python SDK
The Python SDK and docs are currently in beta. Report issues on GitHub.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
allowed_domains | List[str] | ➖ | N/A | |
blocked_domains | List[str] | ➖ | N/A | |
cache_control | Optional[components.AnthropicCacheControlDirective] | ➖ | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | {"type": "ephemeral"} |
max_uses | OptionalNullable[int] | ➖ | N/A | |
name | components.NameWebSearch1 | ✔️ | N/A | |
type | components.TypeWebSearch20250305 | ✔️ | N/A | |
user_location | OptionalNullable[components.AnthropicWebSearchToolUserLocation] | ➖ | N/A | {"city": "San Francisco","country": "US","region": "California","timezone": "America/Los_Angeles","type": "approximate"} |