REST Countries

Every country as clean JSON — flags, currencies, borders.

📚 Open DataHEALTHYchecked 7h ago
AUTH NONECORS AGENT HTTPS COMMERCIAL

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.

96HOW IT'S SCORED ⓘ
Status badge · for your READMEshipapis health badge: 96 · healthy
Uptime history
100%90 days
100%30 days
328P50 · ms
1189P95 · ms
operationalpartialdownno data
Response time · last 48 checks
Fastest 45 ms, slowest 619 ms, most recent 311 ms.
Live response samplecaptured by our last successful check
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"
  }
}
Call itcurl · fetch · python
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())

BROWSER CALLS BLOCKED (NO CORS/HTTPS) — USE THE CURL SNIPPET

Endpoints · 4HealthyFULL DOCS ↗
Monitored path responding — GET /name/germany?fields=name,capital,population,flags328 mschecked 7h ago
GET/name/germany?fields=name,capital,population,flagsPROBED

Country by common name with field filter.

GET/alpha/DEU

Country by ISO alpha-3 code.

GET/region/europe?fields=name,capital

All countries in a region.

GET/currency/eur

Countries that use a given currency.

Machine-readable spec

We probe a documented GET and expect 2xx JSON — full uptime and health score. Export includes every documented route below.

Response-shape history
2026-01-22

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?

Not directly — REST Countries doesn't send browser-friendly CORS headers, so call it from a server or proxy instead. Copy the curl or Python snippet on this page to get started.

Is REST Countries up right now?

As of our last scheduled check, REST Countries is healthy with 100% uptime over 90 days and a 328 ms median response. We re-probe it every sweep — the status badge and uptime chart above always show the latest.