Countries All docs

Countries API Reference

2 routes under /v1/countries. Base URL https://api.apifor.dev, authenticated with x-api-key, one credit per request. Coverage and licence are on the Countries page.

GET/v1/countries

List countries with filters and paging.

ParameterInTypeRules
pagequeryintegermin 1 · default 1
limitqueryinteger1 to 200 · default 50
countryquerystringISO 3166-1 alpha-2
qquerystring2 to 100 chars
GET/v1/countries
curl 'https://api.apifor.dev/v1/countries' \
  -G -d country=AD -d limit=1 \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "success": true,
  "data": [
    {
      "iso2": "AD",
      "iso3": "AND",
      "iso_numeric": "020",
      "fips": "AN",
      "name": "Andorra",
      "capital": "Andorra la Vella",
      "area_km2": 468,
      "population": 82904,
      "continent": "EU",
      "tld": ".ad",
      "currency_code": "EUR",
      "currency_name": "Euro",
      "postal_code_format": "AD###",
      "postal_code_regex": "^(?:AD)*(\\d{3})$",
      "languages": "ca",
      "geonameid": 3041565,
      "neighbours": "ES,FR",
      "updated_at": "2026-11-01 08:41:33"
    }
  ]
}
  • 200Successful response. Pagination is explicit; no silent truncation.
  • 400Invalid query parameters
  • 404Record not found
  • 500Dataset unavailable
GET/v1/countries/{id}

Find countries by identifier.

ParameterInTypeRules
id *pathstringNone
GET/v1/countries/{id}
curl 'https://api.apifor.dev/v1/countries/{id}' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "success": true,
  "data": {
    "iso2": "AD",
    "iso3": "AND",
    "iso_numeric": "020",
    "fips": "AN",
    "name": "Andorra",
    "capital": "Andorra la Vella",
    "area_km2": 468,
    "population": 82904,
    "continent": "EU",
    "tld": ".ad",
    "currency_code": "EUR",
    "currency_name": "Euro",
    "postal_code_format": "AD###",
    "postal_code_regex": "^(?:AD)*(\\d{3})$",
    "languages": "ca",
    "geonameid": 3041565,
    "neighbours": "ES,FR",
    "updated_at": "2026-11-01 08:41:33"
  }
}
  • 200Successful response. Pagination is explicit; no silent truncation.
  • 400Invalid query parameters
  • 404Record not found
  • 500Dataset unavailable

Error handling · Rate limits · Source licences