GET/v1/countries
All countries and territories (ISO 3166) with capital, region, currencies, dial codes and flag
PARAMETERS
- qquery · string
- Substring of the namee.g. island
- regionquery · string
- Africa, Americas, Asia, Europe or Oceaniae.g. Europe
- subregionquery · string
- e.g. Western Europe, Caribbeane.g. string
- continentquery · string
- AF, AN, AS, EU, NA, OC or SAe.g. string
- currencyquery · string
- Only countries using this ISO 4217 currencye.g. EUR
- independentquery · boolean
- true for sovereign states only, false for territories onlye.g. true
REQUEST
curl "https://api.apialmanac.com/v1/countries" \ -H "X-API-Key: YOUR_KEY"
import requests
r = requests.get("https://api.apialmanac.com/v1/countries", headers={"X-API-Key": "YOUR_KEY"})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.apialmanac.com/v1/countries", {
headers: { "X-API-Key": "YOUR_KEY" }
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200OK
{
"count": 1,
"countries": [
{
"code": "FR",
"alpha3": "FRA",
"numeric": "250",
"name": "France",
"official_name": "the French Republic",
"capital": "Paris",
"continent": "EU",
"region": "Europe",
"subregion": "Western Europe",
"intermediate_region": null,
"currencies": [
"EUR"
],
"currency_names": [
"Euro"
],
"calling_codes": [
"33"
],
"tld": ".fr",
"languages": [
"fr-FR",
"frp",
"br",
"co",
"ca",
"eu",
"oc"
],
"flag": "🇫🇷",
"independent": true,
"landlocked": false,
"least_developed": false,
"small_island": false,
"fips": "FR",
"ioc": "FRA",
"fifa": "FRA",
"geoname_id": 3017382,
"wikidata": "Q142"
}
]
}