Place search returns results from wrong country or unintended regions — how to restrict results to a specific area
Summary
To restrict place search results to a specific geographic region (country, city, or postal code), use the in= parameter with the HERE Geocoding and Search API v7. For example, adding in=countryCode:FRA limits all results to France. If you are using the legacy HERE Places API, use the addressFilter parameter — however, this API is deprecated and should not be used for new implementations.
Answer
To restrict place search results to a specific region, add the in= parameter to your HERE Geocoding and Search API v7 request. This enforces a hard geographic boundary (country, bounding box, or radius) rather than relying on proximity bias alone. For legacy Places API integrations, use addressFilter — but plan to migrate, as this API is deprecated.
Symptoms
You may need this article if you experience any of the following:
Place search results include locations from countries or cities you did not intend to searc
POI results appear from geographically distant or irrelevant regions (e.g., searching for "hotel" returns results from multiple countries)
You cannot limit search results to a single country, city, or postal code area
Results are based on proximity only and ignore administrative boundaries
sYou expected results only from one country (e.g., France or Germany) but received multi-country results
After specifying a location with at=, results still include POIs from neighboring countries
Legacy addressFilter parameter is not working as expected or returning inconsistent results
Root Cause
By default, HERE place search APIs return results ranked by:
Query relevance (text match)
Proximity to the specified at= coordinate
Without an explicit geographic filter (in= or addressFilter), the API does not enforce administrative boundaries. This means:
A search near a country border may return results from neighboring countries
A broad search without coordinates may return results globally
The at= parameter only biases ranking — it does not restrict the geographic scope
Solution
Option 1 : Recommended: HERE Geocoding and Search API v7
Use the in= parameter to define a geographic constraint. Supported filter types:
| Filter Type | Parameter Example | Effect |
| --- | --- | --- |
| Country code | in=countryCode:FRA | Restricts to France |
| Bounding box | in=bbox:13.1,52.3,13.8,52.7 | Restricts to a rectangular area (e.g., Berlin) |
| Circle | in=circle:52.52,13.405;r=5000 | Restricts to 5 km radius around a point |
| Structured query | qq=postalCode=75001;countryCode=FRA | Paris 1st arrondissement |
Example — Country filter:https://discover.search.hereapi.com/v1/discover ?q=hotel ∈=countryCode:FRA &apiKey=YOUR_API_KEY
This returns only hotel results within France.
Example — Bounding box (Berlin area):https://discover.search.hereapi.com/v1/discover ?q=restaurant ∈=bbox:13.1,52.3,13.8,52.7 &apiKey=YOUR_API_KEY
Example — Structured query (postal code):https://discover.search.hereapi.com/v1/discover ?qq=postalCode=10115;countryCode=DEU &q=pharmacy &apiKey=YOUR_API_KEY
Option 2 — Legacy (Deprecated): HERE Places API
⚠️ The HERE Places API is deprecated. It is no longer recommended for new implementations. Migrate to the Geocoding and Search API v7.
For existing integrations still using the Places API, use the addressFilter parameter:https://places.api.here.com/places/v1/discover/search ?at=46.9333,7.4699 &q=Hotel &addressFilter=countryCode=FRA &apikey=YOUR_API_KEY
Supported addressFilter values:countryCode (ISO 3166-1 alpha-3, e.g., FRA, DEU, USA)
city (e.g., city=Berlin)zipCode (e.g., zipCode=10115)
Troubleshooting
| Scenario | Likely Cause | Fix |
| --- | --- | --- |
| Results from neighboring countries despite at= parameter | at= sets proximity bias, not a hard boundary | Add in=countryCode:XXX to enforce a boundary |
| in=countryCode filter seems ignored | Incorrect country code format | Use ISO 3166-1 alpha-3 codes (e.g., DEU not DE, FRA not FR) |
| Bounding box returns no results | Coordinates may be in wrong order | Format is bbox:west_lng,south_lat,east_lng,north_lat |
| Legacy addressFilter returns inconsistent results | Known limitation of deprecated Places API | Migrate to Geocoding and Search API v7 |
Applies To
HERE Geocoding and Search API v7 (current, recommended)
HERE Places API (deprecated — legacy integrations only)
All platforms (Web, Android, iOS, server-side)
All subscription tiers (Freemium, Base, Standard, Custom)
Related Information
HERE Geocoding and Search API v7 — Introduction:
https://docs.here.com/geocoding-and-search/docs/introduction-to-here-geocoding-search-api-v7
* API Reference — Discover endpoint:
https://docs.here.com/geocoding-and-search/api-reference
Keywords
search results wrong country, POI from other region, limit search to one country, filter by country, restrict search area, results from neighboring country, countryCode filter, bounding box search, place search wrong results, how to filter by region, addressFilter not working, Places API deprecated, Geocoding and Search API v7, in= parameter, search scope, geographic filter, country filter HERE, postal code filter, city filter, proximity vs boundary
Updated 3 days ago