published

REST Countries API

The REST Countries API offers developers free, no-key-required access to detailed country information, suitable for various applications.

Developed by APIlayer

99.98%Uptime
120msLatency
5kStars
No AuthAuth
NoCredit Card
RESTStyle
v3.1Version
API Endpoints

Reference for available routes, request structures, and live examples.

Get detailed country information by ISO 3166-1 2-letter or 3-letter country code

Full Endpoint URL
https://restcountries.com/alpha/{code}
Implementation Example
curl -X GET 'https://restcountries.com/alpha/{code}'
Request Payload
{
  "fields": "name,capital,currencies,languages,population"
}
Expected Response
{
  "name": {
    "common": "Japan",
    "official": "Japan"
  },
  "capital": [
    "Tokyo"
  ],
  "languages": {
    "jpn": "Japanese"
  },
  "currencies": {
    "JPY": {
      "name": "Japanese yen",
      "symbol": "¥"
    }
  },
  "population": 125836021
}
Version:v3.1
Real-World Applications
  • Travel app country detailsOptimized Capability
  • Geography quizzes and educational platformsOptimized Capability
  • Currency convertersOptimized Capability
  • Localization and translation supportOptimized Capability
  • World statistics dashboardsOptimized Capability
  • Flag and map image displayOptimized Capability
  • Weather or news aggregation by countryOptimized Capability
Advantages
  • 100% free with no API key required
  • Instant access—no signup process required
  • Comprehensive and frequently updated country data
  • Simple, developer-friendly REST endpoints
  • Strong uptime and low latency
Limitations
  • No official SDKs provided
  • No built-in request filtering by fields (all data returned by default)
  • JSON only, no XML or CSV support
  • Rate limiting applies for very high-volume usage
  • No advanced search or analytics features

FAQs

API Specifications

v3.1
Pricing Model
Free
Credit Card
Not Required
Response Formats
JSON
Supported Languages
9 Languages
SDK Support
REST Only
Time to Hello World

Less than 5 minutes

Rate Limit

2000 requests per hour (public limit)

Free Tier Usage

Unlimited free usage with a public rate limit of 2000 requests per hour. No sign-up or credit card required.

Use Case: Best For

Developers needing quick, reliable global country data with no authentication or fees.

Not Recommended For

Enterprises needing SLAs, premium support, or commercial-grade data guarantees.

#data#geography#countries

Explore Related APIs

Discover similar APIs to REST Countries API

View All APIs
OPEN SOURCE

Countries Now API

The Countries Now API provides developers with structured geolocation data about countries and cities, making it ideal for enhancing international features in applications.

Geolocation & MappingView Details
OPEN SOURCE

Zippopotam.us

The Zippopotam.us API provides free access to postal and ZIP code information from over 60 countries, suitable for enhancing address lookup and geocoding functionality in applications.

Geolocation & MappingView Details
FREEMIUM

IP Geolocation API by IPify

IP Geolocation API by IPify provides developers with a reliable service for obtaining location data based on IP addresses, ideal for analytics and personalization.

Geolocation & MappingView Details