Date: July 30, 2025 We’re excited to announce a new userLocation parameter that lets you bias search results based on a user’s geographic region. The location is passed as an ISO 3166-1 alpha-2 country code (e.g., “fr” for France, “us” for the United States). If this field is provided, search will return results that are more relevant to users in the provided region.

When to Use Geolocation Filter

The userLocation parameter is particularly useful for:
  1. Multi-regional applications: Show users content that’s relevant to their region
  2. Language-specific content: Prioritizing content in regional languages
  3. Local discovery: Surface products or businesses relevant to the users region
Consider using geolocation filtering when the user’s physical location or regional context significantly impacts the relevance of search results.

How To Use Geolocation Filter

Here’s how to implement the new userLocation parameter:
result = exa.search_and_contents(
    "football rules",
    type="auto",
    livecrawl="never",
    userLocation="us", # ISO 3166-1 alpha-2 country code
    num_results=10
)

Response Structure Changes

The response structure remains unchanged - geolocation filtering affects result ranking and relevance scoring, but doesn’t modify the response format.

Need Help?

If you have any questions about location filtering or need help with your specific use case, please reach out to [email protected].