# apilayer/restcountries

Get information about countries via a RESTful API

Repository: https://github.com/apilayer/restcountries
Canonical: https://ross.abutalabs.com/products/restcountries
Homepage: https://restcountries.eu
Language: Java
License: MPL-2.0
License Family: copyleft
Topics: rest-countries, rest, java, countries, rest-api
Archived: true
Last push: 2023-11-27T06:33:03+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4711, "days_push": 1010, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2273, forks 358 (observed 2026-08-28T04:06:33.259660+00:00)

## What it is
REST Countries is a Java-based RESTful API that serves information about world countries, including names, ISO codes, currencies, languages, capitals, calling codes, regions, and flags, queryable via endpoints like /name, /alpha, /currency, and /region. It can be self-hosted from this repository, while the hosted version has been commercialized by apilayer as countrylayer.

## Use cases
- get country data by iso code in my app
- look up countries by currency or language
- populate a country dropdown with capitals and flags
- self-host a free countries rest api
- filter countries by region or regional bloc
- find a country by its calling code
- fetch country names and translations in

## When to choose
- you need free, structured country reference data without licensing hassle
- you want to self-host the API and control availability and rate limits
- your app needs lookups by name, code, currency, language, capital, calling code, or region

## When to avoid
- you need frequently updated demographic or economic data rather than static reference data
- you want a managed commercial API with support and SLAs (consider countrylayer)
- you need geocoding or address-level data instead of country-level facts

## Facets
- artifact type: service
- maturity: maintenance
- function: http-server, api-framework, search-engine
- domain: apis, web-development, backend, self-hosted
- platform: jvm, self-hosted, cross-platform
- tags: rest-api, country-data, iso-3166, geolocation, -api, open-data, geospatial, web-server

## Member repositories
- apilayer/restcountries (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:33.259660+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:41:40.304242+00:00, confidence not recorded.
  - readme: https://github.com/apilayer/restcountries (fetched 2026-08-28T04:06:33.259660+00:00, sha e3ba130ae238)
  - homepage: https://restcountries.eu (fetched 2026-08-29T10:22:16.716958+00:00, sha 10b0826982a2)
  - site_page: https://countrylayer.com/pricing (fetched 2026-08-29T10:22:16.726194+00:00, sha e559b9d4af3b)
  - site_page: https://countrylayer.com/faq (fetched 2026-08-29T10:22:16.727904+00:00, sha 8e858ea873a6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
