Skip to main content
POST /v1/chat/completions Web search lives at the top level of the request body in web_search_options — not 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 settings in Console. If your project has web_tools.allowed_domains or web_tools.blocked_domains set, they apply to 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 September 30, 2026