Hi everyone,

Work is winding down here at OpenCage as we near the holiday break, but today we found time to get one small little feature out the door.

Previously in the components section of our geocoding results we included a key ISO_3166-1_alpha-2 with the corresponding two letter value, for example ES for Spain. From today we now also include a key ISO_3166-1_alpha-3 with the three letter code, in this case ESP.

So a call to the API for 41.40139, 2.12870 now returns

      "components": {
        "ISO_3166-1_alpha-2": "ES",
        "ISO_3166-1_alpha-3": "ESP",
        "_type": "building",
        "city": "Barcelona",
        "city_district": "Sarrià - Sant Gervasi",
        "country": "Spain",
        "country_code": "es",
        "county": "BCN",
        "house_number": "68",
        "political_union": "European Union",
        "postcode": "08017",
        "road": "Carrer de Calatrava",
        "state": "Catalonia",
        "suburb": "les Tres Torres"
      },

This can be useful if you need to link with other data sets and they have used the three letter code.

One thing to note, many people think these ISO country codes correspond to countries. In many cases they do, but many non-country territories have their own ISO codes. A good example is Puerto Rico, a territory of the United States, which has the ISO 3166-A alpha codes PR and PRI. As always, wikipedia is the best place to learn more.

You might now be asking yourself, “Wow, how did the braniacs over at OpenCage ever come up with this amazing new feature idea?”. Well, a user just asked us for it. That simple. So if you have ideas for how our service could be better please let us know.

Happy geocoding,

Ed

written in ESP