REST Countries
Every country as clean JSON — flags, currencies, borders.
REST Countries answers with structured data for all 250 country codes: names, capitals, currencies, languages, borders and flag assets. Community-run and donation-funded, which our monitoring treats honestly: it is reliable but occasionally slow under load, and v3 broke v2 consumers — shape history below.
GET https://restcountries.com/v3.1/name/ghana?fields=name,capital,currencies,flags
{
"name": {
"common": "Ghana",
"official": "Republic of Ghana"
},
"capital": [
"Accra"
],
"currencies": {
"GHS": {
"name": "Ghanaian cedi",
"symbol": "₵"
}
},
"flags": {
"png": "https://flagcdn.com/w320/gh.png"
}
}curl "https://restcountries.com/v3.1/name/ghana?fields=name,capital,currencies,flags"const res = await fetch("https://restcountries.com/v3.1/name/ghana?fields=name,capital,currencies,flags");
const data = await res.json();
console.log(data);import requests
res = requests.get("https://restcountries.com/v3.1/name/ghana?fields=name,capital,currencies,flags")
print(res.json())/name/germany?fields=name,capital,population,flagsPROBEDCountry by common name with field filter.
/alpha/DEUCountry by ISO alpha-3 code.
/region/europe?fields=name,capitalAll countries in a region.
/currency/eurCountries that use a given currency.
We probe a documented GET and expect 2xx JSON — full uptime and health score. Export includes every documented route below.
v2 endpoints removed — v3.1 required
REST Countries: common questions
Is REST Countries free to use?
Yes — REST Countries is a free open data API. Free tier: Unlimited. Commercial use is allowed on the free tier.
Does REST Countries need an API key?
No — REST Countries needs no API key or signup. You can call it straight away; rate limits still apply (None published).
Can I call REST Countries from the browser?
Yes — REST Countries returns CORS headers over HTTPS, so front-end code can fetch it directly with no backend proxy. Use the fetch snippet on this page, or hit "Run live" to try it now.
Is REST Countries up right now?
As of our last scheduled check, REST Countries is healthy. We re-probe it every sweep — the status badge and uptime chart above always show the latest.