freeapis

REST Countries

Get information about countries via a RESTful API

Authentication
No auth
HTTPS
Yes
CORS
Yes
Category
Geocoding
Documentation / URL
https://restcountries.com

Overview

REST Countries provides structured data about every country in the world — names in multiple languages, ISO codes, currencies, languages, capital cities, flags, regional groupings, and more. It has been a staple of free developer tooling for years, ideal for country pickers, dashboards, and localization features.

⚠️ Status update (verified 2026-08): the classic v3.1 API is deprecated. Requests now redirect to a deprecation notice, and the new v5 API requires an API key (register at the official site). The listing above still marks it as no-auth — that reflects the legacy version. Check the official migration guide before building on it.

What the API provides

  • Country list with names, ISO 3166 codes (alpha-2/alpha-3), calling codes
  • Currencies, languages, capitals, population, area, timezones
  • Flags (SVG/PNG) and coat-of-arms URLs
  • Regional grouping (region/subregion)
  • Search by name, code, currency, language, capital, region

Legacy Quick Start (v3.1 — deprecated)

curl "https://restcountries.com/v3.1/name/china"
curl "https://restcountries.com/v3.1/alpha/US"
curl "https://restcountries.com/v3.1/all"

These now redirect to the deprecation notice — migrate to v5.

Migration Notes (v5)

  • New endpoint base: api.restcountries.com (per the official docs).
  • API key required — free registration at restcountries.com.
  • Follow the official deprecation guide for the exact new request format and response schema changes.

FAQ

Is REST Countries still free? The legacy v3.1 API was free and keyless, but is now deprecated. The v5 replacement requires a (free) API key — verify current terms on the official site.

Why did my v3.1 request stop working? The legacy API has been deprecated; requests return a migration notice. Switch to v5 using the official deprecation guide.

Can I call it from the browser? The legacy API supported CORS; check the v5 documentation for current CORS behavior.

More in Geocoding

APIAuthHTTPSCORS
Actinia Grass GIS

Actinia is an open source REST API for geographical data that uses GRASS GIS

API KeyYesUnknown
administrative-divisons-db

Get all administrative divisions of a country

No authYesYes
adresse.data.gouv.fr

Address database of France, geocoding and reverse

No authYesUnknown
Airtel IP

IP Geolocation API. Collecting data from multiple sources

No authYesUnknown
Apiip

Get location information by IP address

API KeyYesYes