example-data.com

countries / #25

Switzerland

CH

Capital: Bern · Region: Europe

Component variants

curl -sS \
  "https://example-data.com/api/v1/countries/25" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/countries/25"
);
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/25"
);
const countrie = (await res.json()) as Countrie;
import requests

res = requests.get(
    "https://example-data.com/api/v1/countries/25"
)
countrie = res.json()
{
  "id": 25,
  "name": "Switzerland",
  "alpha2": "CH",
  "alpha3": "CHE",
  "numericCode": "756",
  "capital": "Bern",
  "region": "Europe",
  "subregion": "Western Europe",
  "currencyCode": "CHF",
  "callingCode": "+41",
  "flagEmoji": "🇨🇭"
}
Draftbit