REST Countries is a free, open-source RESTful API that returns rich country reference data — ISO 3166-1 codes (cca2, cca3, ccn3, cioc), common/official and native names, translations, capitals, regions and subregions, continents, currencies, languages, calling codes, top-level domains, timezones, geographic coordinates, borders, area, population, demonyms, flags and coats of arms, postal code formats, Gini index, FIFA code, independence and UN membership status, driving side, and start of week. The canonical hosted instance runs at restcountries.com (v3.1) and the source is community-maintained at github.com/apilayer/restcountries (mirror of gitlab.com/restcountries/restcountries), licensed under MPL-2.0. The hosted API is unauthenticated and free; for production use the project encourages self-hosting from source.
URL: Visit APIs.json URL
Run: Capabilities Using Naftiko
- Countries, Geocoding, Geography, ISO 3166, Open Source, Public APIs, Reference Data, Currencies, Languages, Capitals, Regions, Subregions, Translations
- Created: 2026-05-28
- Modified: 2026-05-29
Free, unauthenticated, read-only REST API for country reference data. Provides endpoints for bulk listing and for lookups by name, ISO alpha code (cca2/cca3/ccn3/cioc), currency, language, capital, region, subregion, translation, demonym, and independence status. Response payloads can be trimmed with the fields query parameter (required on /all).
Human URL: https://restcountries.com
- Countries, Geography, ISO 3166, Reference Data, REST
- Documentation
- GitHubRepository
- SourceRepository
- OpenAPI
- JSONSchema
- JSONStructure
- JSON-LD
- Example
- Example
- NaftikoCapability
- Plans
- RateLimits
| Name | Description |
|---|---|
| Bulk Country Listing | Retrieve the complete country dataset via /all with a required fields selector. |
| Multi-Key Lookups | Search by name, ISO 3166-1 alpha-2/alpha-3/numeric/CIOC code, currency, language, capital, region, subregion, translation, demonym, or independence status. |
| Sparse Fieldsets | Use the fields query parameter to request only the fields you need (up to 10), shrinking payload size. |
| Rich Country Metadata | Each country exposes 30+ fields including flags, coat of arms, IDD calling codes, postal code regex, Gini index, FIFA code, timezones, driving side, and start of week. |
| Image Assets | PNG and SVG flag and coat of arms images plus Unicode flag emoji are served directly in the payload. |
| Map Service Links | Each country includes deep links to Google Maps and OpenStreetMap. |
| Open Source | Mozilla Public License 2.0; the full Java/Maven source is available on GitHub and GitLab for self-hosting. |
| Name | Description |
|---|---|
| Country Dropdowns and Selectors | Populate UI country pickers with localized names, flags, and ISO codes. |
| Address and Postal Validation | Validate postal codes against per-country format and regex patterns. |
| Phone Number Country Detection | Match international dialing prefixes to country names and flags. |
| Currency and Language Reference | Resolve ISO 4217 currency codes and ISO 639 language codes against country metadata. |
| Geographic Filtering | Group countries by UN region, subregion, or continent for reporting and segmentation. |
| Educational and Trivia Apps | Drive quizzes, learning content, and atlases with structured country data. |
| Data Enrichment | Enrich CRM, analytics, and logistics records with consistent country reference data. |
| Name | Description |
|---|---|
| Java SDK | Reference Java client embedded in the upstream Maven project. |
| Community SDKs | Community-published clients exist for JavaScript, Python, PHP, Ruby, Go, and Swift; none are official. |
Machine-readable API specifications organized by format.
Naftiko capabilities organized as customer-facing workflows over the REST Countries v3.1 API.
| Workflow | APIs Combined | Tools | Persona |
|---|---|---|---|
| REST Countries Lookup | REST Countries | 10 | Developer / Data Consumer |
- REST Countries Plans — Free hosted tier plus self-hosted (MPL-2.0) option
- REST Countries Rate Limits — Soft fair-use limits on the hosted API; unlimited when self-hosted
- REST Countries Vocabulary — Controlled vocabulary covering country reference concepts and 30+ resource attributes
- REST Countries Rules — 9 Spectral rules enforcing REST Countries v3.1 API conventions
Source code is licensed under the Mozilla Public License 2.0. The hosted REST Countries v3.1 API is provided free of charge by the community.
FN: Kin Lane
Email: kin@apievangelist.com