I need to get list of valid countries for web application, is there any list that could be downloaded as XML or similar format, so that I could atomatically update country list?
Asked
Active
Viewed 1,795 times
3 Answers
9
Get the ISO 3166 list (there is an XML version) from the ISO 3166 Maintenance agency. You can also look at Updates on ISO 3166. You can read about the standard on Wikipedia for more information.

jason
- 236,483
- 35
- 423
- 525
-
First two links are dead – Gregor Ažbe Feb 01 '22 at 06:58
3
You can get a JSON list of country codes to names at http://country.io/names.json, and other country related data at http://country.io/data/

Ben Dowling
- 17,187
- 8
- 87
- 103
-2
Here is the curated and regularly updated source of "country list" data available in CSV and JSON formats:
https://datahub.io/core/country-list
To get the data in CSV:
https://datahub.io/core/country-list/r/0.csv
JSON:

anuveyatsu
- 125
- 1
- 7