4

I want to parse the short_name of the google maps detail search for the country and want to know if this is the iso-code (iso 3166-1) or just an abbreviation from google? On the google pages i only find a description of the meaning of the field.

e. g.

, {
  "long_name": "United States",
  "short_name": "US",
  "types": [ "country", "political" ]
} 

In the google docs i only found this:

short_name is an abbreviated textual name for the address component, if available. For example, an address component for the state of Alaska may have a long_name of "Alaska" and a short_name of "AK" using the 2-letter postal abbreviation.

So the short name is also available for other parts for example states. But maybe someone used this also and can verify that the short_name of the country fits the ISO-Code standard. I just tested some countries and it fits so far.

bkb
  • 309
  • 2
  • 4
  • 12
  • Although assuming things is never good, the assumption that the ISO 3166-1 is the exact same thing as what Google is using is a strong assumption. – user3308043 Aug 05 '14 at 01:33
  • Have a look at similar post [here](https://stackoverflow.com/questions/17703918/how-can-i-get-the-country-and-region-code-using-geolocation-instead-of-full-coun). – xYan Jun 22 '16 at 10:18

0 Answers0