Web search tool

Web search is a built-in tool of the Responses API; the model searches the web on its own when it needs current information.

Using the web search tool

Declare web_search in tools:

json
{
  "model": "gpt-5.6-sol",
  "input": "What is the weather in Beijing today? Search the web",
  "tools": [{"type": "web_search"}]
}

Response with annotations

The output array contains reasoning, web_search_call (the search the model ran), and the final message in order; you do not need to handle the search itself, just read the output_text of the message.

Ready? Three steps to startLog in to the console · top up · create an API key
DiscordGet community help instantly
Web search tool · Docs