GeoDB Cities

FREEMIUM
Verified
By Michael Mogley | Updated 13日前 | Data
Popularity

9.9 / 10

Latency

62ms

Service Level

100%

Health Check

100%

Back to All Discussions

Find Region Cities request now includes County names?

Rapid account: LHCG Maps API

A recent update to the Find Region Cities (/countries/{countrycode}/regions/{regioncode}/cities) request seems to have added County names to the results without any apparent differentiator between a county and a city. I need a clear way to differentiate between the two. Is there any way you can add some attribute to the results of the Find Region Cities request, or can you remove counties from the results altogether? It seems a bit counter-intuitive to have counties being returned by an API call that is explicitly named “Find Region Cities”.

Rapid account: Wirefreethought
wirefreethought Commented 5年前

Some more news for you. The cities endpoints now support a new ‘types’ parameter. This can have one (or both) of the following values: CITY, ADM2. Specifying both just gives back all city/admin-level-2 results - nonsensical right now, but in the future, there may be other types available. So if you want to just get back cities, set types=CITY. Swagger docs have been updated to reflect this.

Rapid account: Wirefreethought
wirefreethought Commented 5年前

To keep you from getting stuck, I just added a new ‘type’ attribute to each city in the results. This can be one of: ADM2, CITY. Swagger docs have also been updated (https://wirefreethought.github.io/geodb-cities-api-docs). The other features I described should be available sometime in the next couple weeks.

Rapid account: Wirefreethought
wirefreethought Commented 5年前

Hi. There was a request from another user to include additional ‘missing cities’ in Brazil. The missing cities were accounted for by updating the import process to include 2nd-level administrative divisions. I’m guessing that’s probably why you’re now seeing counties. The reason to include 2nd-level admin divisions in the city results is that often times these actually DO represent cities and towns, depending on the country.

Having said that, I’ll add a new type to the city results to allow you to differentiate. I will also provide an additional filter param to allow you to only explicitly return cities (or counties, if so desired). Maybe even a whole separate endpoint. Will update you here when this feature is available.

Join in the discussion - add comment below:

Login / Signup to post new comments