Plainwork

Plainwork / Catalogue / Countrydrop: REST Countries v3.1 drop-in API

APINo. 1017-29

REST Countries v3.1 and v2, back: change one hostname

restcountries.com retired v2 and v3.1 in 2026, and v5 needs a key. Countrydrop serves the old paths and the same JSON, byte for byte, keyless for 1,000 requests a day, with a $4/month key for servers.

  • A key for 10,000 requests a day (the free tier is 1,000 a day per IP)
  • Every v3.1 endpoint: all, alpha, codes, name, fullText, currency, capital, region, subregion, lang, demonym, translation, independent
  • Every v2 endpoint, plus old restcountries.eu /rest/v2 paths
  • The same fields filter and the same quirks your code was written against
  • OpenAPI 3.1 file, CORS for browser code, and JSON errors with the original status/message keys
  • Send the key as x-api-key, Authorization: Bearer or ?key=; it appears right after payment
$4/monthBuy now
Fix my restcountries URLs →
Instant deliverySecure checkout by Stripe14-day refund
A real response, same shape as before

Real answer for GET /v3.1/alpha/jp?fields=name,cca2,capital,currencies,idd,flags,population,area,latlng, read on 17 October 2026 (spaces added for reading). This is the same path and the same JSON that restcountries.com used to return, in the same property order and with the same number formatting:

{
  "flags": { "png": "https://flagcdn.com/w320/jp.png", "svg": "https://flagcdn.com/jp.svg",
             "alt": "The flag of Japan features a crimson-red circle at the center of a white field." },
  "name": { "common": "Japan", "official": "Japan",
            "nativeName": { "jpn": { "official": "日本", "common": "日本" } } },
  "currencies": { "JPY": { "name": "Japanese yen", "symbol": "¥" } },
  "latlng": [36.0, 138.0],
  "cca2": "JP",
  "idd": { "root": "+8", "suffixes": ["1"] },
  "capital": ["Tokyo"],
  "area": 377930.0,
  "population": 123210000
}

With ?fields=, a single-code lookup returns one object, not an array, exactly as before, so data.name.common keeps working. Decimal fields keep their .0, so typed clients (Dart's as double, for example) don't break. Send your own request, or paste your code into the URL fixer.

Made for

Who it's for

Developers whose country picker, flags or quiz broken8n, Make and Zapier flows that called restcountries.comCLI tools and scripts that need keyless country dataCourse and tutorial authors with v3.1 examplesFrontend Mentor 'REST Countries API' projects

One-line fix

Replace https://restcountries.com with our host. Paths, parameters, field names and response shapes stay the same, so the parsing code you already have keeps working. A v5 move means a new host, a key and a new response shape.

Faithful, and tested

REST Countries' own last v3.1 and v2 data (MPL-2.0), with endpoint logic ported from its Java source. Answers match the original byte for byte, down to 377930.0: we checked 947 country records saved from the original API.

Keyless where it matters

v5's free plan is 1,000 requests a month (restcountries.com/pricing, 17 Oct 2026), and a copied v5 key works from any server. Our free tier is 1,000 requests a day per visitor IP, CORS open, no key.

Honest about what it is

The data is frozen at that release: population and other figures are not live, and flag images still come from flagcdn.com. We store no caller data beyond a salted, hashed daily counter that is reset each day.

What's inside

Everything you get

/v3.1/...The full v3.1 API, including ?fields= and ?fullText=true
/v2/... and /rest/v2/...The v2 shape, plus old restcountries.eu URLs
/openapi.jsonOpenAPI 3.1 description of every endpoint and error
URL fixerPaste code; it rewrites restcountries URLs and tests the first one live
API referenceTry-it box, limits, every error including Cloudflare's non-JSON ones

How it works

From checkout to done

Buy

Pay $4 with Stripe; your key appears on the next page

Open

Send it from your server as an x-api-key header

Use

Cancel any time from your Stripe receipt; the key stops when the subscription ends

Questions

Good to know

Is this REST Countries?

No. Countrydrop is made by Plainwork Digital and is not affiliated with REST Countries. It serves REST Countries' own published MPL-2.0 data files through endpoints that behave like the retired v2 and v3.1. If you need live data or the new v5 fields, use REST Countries v5.

Do I need a key?

Not to start. Without a key you get 1,000 requests a day per IP address, which is plenty for a front end, where each visitor has their own IP. A key ($4/month, 10,000 requests a day) is for back ends and scripts that make many calls from one address.

How current is the data?

It is REST Countries' last v3.1 file (changed 25 February 2026) and v2 file (12 November 2025). The values are unchanged and written the way the original API wrote them. v2 answers carry only the fields the original v2 classes had, so keys such as continent and most translations in the v2 file are left out, as before. Names, codes, currencies, calling codes and borders rarely change. Population and Gini figures are snapshots, not live.

Is anything different from the original?

Three small things, all in your favour. /all without fields returns every country with every field, as restcountries.com did until June 2025; its final version answered 400. /v2/regionalbloc/ finds a bloc by its acronym even when the bloc lists no other acronyms, which the original code skipped. Results come back in data-file order. Everything else matches the original, including the fields filter, single-code lookups with fields returning one object, number formatting ("area":377930.0) and property order.

What happens if I hit the limit?

You get HTTP 429 with a JSON body that says when the limit resets (00:00 UTC) and a Retry-After header. On top of the per-IP limit, all free requests together are capped at 40,000 a day, counted in one place. If that total is ever reached, every free request gets a 429 that says so until 00:00 UTC, even from an IP that hasn't made a request yet, and keys keep working.

Can I cancel?

Yes, from the link in your Stripe receipt. The key works until the paid period ends. Refunds follow our refund policy.

What if it doesn't work for me?

If it doesn't work as described or you can't access it, email us within 14 days and we'll fix it or refund you. See the refund policy for details.

Countrydrop: REST Countries v3.1 drop-in API

The retired REST Countries v2 and v3.1 endpoints, same paths and JSON: swap the host, keep your code.

Get it for $4/month

More from the catalogue

Other small tools

See everything →