Skip to main content
Chat Completions API enables search through the separate web_search_options request field. On this endpoint, search is not configured through chat tools[]. Use this page when your app already depends on Chat Completions and you want search without switching to Responses.

Request Shape

An empty object also enables search on providers that only need the flag itself:
The exact nested shape under web_search_options can vary by model family, so start simple unless your chosen client and model require a richer config.

Citations And Annotations

Search citations can be attached as annotations:
  • non-streaming: choices[0].message.annotations
  • streaming: choices[0].delta.annotations

Common mistakes

  • trying to enable search through tools[] instead of web_search_options
  • assuming every model supports the same optional search configuration fields
  • scraping citations out of plain text instead of reading annotations

Caveats

  • this endpoint uses web_search_options, not tools: [{"type":"web_search"}]
  • the exact nested shape under web_search_options still depends on the model family behind the compatibility layer
  • if you want the primary documented search workflow, use Responses Web Search