Denmark
DK
Capital: Copenhagen · Region: Europe
countries / #22
DK
Capital: Copenhagen · Region: Europe
curl -sS \
"https://example-data.com/api/v1/countries/22" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/countries/22"
);
const countrie = await res.json();import type { Countrie } from "https://example-data.com/types/countries.d.ts";
const res = await fetch(
"https://example-data.com/api/v1/countries/22"
);
const countrie = (await res.json()) as Countrie;import requests
res = requests.get(
"https://example-data.com/api/v1/countries/22"
)
countrie = res.json() {
"id": 22,
"name": "Denmark",
"alpha2": "DK",
"alpha3": "DNK",
"numericCode": "208",
"capital": "Copenhagen",
"region": "Europe",
"subregion": "Northern Europe",
"currencyCode": "DKK",
"callingCode": "+45",
"flagEmoji": "🇩🇰"
}