1

Is there any Google API which would return all the countries in the world with the country code?

2

The Google Maps API family does not have anything like this. There might be other API's that do, but since ISO 3166-1 is fairly static you are probably better off embedding the data rather than retrieving it from an API every time you need it.

You could use Wikipedia's article on ISO 3166-1 as a source for the list of countries and codes.

1

How about KML Countries at GeoCommons. It has entries such as:

  • Cntryname: Australia, Fipscntry: AS
  • Cntryname: Egypt, Fipscntry: EG
  • Cntryname: France, Fipscntry: FR
  • Cntryname: United States, Fipscntry: US

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.