o3-deep-research, o4-mini-deep-research, or gpt-5 with reasoning level set to high.tools array in an API request to generate content. Like any other tool, the model can choose to search the web or not based on the content of the input prompt.web_search_call output item with the ID of the search call, along with the action taken in web_search_call.action. The action is one of:search, which represents a web search. It will usually (but not always) includes the search query and domains which were searched. Search actions incur a tool call cost (see pricing).open_page, which represents a page being opened. Supported in reasoning models.find_in_page, which represents searching within a page. Supported in reasoning models.message output item containing:message.content[0].textmessage.content[0].annotations for the cited URLsurl_citation annotation object will contain the URL, title and location of the cited source.[
{
"type": "web_search_call",
"id": "ws_67c9fa0502748190b7dd390736892e100be649c1a5ff9609",
"status": "completed"
},
{
"id": "msg_67c9fa077e288190af08fdffda2e34f20be649c1a5ff9609",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "On March 6, 2025, several news...",
"annotations": [
{
"type": "url_citation",
"start_index": 2606,
"end_index": 2758,
"url": "https://...",
"title": "Title..."
}
]
}
]
}
]filters parameter you can set an allow-list of up to 20 URLs. When formatting URLs, omit the HTTP or HTTPS prefix. For example, use openai.com instead of https://openai.com/. This approach also includes subdomains in the search. Note that domain filtering is only available in the Responses API with the web_search tool.sources field. Unlike inline citations, which show only the most relevant references, sources returns the complete list of URLs the model consulted when forming its response. The number of sources is often greater than the number of citations. Real-time third-party feeds are also surfaced here and are labeled as oai-sports, oai-weather, or oai-finance. The sources field is available with both the web_search and web_search_preview tools.city and region fields are free text strings, like Minneapolis and Minnesota respectively.country field is a two-letter ISO country code, like US.timezone field is an IANA timezone like America/Chicago.web_search, as well as the earlier tool version, web_search_preview. To use web search in the Chat Completions API, use the specialized web search models gpt-5-search-api, gpt-4o-search-preview and gpt-4o-mini-search-preview.gpt-5 with minimal reasoning, and gpt-4.1-nano.gpt-4.1 and gpt-4.1-mini models).