Web Search
The web search tools allows the model to draw information from open sources for more accurate and relevant date responses. It can search through the entire internet or within a limited list of websites. You can enable the tool in the Responses API and Realtime API. For the prices, see Yandex AI Studio pricing policy.
With the tool on, the model itself decides whether or not it needs additional information to form a response. To allow the model to search through the internet when generating its responses, specify web_search in your request parameters. When connecting the tool via Responses API, you can specify up to 5 websites in the allowed_domains array. If no websites are listed, the model will search through the entire internet, which will take more time. You can additionally limit the search region by putting the region code in the region field of the user_location parameter.
response = client.responses.create(
model=f"gpt://{YANDEX_CLOUD_FOLDER}/{YANDEX_CLOUD_MODEL}",
input="Create a brief overview of the latest LLM news in 2025, only facts, no specualtion.",
tools=[
{
"type": "web_search",
"filters": {
"allowed_domains": [
"habr.ru"
],
"user_location": {
"region": "213",
}
}
}
],
temperature=0.3,
max_output_tokens=1000
)
The response, enriched by the internet search, contains the annotations object. Use it to track and show the data sources to the user. The url field of the annotations object contains the address of the website the information was found on. All other fields of the object are populated with default values for compatibility with OpenAI:
"annotations": [
{
"end_index": 0,
"start_index": 0,
"title": "",
"type": "url_citation",
"url": "www.rbc.ru"
},
{
"end_index": 0,
"start_index": 0,
"title": "",
"type": "url_citation",
"url": "ria.ru"
}
]
Possible use cases for the tool
The web search tool can prove useful in various scenarios:
- Updating reference information: Creating a summary of app store rule updates for this week.
- Competitive analysis: Gathering the competitors' innovations and roadmaps based on the information published on their websites.
- Fact-checking press releases: Verifying quotes and figures prior to publication.
- Trend radar: Compiling a quick news overview on a topic for a daily or weekly digest.
- Meeting preparation: Putting together a description of the client company ahead of the conference call.