Skip to main content

Countries

The Countries API provides a list of countries and their states along with their names and ISO codes.

Authentication​

Please refer to the overview page for basic information, authentication, or formatting of parameters of this endpoint.

Endpoints​

Get Countries​

Endpoint URL
GET /countries

Query Parameters​

  • Optional Parameters
    • country - Lists more detailed information and the states of a specific country. Must be:
      • 2-letter Country Code

Example​

CURL
curl "https://www.gentlentapis.com/tools/v1/countries"
Response
[
​ {
​ "code2": "AF",
​ "code3": "AFG",
​ "name": "Afghanistan",
​ "capital": "Kabul",
​ "region": "Asia",
​ "subregion": "Southern Asia",
​ "api_url": "https://www.gentlentapis.com/tools/v1/countries?country=AF"
​ },
​ {
​ "code2": "AX",
​ "code3": "ALA",
​ "name": "Åland Islands",
​ "capital": "Mariehamn",
​ "region": "Europe",
​ "subregion": "Northern Europe",
​ "api_url": "https://www.gentlentapis.com/tools/v1/countries?country=AX"
​ },
​ …
]