Skip to main content
POST /v1/chat/completions Web search lives at the top level of the request body in web_search_optionsnot inside the tools array. The two are mutually exclusive: a request with both returns 400.

Request

Options

Domain restrictions

OpenAI’s Chat Completions spec does not define a native per-request domain filter for web_search_options. Domain restrictions come from one place: Project-level allow/block via Policy Gateway. If your project has web_tools.allowed_domains or web_tools.blocked_domains set, the gateway enforces them server-side on every search made through this surface. Configure them per project in the console under Project → Web tools. If you need per-request domain filters, use the Responses API or Anthropic Messages surfaces.
Last modified on April 21, 2026