OpenAI Web Search
Ask a question and get an OpenAI-model answer grounded in a live web search, with the underlying sources and URL citations, billed at exact cost.
input string (or message array) — and the endpoint injects a fixed, server-pinned model and the web_search tool for you; the model, tool and per-request search cap are server-controlled to keep cost bounded. The reply is a standard OpenAI Responses object: output[] contains web_search_call items (each a search that ran) and a message item with the answer text and URL citations, and the billed search count equals the number of web_search_call items. Billing is pay-as-you-go at exact cost: web_search_calls × $0.01 plus the model’s own token cost (fresh input = input_tokens − cached), with no markup. Use this when you want a written, cited answer grounded in current web content from an OpenAI model — for the Anthropic-model equivalent see post_anthropic_websearch_search, and for raw ranked links with extracted page text use post_tavily_search.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Your question or instruction, same format as the OpenAI Responses API input. A message array is also accepted.
"What are the three biggest AI announcements this week? Give one sentence each with sources."
Optional cap on the number of tokens generated in the answer.
1024
Optional high-level instructions to steer the answer's tone or format.
Response
A standard OpenAI Responses object. output[] interleaves web_search_call items and the cited answer message; the number of web_search_call items is the billed search count.