Web Search
This document explains how to use the Web Search feature on the Infron platform.
Overview
Web Search allows an AI model to access real-time web information while generating an answer, enabling more accurate and up-to-date responses. This feature is particularly useful for:
Querying breaking news and current events
Getting the latest product information and pricing
Looking up dynamic data such as weather and stock quotes
Accessing the latest technical documentation and resources
Supported Protocols
Chat Completions (OpenAI-compatible)
/v1/chat/completions
web_search_options
Messages (Anthropic-compatible)
/v1/messages
web_search_20250305 within tools
Responses (OpenAI Responses)
/v1/responses
web_search family within tools
Web Search - Chat Completions API
The Chat Completions API enables Web Search via the web_search_options parameter.
Parameters
web_search_options
object
No
Web search configuration
web_search_options.search_context_size
string
No
Search context size:
lowmediumhigh
web_search_options.user_location
object
No
User location info for localized search results
web_search_options.user_location.type
string
Yes
Location type, fixed as approximate
web_search_options.user_location.city
string
No
City name
web_search_options.user_location.country
string
No
Country code (2-letter ISO, e.g. CN, US)
web_search_options.user_location.region
string
No
Region/province
web_search_options.user_location.timezone
string
No
Timezone (IANA format, e.g. Asia/Shanghai)
Example
Response example,
Last updated