WebSearchTool interface

Search the Internet for sources related to the prompt. Learn more about the web search tool.

Extends

Properties

custom_search_configuration

The project connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool.

description

Deprecated. This property is deprecated and will be removed in a future version.

filters

Filters to apply to web search results.

name

Deprecated. This property is deprecated and will be removed in a future version.

search_context_size

High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.

tool_configs

Deprecated. This property is deprecated and will be removed in a future version.

type

The type of the web search tool. One of web_search or web_search_2025_08_26.

user_location

The approximate location of the user for search relevance.

Property Details

custom_search_configuration

The project connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool.

custom_search_configuration?: WebSearchConfiguration

Property Value

description

Deprecated. This property is deprecated and will be removed in a future version.

description?: string

Property Value

string

filters

Filters to apply to web search results.

filters?: WebSearchToolFilters

Property Value

name

Deprecated. This property is deprecated and will be removed in a future version.

name?: string

Property Value

string

search_context_size

High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.

search_context_size?: "low" | "medium" | "high"

Property Value

"low" | "medium" | "high"

tool_configs

Deprecated. This property is deprecated and will be removed in a future version.

tool_configs?: Record<string, ToolConfig>

Property Value

Record<string, ToolConfig>

type

The type of the web search tool. One of web_search or web_search_2025_08_26.

type: "web_search"

Property Value

"web_search"

user_location

The approximate location of the user for search relevance.

user_location?: WebSearchApproximateLocation

Property Value