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 11 APIs on the APIs.io network, including All API, Alpha API, Capital API, and 8 more. Tagged areas include Countries, Geocoding, Geography, ISO 3166, and Open Source.

The REST Countries catalog on APIs.io includes 1 JSON-LD context and 2 Spectral governance rulesets.

REST Countries’ developer surface includes documentation and 9 more developer resources.

43.4/100 developing ▬ flat Agent 28/100 agent aware Full breakdown ↓
scored 2026-07-28 · rubric v0.6
AccessFree
11 APIs
CountriesGeocodingGeographyISO 3166Open SourcePublic APIsReference DataCurrenciesLanguagesCapitalsRegionsSubregionsTranslations

Kin Score

Kin Score Kin Score How this is scored →
scored 2026-07-28 · rubric v0.6
Composite quality — 43.4/100 · developing
Contract Quality 17.7 / 25
Developer Ergonomics 1.7 / 20
Commercial Clarity 4.2 / 20
Operational Transparency 4.1 / 13
Governance 8.3 / 12
Discoverability 7.4 / 10
Agent readiness — 28/100 · agent aware
Machine-Readable Contract 18 / 18
Agentic Access Contract 10 / 10
MCP Server 0 / 12
Machine-Readable Auth 0 / 10
Idempotency 0 / 9
Stable Error Semantics 0 / 8
Request/Response Examples 7 / 7
Rate-Limit Signaling 7 / 7
Typed Event Surface 0 / 6
Agent Skills 0 / 5
Well-Known Catalog 0 / 4
Consent & Bot Identity 0 / 3
A2A Agent Card 0 / 8
Dry-Run / Simulate Mode 0 / 4
Improve this rating by publishing the missing artifacts — every area above can be raised, and the full rubric is at apis.io/rating/. 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. Want it done for you? Prioritized profiling — $2,500 →

APIs 11

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.

Scroll for all 11

Open Collections 1

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

REST Countries

OPEN COLLECTION

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

Semantic Vocabularies 1

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

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 1

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

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 1

Example request and response payloads for these APIs.

Security Posture 1

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

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 1

SDKs, sample code, and the tooling you integrate with

Access & Security 1

Authentication, authorization, and security posture

Commercial 1

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
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: Provider
tags:
- 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'
specificationVersion: '0.20'
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
common:
- 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
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