Skip to content

api-evangelist/rest-countries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST Countries (rest-countries)

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

Tags:

  • Countries, Geocoding, Geography, ISO 3166, Open Source, Public APIs, Reference Data, Currencies, Languages, Capitals, Regions, Subregions, Translations

Timestamps

  • Created: 2026-05-28
  • Modified: 2026-05-29

APIs

REST Countries

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

Tags:

  • Countries, Geography, ISO 3166, Reference Data, REST

Properties

Common Properties

Features

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.

Use Cases

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.

Integrations

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.

Artifacts

Machine-readable API specifications organized by format.

OpenAPI

JSON Schema

JSON Structure

JSON-LD

Examples

Capabilities

Naftiko capabilities organized as customer-facing workflows over the REST Countries v3.1 API.

Workflow Capabilities

Workflow APIs Combined Tools Persona
REST Countries Lookup REST Countries 10 Developer / Data Consumer

Plans & Pricing

Rate Limits

Vocabulary

Rules

License

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.

Maintainers

FN: Kin Lane

Email: kin@apievangelist.com

About

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, …

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors