Country Codes API

Country Codes API logo

Country and subdivision ISO codes. Available on Rapid API↗

GET /country-codes

Returns ISO codes of a country

Query parameters:

  • name (optional): name of the country.
  • alpha2Code (optional): 2-letter ISO code of the country
  • alpha3Code (optional): 3-letter ISO code of the country

Example: curl -H "x-api-key: YOUR_API_KEY" https://api.apivenue.com/country-codes?name=Italy

Output:


[
    {
        "name": "Italy",
        "alpha2Code": "IT",
        "alpha3Code": "ITA",
        "numericCode": "380"
    }
]
            

GET: /country-codes/{alpha2Code}

Returns ISO codes of a country

Path parameters:

  • alpha2Code (optional): 2-letter ISO code of the country

GET: /country-codes/{alpha2Code}/subdivisions

Returns all subdivisions of the country

Path parameters:

  • alpha2Code (optional): 2-letter ISO code of the country