Interface: OpenAICompletionsWebSearchUserLocation
@providerprotocol/ai / openai / OpenAICompletionsWebSearchUserLocation
Interface: OpenAICompletionsWebSearchUserLocation
Section titled “Interface: OpenAICompletionsWebSearchUserLocation”Defined in: src/providers/openai/types.ts:78
User location for web search context in the Chat Completions API.
Used to localize web search results based on the user’s approximate location.
In the Completions API, location fields are nested under an approximate object.
OpenAIWebSearchUserLocation for the Responses API version
Properties
Section titled “Properties”approximate
Section titled “approximate”approximate:
object
Defined in: src/providers/openai/types.ts:82
Approximate location details
optionalcity:string
City name
country?
Section titled “country?”
optionalcountry:string
ISO 3166-1 country code (e.g., “US”)
region?
Section titled “region?”
optionalregion:string
Region/state name
timezone?
Section titled “timezone?”
optionaltimezone:string
IANA timezone (e.g., “America/New_York”)
type:
"approximate"
Defined in: src/providers/openai/types.ts:80
Location type - must be ‘approximate’