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/countriesList countries with filters and paging.
| Parameter | In | Type | Rules |
|---|---|---|---|
| page | query | integer | min 1 · default 1 |
| limit | query | integer | 1 to 200 · default 50 |
| country | query | string | ISO 3166-1 alpha-2 |
| q | query | string | 2 to 100 chars |
curl 'https://api.apifor.dev/v1/countries' \
-G -d country=AD -d limit=1 \
-H 'x-api-key: YOUR_API_KEY'{
"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 parameters404Record not found500Dataset unavailable
GET
/v1/countries/{id}Find countries by identifier.
| Parameter | In | Type | Rules |
|---|---|---|---|
| id * | path | string | None |
curl 'https://api.apifor.dev/v1/countries/{id}' \
-H 'x-api-key: YOUR_API_KEY'{
"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 parameters404Record not found500Dataset unavailable