Basic Usage
To trigger a web search, simply include the"web_search": true flag in the JSON body of your request to the gateway.
Advanced Options
You can fine-tune the search behavior by passing additional sub-parameters in your JSON payload:Example: Localized search
Example: Limiting search uses
Example: Native web search (OpenAI)
When using"native" mode, the gateway delegates the web search to the provider’s built-in tool (e.g. OpenAI’s web_search_preview tool). This is useful when you want the provider to handle search context directly in its reasoning.
Native web search is only supported by certain providers (OpenAI, Anthropic, Google). When using native mode, the provider’s own search tool handles query execution and result formatting. The
web_search_level, web_search_lang, and web_search_country parameters are ignored in native mode since the provider controls search behavior.