Skip to main content
The Python SDK and docs are currently in beta. Report issues on GitHub.

Fields

FieldTypeRequiredDescriptionExample
enabledOptional[bool]:heavy_minus_sign:Set to false to disable the web-search plugin for this request. Defaults to true.
engineOptional[components.WebSearchEngine]:heavy_minus_sign:The search engine to use for web search.exa
exclude_domainsList[str]:heavy_minus_sign:A list of domains to exclude from web search results. Supports wildcards (e.g. “*.substack.com”) and path filtering (e.g. “openai.com/blog”).[
“example.com”,
“*.substack.com”,
“openai.com/blog”
]
idcomponents.WebSearchPluginID:heavy_check_mark:N/A
include_domainsList[str]:heavy_minus_sign:A list of domains to restrict web search results to. Supports wildcards (e.g. “*.substack.com”) and path filtering (e.g. “openai.com/blog”).[
“example.com”,
“*.substack.com”,
“openai.com/blog”
]
max_resultsOptional[int]:heavy_minus_sign:N/A
max_usesOptional[int]:heavy_minus_sign:Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic).
search_promptOptional[str]:heavy_minus_sign:N/A
user_locationOptionalNullable[components.UserLocation]:heavy_minus_sign:N/A{"city": "San Francisco","country": "USA","region": "California","timezone": "America/Los_Angeles","type": "approximate"}