Argentina
AR
Capital: Buenos Aires · Region: Americas
Overview
countries / #5
AR
Capital: Buenos Aires · Region: Americas
Request
curl example
curl -sS \ "https://example-data.com/api/v1/countries/5" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/countries/5" ); const country = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/countries.d.ts https://example-data.com/types/countries.d.ts
import type { Country } from "./types/countries";
const res = await fetch(
"https://example-data.com/api/v1/countries/5"
);
const country = (await res.json()) as Country; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/countries/5"
)
countrie = res.json() Response
{
"id": 5,
"name": "Argentina",
"alpha2": "AR",
"alpha3": "ARG",
"numericCode": "032",
"capital": "Buenos Aires",
"region": "Americas",
"subregion": "South America",
"currencyCode": "ARS",
"callingCode": "+54",
"flagEmoji": "🇦🇷"
}