Where can I get a list of Countries, States and Ci

2020-02-07 14:27发布

This probably seems like a duplicate, since there are identical questions out there.

Unfortunately all of the answers to all of these questions are missing one detail: the states.

Where can I get a list of countries, states and cities?

For example, I want this:

| Sydney  |  New South Wales  |  Australia  |

or

|  Miami  |  Florida          |  United States  |

I don't want something like this, which excludes the state:

|  Miami  |  United States  |

Is there any place where I can get this kind of data?

I've already tried the following data sources:

But all of them exclude the states.

6条回答
Anthone
2楼-- · 2020-02-07 14:34

Geonames has a lot of data on places (including towns and cities) but it seems to be contributed and perhaps not complete.

Perhaps also try SQL Dumpster, I've used this website a lot for these kinds of databases, cities, provinces, etc. Unfortunately it's not free but only appears to be a one-time fee.

查看更多
萌系小妹纸
4楼-- · 2020-02-07 14:37

The UN maintains a list of countries and "states" / regions for economic trade. That DB is available here: http://www.unece.org/cefact/locode/welcome.html

查看更多
干净又极端
5楼-- · 2020-02-07 14:40
仙女界的扛把子
6楼-- · 2020-02-07 14:49

geonames.org has an api and a data dump of worldwide geographical places.

查看更多
甜甜的少女心
7楼-- · 2020-02-07 14:50

This may be a sideways answer, but if you download Virtuemart (A Joomla component), it has a countries table and all the related states all set up for you included in the installation SQL. They're called jos_virtuemart_countries and jos_virtuemart_states. It also includes the 2 and 3 character country codes. I'd attach it to my answer, but don't see a way of doing it.

查看更多
登录 后发表回答