2

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?

jason
  • 236,483
  • 35
  • 423
  • 525
newbie
  • 24,286
  • 80
  • 201
  • 301

3 Answers3

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
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:

https://datahub.io/core/country-list/r/0.json

anuveyatsu
  • 125
  • 1
  • 7