REST Countries
by restcountries.com
Location Information
Added on October 31st, 2026
Checked and working on November 16th, 2026
Visit restcountries.com →
What it does
REST Countries gives information about every country in the world: official and common names, capital, region, population, area, currencies, languages, calling codes, time zones, borders and flags. Look countries up by name, country code, currency, language or region. The current version (v5) needs an API key and has a free tier for small apps; the old keyless v3 API was retired.
At a glance
- API key
- Needed, free · More APIs with a free key
- Pricing
- The current version (v5) needs an API key and has a free tier for small apps; the old keyless v3 API was retired.
- From the browser
- Yes (CORS)
- Formats
- JSON
- Interface
- REST, HTTP-GET
- Provider
- restcountries.com
- Last checked
- Working on November 16th, 2026
More information: https://restcountries.com/
Is this your service? Show that it is listed
Put this badge on your website or in your README; it links to this page. About the badge
Example request
curl
curl 'https://api.restcountries.com/countries/v5?q=Germany' \
-H 'Authorization: Bearer YOUR_API_KEY'
JavaScript
const response = await fetch("https://api.restcountries.com/countries/v5?q=Germany", {
headers: {
"Authorization": "Bearer YOUR_API_KEY",
},
});
const data = await response.json();
console.log(data);
Python
import requests
response = requests.get(
"https://api.restcountries.com/countries/v5?q=Germany",
headers={
"Authorization": "Bearer YOUR_API_KEY",
},
timeout=30,
)
print(response.json())
Replace YOUR_API_KEY with your own key. The JavaScript works in a web page as well as in Node.js 18 or newer.