REST Countries website screenshot

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.

48.6/100 developing ▬ flat Agent 29/100 agent ready Full breakdown ↓
scored 2026-09-08 · rubric v0.20.0
AccessFree
1 APIs
CountriesGeocodingGeographyISO 3166Open-SourcePublic APIsReference DataCurrencyLanguageCapitalsRegionsSubregionsTranslations

Kin Score

Kin Score Kin Score How this is scored →
scored 2026-09-08 · rubric v0.20.0
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.
Improve this rating by publishing the missing artifacts — every area above can be raised, and the full rubric is at apis.io/rating/. Every facet and dimension name above is a link: it opens that measurement's own page — what it means, the exact checks that feed it, how the whole catalog distributes on it, and the providers at the top of it. This rating is computed from github.com/api-evangelist/rest-countries: open an issue to ask a question, or submit a pull request to add artifacts. Submit an artifact on GitHub — free → Manage your own listing — the Influence plan, $499/mo →

APIs 12

Individual APIs this provider publishes, each with its own machine-readable definition.

REST Countries All API

Bulk retrieval of every country in the dataset.

REST Countries Alpha API

Lookup countries by ISO 3166-1 alpha-2, alpha-3, numeric, or CIOC code.

REST Countries Capital API

Lookup countries by capital city.

REST Countries Currency API

Lookup countries by ISO 4217 currency code or currency name.

REST Countries Demonym API

Lookup countries by demonym (citizen designation).

REST Countries Independent API

Lookup countries filtered by ISO 3166-1 independence status.

REST Countries Language API

Lookup countries by ISO 639 language code or language name.

REST Countries Name API

Lookup countries by common or official name.

REST Countries Region API

Lookup countries within a UN geographic region.

REST Countries Subregion API

Lookup countries within a UN geographic subregion.

REST Countries Translation API

Lookup countries by translated name.

REST Countries Countries API

Country lookup and search endpoints

Scroll for all 12

Open Collections 14

Open, tool-agnostic API collections (OpenAPI-derived and Bruno).

API Collection

OPEN COLLECTION

REST Countries All API

OPEN COLLECTION

REST Countries API

OPEN COLLECTION

REST Countries

OPEN COLLECTION

Scroll for all 14

Pricing Plans 1

Published pricing tiers and plan structures.

Rate Limits 1

Documented rate limits and quota policies.

Rest Countries Rate Limits

3 limits

RATE LIMITS

FinOps 1

Cost, billing, and metering signals for API financial operations.

Semantic Vocabularies 2

JSON-LD contexts and semantic vocabularies used across these APIs.

Rest Countries Api Context

0 classes · 0 properties

JSON-LD

Rest Countries Context

49 classes · 0 properties

JSON-LD

Spectral Rules 2

Spectral governance rulesets for linting and validating these APIs.

REST Countries API Rules

5 rules · 3 warnings 2 info

SPECTRAL

REST Countries API Rules

9 rules · 4 errors 4 warnings 1 info

SPECTRAL

JSON Schema 4

Standalone JSON Schema definitions for this provider's data models.

CountriesListResponse

1 properties

JSON SCHEMA

Country

29 properties

JSON SCHEMA

ErrorResponse

1 properties

JSON SCHEMA

Country

35 properties

JSON SCHEMA

JSON Structure 1

JSON Structure definitions describing this provider's data shapes.

Rest Countries Country Structure

35 properties

JSON STRUCTURE

Examples 5

Example request and response payloads for these APIs.

Error 401 Unauthorized

1 fields

EXAMPLE

Search By Name Response

1 fields

EXAMPLE

Security Posture 2

Authentication, domain security, vulnerability disclosure, and trust-center signals.

Rest Countries Authentication

apiKey/http · 2 schemes

SECURITY

Rest Countries Domain Security

TLSv1.3 · DMARC

SECURITY

Agentic Access 1

Recommended x-agentic-access execution contracts for AI agents.

Rest Countries Agentic Access

12 operations

12 operations · 0 acting

AGENTIC

Resources

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)

apis.yml Raw ↑
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

Work with this as data

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.