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
177 stars 53 forks source link

BUG - United Kingdom 'states' are incorrect for Cities #182

Open james-humanpixel opened 1 month ago

james-humanpixel commented 1 month ago

The United Kingdom 'states' are incorrect for cities,

Taking West Sussex for example

curl --location 'https://countriesnow.space/api/v0.1/countries/state/cities' \ --header 'Content-Type: application/json' \ --data '{ "country": "United Kingdom", "state": "West Sussex" }'

Should return things like, 'East Sussex', 'West Sussex','Devon','Cornwall'

Instead, these are found under the "state" of "England" which is the Country,

curl --location 'https://countriesnow.space/api/v0.1/countries/state/cities' \ --header 'Content-Type: application/json' \ --data '{ "country": "United Kingdom", "state": "England" }'

MartinsOnuoha commented 1 month ago

@james-humanpixel thanks for reporting this, I'm having a look at your report

MartinsOnuoha commented 1 month ago

Hi @james-humanpixel can you give a bit more info about this? From my research, Devon and East Sussex aren't under West Sussex, as they are all counties in England and not cities. So it's expected to find all of these counties under England.

The United Kingdom (UK) is a country, but it is a unique type of country known as a sovereign state that is composed of four constituent countries: England, Scotland, Wales, and Northern Ireland. Each of these countries has its own list of counties but they are all united under a single government and monarchy.