1. Datasets
  2. Countries
  3. Datasets
  4. XP

XP Data APIs

Retrieve country codes, capitals, currencies and geographic reference fields. 252 records across 252 countries and territories, from GeoNames.

Every dataset we hold for XP, with record counts from the 28 Nov 2026 snapshot.

GET /v1/countriesCC BY 4.0252 countries28 Nov 2026XP1 datasets28 Nov 2026

Datasets for XP

Request and response

The response below is the example from our OpenAPI document, so it shows the exact shape you get, though the record itself may come from another country.

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 · application/json
{
  "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"
    }
  ]
}

Fields

Each record in data has these fields. Types are read from the example values; a nullable field can hold null for some records.

FieldTypeExample
iso2string"AD"
iso3string"AND"
iso_numericstring"020"
fipsstring"AN"
namestring"Andorra"
capitalstring"Andorra la Vella"
area_km2integer468
populationinteger82904
continentstring"EU"
tldstring".ad"
currency_codestring"EUR"
currency_namestring"Euro"
postal_code_formatstring"AD###"
postal_code_regexstring"^(?:AD)*(\\d{3})$"
languagesstring"ca"
geonameidinteger3041565
neighboursstring"ES,FR"
updated_atstring"2026-11-01 08:41:33"

Filters and paging

Query parameters accepted by GET /v1/countries. Full detail, including the single-record route, is in the endpoint reference.

ParameterTypeRules
pageintegermin 1 · default 1
limitinteger1 to 200 · default 50
countrystringISO 3166-1 alpha-2
qstring2 to 100 chars

Coverage by country

252 countries and territories have records in the 28 Nov 2026 snapshot. Each one has its own page with filters and counts.