Home
Providers
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.
REST Countries publishes 12 APIs on the APIs.io network, including All API, Alpha API, Capital API, and 9 more. Tagged areas include Countries, Geocoding, Geography, ISO 3166, and Open-Source.
The REST Countries catalog on APIs.io includes 2 JSON-LD contexts and 2 Spectral governance rulesets.
REST Countries’ developer surface includes documentation, authentication, pricing, and 16 more developer resources.
1 APIs
On this page
Kin Score
APIs 12
Open Collections 14
Pricing Plans 1
Rate Limits 1
FinOps 1
Vocabularies 2
Spectral Rules 2
JSON Schema 4
JSON Structure 1
Examples 5
Security Posture 2
Agentic Access 1
Resources 19
apis.yml
68 Operational Transparency
Composite quality — 48.6/100 · developing
Agent readiness — 29/100 · agent ready
Individual APIs this provider publishes, each with its own machine-readable definition.
Scroll for all 12
Open, tool-agnostic API collections (OpenAPI-derived and Bruno).
Scroll for all 14
Published pricing tiers and plan structures.
Documented rate limits and quota policies.
Cost, billing, and metering signals for API financial operations.
JSON-LD contexts and semantic vocabularies used across these APIs.
Spectral governance rulesets for linting and validating these APIs.
Standalone JSON Schema definitions for this provider's data models.
JSON Structure definitions describing this provider's data shapes.
Example request and response payloads for these APIs.
Authentication, domain security, vulnerability disclosure, and trust-center signals.
Recommended x-agentic-access execution contracts for AI agents.
Documentation 1
Reference material describing how the API behaves
Agent Surfaces 1
MCP servers, agent skills, and machine-readable catalogs
Design & Contract 2
Pagination, idempotency, versioning, errors, and events
Build 2
SDKs, sample code, and the tooling you integrate with
Access & Security 2
Authentication, authorization, and security posture
Operate 4
Status, limits, changes, and where to get help
Commercial 4
Pricing, plans, and the legal terms of use
Company 1
The organization behind the API
Other 2
Properties that don't map to a standard resource type
Source (apis.yml)
aid: rest-countries
name: REST Countries
kind: opensource
description: 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: https://raw.githubusercontent.com/api-evangelist/rest-countries/main/apis.yml
deliveryModel:
model: unknown
open_source: unknown
commercial: true
callable_host: true
label: Delivery model not determined — needs a product licence on record
confidence: low
source:
- openapi
- pricing
- repository-unlicensed
generated: '2026-08-28'
method: derived
accessModel:
pricing: free
onboarding: unknown
trial: false
try_now: false
public: false
label: Free
confidence: medium
source:
- plans
generated: '2026-07-22'
method: derived
image: https://kinlane-productions2.s3.amazonaws.com/apis-json-icons/rest-countries.png
type: Index
access: Public
position: Producing
tags:
- Countries
- Geocoding
- Geography
- ISO 3166
- Open-Source
- Public APIs
- Reference Data
- Currency
- Language
- Capitals
- Regions
- Subregions
- Translations
tags_raw:
- Countries
- Geocoding
- Geography
- ISO 3166
- Open Source
- Public APIs
- Reference Data
- Currencies
- Languages
- Capitals
- Regions
- Subregions
- Translations
created: '2026-05-28'
modified: '2026-08-08'
specificationVersion: '0.23'
apis:
- aid: rest-countries:rest-countries-all-api
name: REST Countries All API
description: Bulk retrieval of every country in the dataset.
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- All
properties:
- type: OpenAPI
url: openapi/rest-countries-all-api-openapi.yml
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: JSONSchema
url: json-schema/rest-countries-country-schema.json
- type: JSONStructure
url: json-structure/rest-countries-country-structure.json
- type: JSONLD
url: json-ld/rest-countries-context.jsonld
- type: Examples
url: examples/rest-countries-country-example.json
- type: Examples
url: examples/rest-countries-by-region-example.json
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- aid: rest-countries:rest-countries-alpha-api
name: REST Countries Alpha API
description: Lookup countries by ISO 3166-1 alpha-2, alpha-3, numeric, or CIOC code.
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- Alpha
properties:
- type: OpenAPI
url: openapi/rest-countries-alpha-api-openapi.yml
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: JSONSchema
url: json-schema/rest-countries-country-schema.json
- type: JSONStructure
url: json-structure/rest-countries-country-structure.json
- type: JSONLD
url: json-ld/rest-countries-context.jsonld
- type: Examples
url: examples/rest-countries-country-example.json
- type: Examples
url: examples/rest-countries-by-region-example.json
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- aid: rest-countries:rest-countries-capital-api
name: REST Countries Capital API
description: Lookup countries by capital city.
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- Capital
properties:
- type: OpenAPI
url: openapi/rest-countries-capital-api-openapi.yml
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: JSONSchema
url: json-schema/rest-countries-country-schema.json
- type: JSONStructure
url: json-structure/rest-countries-country-structure.json
- type: JSONLD
url: json-ld/rest-countries-context.jsonld
- type: Examples
url: examples/rest-countries-country-example.json
- type: Examples
url: examples/rest-countries-by-region-example.json
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- aid: rest-countries:rest-countries-currency-api
name: REST Countries Currency API
description: Lookup countries by ISO 4217 currency code or currency name.
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- Currency
properties:
- type: OpenAPI
url: openapi/rest-countries-currency-api-openapi.yml
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: JSONSchema
url: json-schema/rest-countries-country-schema.json
- type: JSONStructure
url: json-structure/rest-countries-country-structure.json
- type: JSONLD
url: json-ld/rest-countries-context.jsonld
- type: Examples
url: examples/rest-countries-country-example.json
- type: Examples
url: examples/rest-countries-by-region-example.json
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- aid: rest-countries:rest-countries-demonym-api
name: REST Countries Demonym API
description: Lookup countries by demonym (citizen designation).
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- Demonym
properties:
- type: OpenAPI
url: openapi/rest-countries-demonym-api-openapi.yml
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: JSONSchema
url: json-schema/rest-countries-country-schema.json
- type: JSONStructure
url: json-structure/rest-countries-country-structure.json
- type: JSONLD
url: json-ld/rest-countries-context.jsonld
- type: Examples
url: examples/rest-countries-country-example.json
- type: Examples
url: examples/rest-countries-by-region-example.json
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- aid: rest-countries:rest-countries-independent-api
name: REST Countries Independent API
description: Lookup countries filtered by ISO 3166-1 independence status.
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- Independent
properties:
- type: OpenAPI
url: openapi/rest-countries-independent-api-openapi.yml
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: JSONSchema
url: json-schema/rest-countries-country-schema.json
- type: JSONStructure
url: json-structure/rest-countries-country-structure.json
- type: JSONLD
url: json-ld/rest-countries-context.jsonld
- type: Examples
url: examples/rest-countries-country-example.json
- type: Examples
url: examples/rest-countries-by-region-example.json
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- aid: rest-countries:rest-countries-language-api
name: REST Countries Language API
description: Lookup countries by ISO 639 language code or language name.
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- Language
properties:
- type: OpenAPI
url: openapi/rest-countries-language-api-openapi.yml
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: JSONSchema
url: json-schema/rest-countries-country-schema.json
- type: JSONStructure
url: json-structure/rest-countries-country-structure.json
- type: JSONLD
url: json-ld/rest-countries-context.jsonld
- type: Examples
url: examples/rest-countries-country-example.json
- type: Examples
url: examples/rest-countries-by-region-example.json
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- aid: rest-countries:rest-countries-name-api
name: REST Countries Name API
description: Lookup countries by common or official name.
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- Name
properties:
- type: OpenAPI
url: openapi/rest-countries-name-api-openapi.yml
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: JSONSchema
url: json-schema/rest-countries-country-schema.json
- type: JSONStructure
url: json-structure/rest-countries-country-structure.json
- type: JSONLD
url: json-ld/rest-countries-context.jsonld
- type: Examples
url: examples/rest-countries-country-example.json
- type: Examples
url: examples/rest-countries-by-region-example.json
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- aid: rest-countries:rest-countries-region-api
name: REST Countries Region API
description: Lookup countries within a UN geographic region.
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- Region
properties:
- type: OpenAPI
url: openapi/rest-countries-region-api-openapi.yml
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: JSONSchema
url: json-schema/rest-countries-country-schema.json
- type: JSONStructure
url: json-structure/rest-countries-country-structure.json
- type: JSONLD
url: json-ld/rest-countries-context.jsonld
- type: Examples
url: examples/rest-countries-country-example.json
- type: Examples
url: examples/rest-countries-by-region-example.json
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- aid: rest-countries:rest-countries-subregion-api
name: REST Countries Subregion API
description: Lookup countries within a UN geographic subregion.
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- Subregion
properties:
- type: OpenAPI
url: openapi/rest-countries-subregion-api-openapi.yml
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: JSONSchema
url: json-schema/rest-countries-country-schema.json
- type: JSONStructure
url: json-structure/rest-countries-country-structure.json
- type: JSONLD
url: json-ld/rest-countries-context.jsonld
- type: Examples
url: examples/rest-countries-country-example.json
- type: Examples
url: examples/rest-countries-by-region-example.json
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- aid: rest-countries:rest-countries-translation-api
name: REST Countries Translation API
description: Lookup countries by translated name.
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- Translation
properties:
- type: OpenAPI
url: openapi/rest-countries-translation-api-openapi.yml
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: JSONSchema
url: json-schema/rest-countries-country-schema.json
- type: JSONStructure
url: json-structure/rest-countries-country-structure.json
- type: JSONLD
url: json-ld/rest-countries-context.jsonld
- type: Examples
url: examples/rest-countries-country-example.json
- type: Examples
url: examples/rest-countries-by-region-example.json
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- aid: rest-countries:rest-countries-countries-api
name: REST Countries Countries API
description: Country lookup and search endpoints
humanURL: https://restcountries.com
baseURL: https://restcountries.com/v3.1
tags:
- Countries
properties:
- type: OpenAPI
url: openapi/rest-countries-countries-api-openapi.yml
common:
- type: IssueTracker
url: https://github.com/apilayer/restcountries/issues
- type: Releases
url: https://github.com/apilayer/restcountries/releases
- type: AgenticAccess
url: agentic-access/rest-countries-agentic-access.yml
- type: DomainSecurity
url: security/rest-countries-domain-security.yml
- type: Website
url: https://restcountries.com
- type: Documentation
url: https://restcountries.com
- type: GitHubRepository
url: https://github.com/apilayer/restcountries
- type: SourceRepository
url: https://gitlab.com/restcountries/restcountries
- type: Mirror
url: https://github.com/restcountries/restcountries
- type: License
url: https://www.mozilla.org/en-US/MPL/2.0/
- type: SpectralRules
url: rules/rest-countries-rules.yml
- type: Vocabulary
url: vocabulary/rest-countries-vocabulary.yml
- type: Authentication
url: authentication/rest-countries-authentication.yml
- type: GitHubOrg
url: https://github.com/apilayer/restcountries
- type: Pricing
url: https://restcountries.com/plans
- type: StatusPage
url: https://status.restcountries.com
- type: Plans
url: plans/rest-countries-plans-pricing.yml
- type: RateLimits
url: rate-limits/rest-countries-rate-limits.yml
- type: FinOps
url: finops/rest-countries-finops.yml
features:
- name: Bulk Country Listing
description: Retrieve the complete country dataset via `/all` with a required `fields` selector.
- name: Multi-Key Lookups
description: Search by name, ISO 3166-1 alpha-2/alpha-3/numeric/CIOC code, currency, language, capital, region, subregion,
translation, demonym, or independence status.
- name: Sparse Fieldsets
description: Use the `fields` query parameter to request only the fields you need (up to 10), shrinking payload size.
- name: Rich Country Metadata
description: 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.
- name: Image Assets
description: PNG and SVG flag and coat of arms images plus Unicode flag emoji are served directly in the payload.
- name: Map Service Links
description: Each country includes deep links to Google Maps and OpenStreetMap.
- name: Open Source
description: Mozilla Public License 2.0; the full Java/Maven source is available on GitHub and GitLab for self-hosting.
useCases:
- name: Country Dropdowns and Selectors
description: Populate UI country pickers with localized names, flags, and ISO codes.
- name: Address and Postal Validation
description: Validate postal codes against per-country format and regex patterns.
- name: Phone Number Country Detection
description: Match international dialing prefixes to country names and flags.
- name: Currency and Language Reference
description: Resolve ISO 4217 currency codes and ISO 639 language codes against country metadata.
- name: Geographic Filtering
description: Group countries by UN region, subregion, or continent for reporting and segmentation.
- name: Educational and Trivia Apps
description: Drive quizzes, learning content, and atlases with structured country data.
- name: Data Enrichment
description: Enrich CRM, analytics, and logistics records with consistent country reference data.
integrations:
- name: Java SDK
description: Reference Java client embedded in the upstream Maven project.
- name: Community SDKs
description: Community-published clients exist for JavaScript, Python, PHP, Ruby, Go, and Swift; none are official.
maintainers:
- FN: Kin Lane
email: kin@apievangelist.com
x-merged-from:
- restcountries
Every provider here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for providers
9 MCP tools reach this
find_providersBrowse and filter every provider in the catalog.
get_provider_artifactsEvery artifact this provider publishes, grouped by type.
get_provider_operationsEvery operation across all of their OpenAPIs — one call instead of parsing every spec.
get_provider_toolsEvery MCP tool they ship, with the operation each wraps.
get_provider_evidenceHow each part of their score was established. Free — the basis for a claim should not sit behind it.
get_provider_ratingPRO — composite, band, trend and facet scores.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This provider
curl "https://apis.io/api/v1/providers/rest-countries"
All providers
curl "https://apis.io/api/v1/providers?limit=25"
Every operation they expose
curl "https://apis.io/api/v1/providers/rest-countries/operations?limit=25"
How their score was established
curl "https://apis.io/api/v1/providers/rest-countries/evidence"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms .
A second provider on the same verified email joins the account you already have.