OpenAI Web Search Location Should Use the Minimum Fields
OpenAI web search accepts an approximate user_location with optional city and country fields, plus region and timezone fields. The current Responses schema says omission or null defaults to the United States, while an approximate object with no location fields avoids that fallback. Applications should select the smallest field set that serves the route and block caller expansion. They should also record the normalized choice without turning search localization into a precise-location profile.

OpenAI's Responses web search tool accepts an approximate user_location object with optional city and country fields, plus region and timezone fields. The current schema adds a detail that changes route behavior. An omitted or null location defaults to the United States, while an approximate object without location fields avoids that fallback. An application that wants no localization therefore needs an explicit request shape, not a missing field.
TL;DR
- Use
{"type":"approximate"}with no location fields when the route needs no geographic localization and should avoid the US fallback. - Add only the field needed by the task. Country often comes first. Add region or city only when required, and treat timezone separately.
- Build location from trusted application context and prevent user input from expanding the approved field set.
- Record field presence and source. Record the policy version too, while keeping precise coordinates and street addresses out of this approximate object.
The schema has a geographic fallback
The current Responses create reference describes user_location as approximate. It accepts free-text city and region. Country uses a two-letter ISO code, while timezone uses an IANA name. The documented type is approximate. The same reference says omission or null defaults to the United States.
OpenAI also documents the way around that fallback: send an approximate object without location fields. The web search guide shows how location fields refine results based on geography. The application route chooses whether to send London, GB, a timezone, or no fields.
Make the choice explicit in compiled policy. A missing field can otherwise look like minimization in application code while the provider applies US localization. This is a good example of why OpenAI API gateway patterns should serialize route defaults deliberately.
Match each field to a search task
A national regulatory lookup may need only country: GB. A query for city transit disruptions may need city: London and possibly the country to resolve an ambiguous name. A request asking for current local business hours may benefit from timezone. A product-documentation search usually needs no geographic field at all.
Start with the empty approximate object. Add fields only after a route fixture shows a localization need. Document the purpose beside each allowed field. "Better results" is too vague because it can justify every available value and leaves reviewers unable to test the decision.
I would reject a design that copies a full account profile into user_location for every search. Search quality rarely needs four fields on every route, and convenience is a poor reason to turn model traffic into a location-distribution channel.
Trusted context should compile the object
The application should resolve location after authentication and route selection. Use a reviewed account setting or tenant configuration. An explicit user choice is also acceptable when the route permits. Avoid deriving this object from an untrusted prompt string. A user asking "find coffee in Paris" can put Paris in the search request text without gaining permission to alter stored profile context.
Policy can allow callers to narrow a configured location. For example, a route approved for country-level localization may accept no location or the configured country. It should reject added city or region. Timezone expansion should be rejected too. The provider adapter should receive the compiled object. Merging a caller-supplied object into a default would permit field expansion.
Keep precise latitude and longitude out of this field. Street addresses and device GPS values do not belong in it either. OpenAI documents an approximate schema made of city and country, plus region and timezone. A generic metadata merger that inserts extra keys creates an undocumented request and a larger disclosure surface.
Free text needs normalization and limits
City and region are documented as free-text strings. Country uses a two-letter ISO code, and timezone uses an IANA name. Validate those types before dispatch. Set application length ceilings for free-text fields because the current schema excerpts publish their format without giving these fields a route-specific business limit.
Normalization should preserve meaning without inventing geography. Trim surrounding whitespace and canonicalize an approved country code. Resolve timezone names against the application's current IANA data. Avoid silently converting a misspelled city to a different place. Reject uncertain values or omit localization according to route policy.
On an operations screen, show the compiled object exactly as the provider adapter will send it. Four grey labels reading country and city, plus region and timezone, make excess collection visible. Display an empty value as "no location fields" so it remains visible on the screen.
Evidence should retain the decision, not a profile copy
Record the authenticated application identity reference, route, requested fields, enforced fields, location source category, policy version, model, and allow or deny outcome. For many routes, a protected digest or a coarse value is enough. Retaining an entire user profile beside every search request defeats the minimization decision.
Test at least five shapes: omitted, null, empty approximate, country only, and all four documented fields. Confirm that omitted and null are rejected or replaced when the route must avoid the documented US fallback. Add malformed country and timezone values. Also test a caller attempt to add city to a country-only route.
Inspect the serialized Responses body and the decision record together. Per-route AI policies should identify who approved each field and when that approval expires. Search result relevance belongs in route fixtures, while location disclosure belongs in the policy review.
DeepInspect
DeepInspect can inspect user_location on authenticated user or agent Responses requests deliberately routed through its HTTP proxy. A per-route policy can replace omission with an empty approximate object, allow a country-only shape, reject undocumented keys, and block caller attempts to add city, region, or timezone.
The application owns consent, profile data, source accuracy, geographic normalization, and relevance testing. DeepInspect enforces the compiled field set at the routed LLM HTTP boundary and records the decision. Browser geolocation and device telemetry remain outside that boundary. Direct provider calls do too.
Book a demo today.
Frequently asked questions
- What happens when OpenAI user_location is omitted?
The current Responses create reference says an omitted or null web search location defaults to the United States. To avoid that fallback, it instructs clients to pass an object with
typeset toapproximateand no location fields.- Does approximate location accept coordinates?
The documented web search object lists city and country, plus region and timezone. It also requires the
approximatetype. Keep latitude and longitude out of this field. GPS data and street addresses do not belong in it either. Use only the documented shape and validate it before dispatch.- Is country alone enough for local web search?
It depends on the route's task. Country can serve national laws and services. It can also shape market results. City-level events may require a city, while timezone can help time-sensitive queries. Start with the smallest field set that passes representative relevance tests.
- Should the application store the location on every audit event?
Store enough evidence to explain the policy decision: fields present, source category, route, policy version, and a protected value or digest when required. Avoid copying full profiles or precise device location into each search event.