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 1 API contract, indexed on the APIs.io network as 12 APIs, 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.
Pull REST Countries's APIs, OpenAPI, scores and pricing into your own code or AI agent
with a free APIs.io key —
sign in with
GitHub,
Google or
LinkedIn.
No form to fill in; signing in shares your email address with us (Privacy).
Points earned after grading and authorship credit; n/a dimensions are left out of the score.
Regulatory Posture applies to this provider. Its tags matched the
Horizontal (data, software, accessibility, platform) regime, so
Regulatory Posture carries 15 points of the composite.
If this regime is wrong for your business, say so on your
provider repo — the
applicability map is public and we will correct it.
Create-or-Update Ergonomics does not apply to this provider. The published contracts declare
no write operations, and a read-only API cannot create-or-update. The facet is excluded from this provider's
denominator entirely — not scored zero. A reference or data API is not deficient for being unable to
upsert.
The six quality facets above are damped to 85 points between them,
because the conditional facet above carries the other
15. That is why each facet's contribution is shown against a damped
maximum: raising a quality facet moves the composite by 85% of its nominal
weight, not 100%. The full arithmetic is at apis.io/rating/.
Show this score on your site.
It updates itself when the score changes. Paste this where you link to your API docs:
<a href="https://apis.io/providers/rest-countries/"><img src="https://apis.io/badge/rest-countries/card.svg" alt="REST Countries on APIs.io — Kin Score by API Evangelist"></a>
Other styles, a README pill and a shields.io endpoint are on the badge page.
Raise your score.
Agent readiness — checks not met, largest first (exact, from this profile):
MCP Server+12 pts — deployment.mode + probe verdict on the mcp/ manifest, not the pointer; an unprobed slug falls back to authorship Ask about this →
Typed Event Surface+6 pts — verified: an AsyncAPI document, OR webhooks/callbacks objects in the as-published OpenAPI; documented (0.29.0, roadmap#1167): only a Webhooks docs link Ask about this →
Delegated User Identity+6 pts — a served discovery document listing authorization_code in grant_types_supported (served), else an oauth2 authorizationCode flow or openIdConnect declared in an OpenAPI (documented) Ask about this →
Agentic Commerce Well-Known Document+5 pts — a parsing /.well-known/ucp (the IANA-registered path, probed first) or ucp.json / acp.json declaring a version and at least one service, OR (0.27) a live x402 payment challenge from _data/x402-adoption.json — `self` when its endpoints are on the provider's own domain, `platform` when they are on a vendor's Ask about this →
6 more unmet checks in the Agent Readiness table above.
Kin Score — facets with the most composite points still available (weight × headroom):
Each check links to what satisfies it. Publish the artifact, or tell us where it already lives, and the score moves on the next scoring run.
Not sure how this applies to your stack? Ask about any one item. Kin Lane reads every question, looks at your profile and your situation, and replies with what a fix would take — scoped to that one area, priced up front, yours whether you ship it or not. Ask a question →
Standards this provider implements or carries. De facto ones are profiled and measured by the API Commons; formal ones come from the standards directory and are linked by the provider's own tags. The evidence column says how each claim was established — not that it was made.
Not yet checked against REST Countries's own pricing page. Compiled by API Evangelist on 2026-05-29; confirm before you rely on a figure. A free plan or tier is listed.
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: self-serve
trial: false
try_now: true
public: false
gated: none
gated_source:
- onboarding
label: Free · Self-serve signup
confidence: medium
source:
- plans
- authentication
- security
generated: '2026-11-28'
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
- Capital
- Regions
- Subregions
- Translation
tags_raw:
- Countries
- Geocoding
- Geography
- ISO 3166
- Open Source
- Public APIs
- Reference Data
- Currencies
- Languages
- Capitals
- Regions
- Subregions
- Translations
- Open-Source
created: '2026-05-28'
modified: '2026-09-16'
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 API
description: Country lookup and search endpoints
humanURL: https://restcountries.com
baseURL: https://api.restcountries.com/countries/v5
baseurl_source: contract
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
REST Countries API — frequently asked questions
Does REST Countries have an API?
Yes. APIs.io lists 12 APIs from REST Countries, including REST Countries All API, REST Countries Alpha API and REST Countries Capital API, and 9 more.
Is there an OpenAPI specification for the REST Countries API?
Yes. APIs.io indexes 12 OpenAPI specifications for REST Countries, each linked for download from this page.
How do I authenticate with the REST Countries API?
REST Countries uses bearer-token authentication (apiKey/http · 2 schemes). The details are profiled on APIs.io as REST Countries Authentication.
How much does the REST Countries API cost?
APIs.io lists 2 pricing plans for REST Countries, with each plan's price, limits and inclusions under Pricing on this page.
Is the REST Countries API ready for AI agents?
REST Countries has a Kin Score of 40.4 out of 100 (developing) and an Agent Readiness score of 32.7 (agent-ready), scored by API Evangelist on 2026-11-28.
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.