Skip to content

Interface: AnthropicWebSearchTool

@providerprotocol/ai


@providerprotocol/ai / anthropic / AnthropicWebSearchTool

Defined in: src/providers/anthropic/types.ts:869

Web search tool for real-time web information retrieval.

Enables Claude to search the web for up-to-date information. No beta header required - this is a GA feature.

const tool: AnthropicWebSearchTool = {
type: 'web_search_20250305',
name: 'web_search',
max_uses: 5,
allowed_domains: ['wikipedia.org', 'github.com'],
};

optional allowed_domains: string[]

Defined in: src/providers/anthropic/types.ts:877

Whitelist domains (mutually exclusive with blocked_domains)


optional blocked_domains: string[]

Defined in: src/providers/anthropic/types.ts:879

Blacklist domains (mutually exclusive with allowed_domains)


optional max_uses: number

Defined in: src/providers/anthropic/types.ts:875

Maximum searches per request (default: unlimited)


name: "web_search"

Defined in: src/providers/anthropic/types.ts:873

Tool name - must be ‘web_search’


type: "web_search_20250305"

Defined in: src/providers/anthropic/types.ts:871

Tool type identifier


optional user_location: AnthropicUserLocation

Defined in: src/providers/anthropic/types.ts:881

User location for localized results