Skip to content

Interface: OpenAIWebSearchUserLocation

@providerprotocol/ai


@providerprotocol/ai / openai / OpenAIWebSearchUserLocation

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

User location for web search context in the Responses API.

Used to localize web search results based on the user’s approximate location. In the Responses API, location fields are at the same level as the type field.

OpenAICompletionsWebSearchUserLocation for the Chat Completions API version

optional city: string

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

City name


optional country: string

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

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


optional region: string

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

Region/state name


optional timezone: string

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

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


type: "approximate"

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

Location type - must be ‘approximate’