LocalityAPI
Get API Key

Countries List

List all countries with ISO codes.

GET

Request Example

curl "https://api.localityapi.com/v1/countries" \
  -H "X-API-Key: lapi_your_key"

Response

json
{
  "results": [
    {"iso2": "AE", "name": "United Arab Emirates"},
    {"iso2": "GB", "name": "United Kingdom"},
    {"iso2": "US", "name": "United States"}
  ],
  "count": 249,
  "query_ms": 2
}

Response Fields

resultsarrayArray of countries
results[].iso2stringISO2 country code
results[].namestringCountry name
countintegerTotal number of countries
query_msintegerQuery execution time in milliseconds