Why it's so difficult to search a city with AlgoliaPlaces?


Hello :slight_smile:

I’m a big fan of AlgoliaPlaces, it’s a amazing system than I integrate in my data-manager to help my team to search addresses, countries, cities, etc. It’s work good, but for Cities it’s actually not simple at all.

My goal is to provide an autocomplete of cities, I don’t want the autocomplete to show multiples districts on the cities, I don’t want the famous places or others stuffs; only cities. For that, I looked the example of City Search on your documentation; but still: When I type Paris, City Search return me the city and all districts, and it’s look like I don’t have any way to know what result is the city, and what results are the districts to separate them.

Also, when I type New York, I receive the city of New York then the Manhattan Community Board 1, 2, 3, etc. Same for districts of London, etc, etc.

How can I show only the cities?
Thank you!



Unfortunately, this is a current limitation of Algolia Places, mostly due to how large cities function and are represented in OpenStreetMap.

Large cities are often split into multiple districts which are functioning somewhat independently with a larger community council that coordinates actions between the different districts. Therefore, both districts and the city are municipalities and should be considered as such.

For instance, both Paris and the 10ème arrondissement de Paris have a city hall and have specific responsibilities in which the other cannot interfere and which fall under the responsibilities of a municipality. As such OSM considers districts such Manhattan Community Board 1 as a city in the same way it considers New York as a city.

Another challenge here is that some users will be looking for the larger city, while others will be looking for the districts, so we can’t remove one or the other.

That being said, we are looking for ways to improve our processing so that we can better handle these specific cases but I don’t have any ETA or roadmap to share on that issue.



Hello, thank you for the answer.

However, I’m very surprised because, on OSM I think than we have a clear distinction between districts and cities, a city has a type: place:city and a district has a type: place:suburb, here for example with Paris 10ème arrondissement.

Thank you again for your help,
I hope we will have progress there, it’s a very important subject for my company :slight_smile: .


For France, we combine OSM data with BAN data, as it has a higher quality coverage. Unfortunately, the BAN considers all arrondissement in Paris to be different cities.



Just wondering if this is still the case?
I’m trying to find a solution to this…



Yes the status is still the same. I implemented a solution based on the major city names (Paris, London, New-York, etc) to fix the main cases, but it’s globally still very difficult to search only cities with Algolia Places.