United Kingdom
GB
Capital: London · Region: Europe
countries / #9
GB
Capital: London · Region: Europe
curl -sS \
"https://example-data.com/api/v1/countries/9" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/countries/9"
);
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/9"
);
const countrie = (await res.json()) as Countrie;import requests
res = requests.get(
"https://example-data.com/api/v1/countries/9"
)
countrie = res.json() {
"id": 9,
"name": "United Kingdom",
"alpha2": "GB",
"alpha3": "GBR",
"numericCode": "826",
"capital": "London",
"region": "Europe",
"subregion": "Northern Europe",
"currencyCode": "GBP",
"callingCode": "+44",
"flagEmoji": "🇬🇧"
}