About
The ISO 3166 Updates API is a custom-built, open-source and free to use API for the iso3166-updates repo
that returns the latest and historical updates/changes to the ISO 3166-1 and ISO 3166-2 country codes and naming conventions, as per the ISO 3166 newsletter (https://www.iso.org/iso-3166-country-codes.html)
and Online Browsing Platform (OBP) (https://www.iso.org/obp/ui).
A demo of the API and Python software is available
here.
Source code available
here.
Attributes
There are four main attributes returned from the API:
- Change: overall summary of change/update made.
- Description of Change: more in-depth info about the change/update that was made.
- Date Issued: date that the change was communicated.
- Source: name and or edition of newsletter that the ISO 3166 change/update was communicated in (pre 2013), or the link to the country's ISO Online Browsing Platform page.
Endpoints
The ISO 3166 Updates API currently has 6 main endpoints, /all, /alpha, /name, /year, /date_range and /search:
Endpoint | Description |
---|---|
https://iso3166-updates.vercel.app/api/all | Return all updates/changes to a country/territory and its subdivision data and naming conventions for all countries listed in the ISO 3166. |
https://iso3166-updates.vercel.app/api/alpha/{input_alpha} | Return all updates/changes to a country/territory and its subdivision data and naming conventions for input ISO 3166-1 alpha-2, alpha-3 or numeric country codes. A comma separated list of country codes can also be input. |
https://iso3166-updates.vercel.app/api/name/{input_name} | Return all updates/changes to a country/territory and its subdivision data and naming conventions for input country name, as it is commonly known in English. A comma separated list of country names can also be input. |
https://iso3166-updates.vercel.app/api/year/{input_year} | Return all updates/changes to all countries/territories and their subdivision data and naming conventions for a particular year, list of years, year range or all updates less than or greater than an input year. |
https://iso3166-updates.vercel.app/api/alpha/{input_alpha}/year/{input_year}, https://iso3166-updates.vercel.app/api/year/{input_year}/alpha/{input_alpha} | Return all updates/changes to a country/territory and its subdivision data and naming conventions for input ISO 3166-1 alpha-2, alpha-3 or numeric country code, for an input year, list of years, year range or all updates less than or greater than an input year. A comma separated list of country codes can also be input. |
https://iso3166-updates.vercel.app/api/name/{input_name}/year/{input_year}, https://iso3166-updates.vercel.app/api/year/{input_year}/name/{input_name} | Return all updates/changes to a country/territory and its subdivision data and naming conventions for input country name, as it is commonly known in English, for an input year, list of years, year range or all updates less than or greater than an input year. A comma separated list of country names can also be input. |
https://iso3166-updates.vercel.app/api/date_range/{input_date_range} | Return all updates/changes to all countries/territories and their subdivision data and naming conventions within a specified date range, e.g. /api/date_range/2020-01-01,2023-01-01 will return all updates for all countries from 1st Jan 2020 to 1st Jan 2023, inclusive. The endpoint can also accept a single date, which will act as the start date to get updates from, with the end date being the current date, e.g. /api/date_range/2024-05-12 - all updates from 12th May 2024 to the present day. |
https://iso3166-updates.vercel.app/api/search/{input_search_term} | Return all updates/changes to all countries/territories and their subdivision data and naming conventions that have the inputted search terms in them. By default the API will look for an exact match, but the % of likeness to the input search terms found in the updates data can be amended via the 'likeness' query string parameter, lowering this value will expand the search space for the terms; a value between 0 and 1 is accepted. For example, /api/search/canton will return all updates objects that have 'canton' in them. |
All
The /api/all endpoint returns all updates/changes data for all countries/territories in the ISO 3166. The list of countries supported is according
to the ISO 3166-1 standard.
https://iso3166-updates.vercel.app/api/all
Alpha
The /api/alpha endpoint returns all updates/changes to a country/territory and its subdivision data and naming conventions for an input ISO 3166-1 alpha-2,
alpha-3 or numeric country code. A comma separated list of country codes can also be input. This endpoint can also be used in conjunction with the /api/year
and /api/date_range endpoints.
https://iso3166-updates.vercel.app/api/alpha/{input_alpha}
https://iso3166-updates.vercel.app/api/alpha/AD
https://iso3166-updates.vercel.app/api/alpha/DE
https://iso3166-updates.vercel.app/api/alpha/MEX
https://iso3166-updates.vercel.app/api/alpha/PRY
https://iso3166-updates.vercel.app/api/alpha/DE,674
https://iso3166-updates.vercel.app/api/alpha/MEX,768
https://iso3166-updates.vercel.app/api/alpha/PR/year/2018
https://iso3166-updates.vercel.app/api/alpha/TO,TW,TV/date_range/2003-01-01,2009-01-01
Name
The /api/name endpoint returns all updates/changes to a country/territory and its subdivision data and naming conventions for an input country name, as it
is commonly known in English. A comma separated list of country names can also be input. This endpoint can also be used in conjunction with the
/api/year endpoint.
https://iso3166-updates.vercel.app/api/name/{input_name}
https://iso3166-updates.vercel.app/api/name/Ireland
https://iso3166-updates.vercel.app/api/name/Jamaica
https://iso3166-updates.vercel.app/api/name/Panama,Rwanda,Zambia
https://iso3166-updates.vercel.app/api/name/Tajikistan/year/2015-2022
Year
The /api/year endpoint returns all updates/changes to all countries/territories and their subdivision data and naming conventions for a particular year, list
of years, year range or all updates less than or greater than an input year. This endpoint can also be used in conjunction with the /api/alpha and
/api/name endpoints.
https://iso3166-updates.vercel.app/api/year/{input_year}
https://iso3166-updates.vercel.app/api/year/2014
https://iso3166-updates.vercel.app/api/year/2007,2011,2022
https://iso3166-updates.vercel.app/api/year/2000-2005
https://iso3166-updates.vercel.app/api/year/<2021
https://iso3166-updates.vercel.app/api/year/<>2003
https://iso3166-updates.vercel.app/api/year/>2005/alpha/AF,LV,UG
Date Range
The /api/date_range endpoint returns all updates/changes to all countries/territories and their subdivision data and naming conventions from a specified date range,
e.g. /api/date_range/2007-08-08,2007-12-31 will return all updates for all countries from the 8th Aug 2007 until 31st Dec 2007, inclusive. The endpoint can also
accept single date value which will act as the starting point to get updates from, with the present day being the end date. The endpoint can also be used in conjunction
with the /api/alpha endpoint.
https://iso3166-updates.vercel.app/api/date_range/{input_date_range}
https://iso3166-updates.vercel.app/api/date_range/2004-06-12,2010-09-20
https://iso3166-updates.vercel.app/api/date_range/2012-02-17,2012-12-31
https://iso3166-updates.vercel.app/api/date_range/2019-12-18
https://iso3166-updates.vercel.app/api/date_range/2002-08-23,2010-11-10/alpha/FR
https://iso3166-updates.vercel.app/api/date_range/2000-01-01/alpha/DZA,MDA,POL
Search
The /api/search endpoint returns all updates/changes to a country/territory and its subdivision data and naming conventions that contain the sought search
terms in their Change/Desc of Change attribures. A comma separated list of search terms can also be input. If a date is explicitly input then the Date Issued
attribute will also be searched. This endpoint can also be used in conjunction with the /api/year and /api/date_range endpoints.
https://iso3166-updates.vercel.app/api/search/{input_search_term}
https://iso3166-updates.vercel.app/api/search/canton
https://iso3166-updates.vercel.app/api/search/Berlin
https://iso3166-updates.vercel.app/api/search/addition,deletion?likeness=0.6
https://iso3166-updates.vercel.app/api/search/remark part 2?likeness=0.8
https://iso3166-updates.vercel.app/api/search/2017-11-27
https://iso3166-updates.vercel.app/api/search/Paris/alpha/FR
https://iso3166-updates.vercel.app/api/search/update list source/year/2010-2020
Contributing
Contributions, enhancements or feedback to the software and or API are more than welcome! You can raise an Issue or make a pull request on the GitHub Repo or email amckenna41@qub.ac.uk.
Credits
The Python software and accompanying API are solely developed and maintained by me : ).