MartinsOnuoha / countriesNowAPI

CountriesNow is an Open source API for retrieving geo-information for countries, including their states, cities, population, etc. 🌎
http://countriesnow.space
MIT License
184 stars 59 forks source link

Almost all "States" in the United Kingdom returns an empty City #192

Open Philx62 opened 2 days ago

Philx62 commented 2 days ago

Hello, tried getting list of cities from the UK but most returns an empty list.

this is my request parameter:

https://countriesnow.space/api/v0.1/countries/state/cities/q?country=United%20Kingdom&state=Aberdeen

and this is my returned value :

{ "error": false, "msg": "cities in state Aberdeen of country United Kingdom retrieved", "data": [] }

II initially thought the issue might be with a specific state (e.g., Aberdeen), but I tested about 70% of UK states and got the same result. the only working states i could find was England, Wales and Scotland.

MartinsOnuoha commented 23 hours ago

Hi @Philx62 we had a similar thread opened here https://github.com/MartinsOnuoha/countriesNowAPI/issues/182 Do you think you could follow up on this thread?

MartinsOnuoha commented 7 hours ago

@Philx62 do you expect this structure?

The United Kingdom (UK) does not have "states" like the United States. Instead, it is divided into four constituent countries, each with its own system of governance and regional identities. These are:

England Scotland Wales Northern Ireland Each country is further divided into smaller administrative regions:

England: Includes counties such as Yorkshire, Cornwall, and Kent. Scotland: Divided into council areas like Glasgow City and Highland. Wales: Divided into principal areas like Cardiff and Swansea. Northern Ireland: Comprises districts like Belfast and Derry City and Strabane.

Philx62 commented 7 hours ago

Hi @MartinsOnuoha, yes this is the structure i expected. but using the current setup if Northern Ireland is selected as a state to display a list of cities there is no data for these cities.

MartinsOnuoha commented 5 hours ago

Okay I understand that's the current experience, but I would be making updates to return the districts instead of empty data @Philx62