Search code examples
geolocationhere-apiautosuggest

Does the here.com autosuggest API allow for restricting results to only cities?


I'm playing around with the Here.com autosuggest feature, and I'm trying to find a way to limit the results of a query to only cities. I only want it to return potential city, state/prov, country matches, and not addresses or specific places.

The use case here is to allow the user to start typing in their current city and have autosuggest fill out the rest. So in this case, I also can't send the query with a bounding parameter like at or in, since I want the search to allow for matches world wide.

Is this possible with the current implementation of autosuggest? Or is there another way to accomplish this?

Thanks!


Solution

  • The API itself doesn't allow you to limit based on city but you can select responses where localityType=city in your application.