Skip to content

Interface: OpenAICompletionsWebSearchUserLocation

@providerprotocol/ai


@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

approximate: object

Defined in: src/providers/openai/types.ts:82

Approximate location details

optional city: string

City name

optional country: string

ISO 3166-1 country code (e.g., “US”)

optional region: string

Region/state name

optional timezone: string

IANA timezone (e.g., “America/New_York”)


type: "approximate"

Defined in: src/providers/openai/types.ts:80

Location type - must be ‘approximate’