API is live · Fair use

A free Country API
with flags, calling codes & more.

Fast JSON endpoints for country data — flags, coats of arms, languages, currencies, calling codes and ISO codes. Provided by Nexperts BV.

245
Countries
19
Endpoints
€0
Cost
JSON
Format
nl de fr gb us jp br za au ca in mx
Quick start

Get started in
a single request.

No API key, no signup. Make a GET request and you immediately get JSON back with everything you need to know about a country.

No auth CORS-friendly Cached UTF-8
$ curl https://countries.nexperts.nl/nl
↳ returns JSON with name, flags, currencies, languages, callingcode, …
Reference

All endpoints

Method Endpoint Description Try
GET /{code} Country by ISO 3166-1 Alpha-2 code (e.g. NL, de). Case-insensitive. /nl
GET /countries Full list of valid ISO 3166-1 Alpha-2 codes. /countries
GET /countrycode/{code} Direct cache lookup (skips validation and upstream call). /countrycode/nl
GET /name/{name} Search by country name (min. 3 letters, spaces as _). /name/united_kingdom
GET /callingcode/{number} Lookup by international calling code (e.g. 31, 49). /callingcode/49
GET /cca3/{code} Lookup by ISO 3166-1 Alpha-3 code (e.g. NLD, deu). /cca3/nld
GET /region/{name} All countries in a region: europe, asia, africa, americas, oceania, antarctic. /region/europe
GET /subregion/{name} All countries in a subregion (e.g. western_europe, south-eastern_asia). /subregion/western_europe
GET /currency/{code} All countries using this currency (e.g. EUR, USD). /currency/eur
GET /language/{code} All countries where this language is spoken (ISO 639-3, e.g. nld, fra, eng). /language/nld
GET /capital/{name} Search by capital (substring match, min. 3 letters). Supports countries with multiple capitals. /capital/amsterdam
GET /border/{code} Bordering countries (cca2). Empty array if the country has no land borders. /border/nl
GET /timezone/{offset} Countries in a timezone. Format +0100, -0500, +0530 (UTC prefix optional). /timezone/+0100
GET /independent All independent countries. /independent
GET /un-members All UN member states. /un-members
GET /landlocked All landlocked countries. /landlocked
GET /random A random country — handy for demos and quizzes. /random
GET /flags/{file} Flag image (.png or .svg). /flags/nl.svg
GET /coa/{file} Coat of arms (.png or .svg). /coa/nl.svg
Examples

Try it now

Via curl
$ curl https://countries.nexperts.nl/nl
$ curl https://countries.nexperts.nl/name/united_kingdom
$ curl https://countries.nexperts.nl/callingcode/49
Via JavaScript
const res = await fetch('https://countries.nexperts.nl/nl');
const [country] = await res.json();
console.log(country.name.common); // "Netherlands"
Response

Example JSON response

A GET on /nl returns an array with one country object that looks like this (truncated):

GET https://countries.nexperts.nl/nl
[
  {
    "name": {
      "common": "Netherlands",
      "official": "Kingdom of the Netherlands"
    },
    "cca2": "NL",
    "cca3": "NLD",
    "capital": ["Amsterdam"],
    "region": "Europe",
    "languages": { "nld": "Dutch" },
    "currencies": {
      "EUR": { "name": "Euro", "symbol": "€" }
    },
    "idd": { "root": "+3", "suffixes": ["1"] },
    "population": 16655799,
    "flag": "🇳🇱",
    "flags": {
      "png": "https://countries.nexperts.nl/flags/nl.png",
      "svg": "https://countries.nexperts.nl/flags/nl.svg"
    },
    "coatOfArms": {
      "png": "https://countries.nexperts.nl/coa/nl.png",
      "svg": "https://countries.nexperts.nl/coa/nl.svg"
    },
    "timezones": ["UTC+01:00"],
    "continents": ["Europe"]
  }
]
Fair use

No rate limit, but use it sensibly. Cache results on your end where possible.

Locally cached

All data, flags and coats of arms are served locally for fast response times.

No warranty

Best-effort uptime. For production use with SLA — get in touch with Nexperts for a dedicated setup.