World Reference Data API

Countries, ISO 3166-2 subdivisions, currencies, IANA time zones with DST transitions, rule-computed public holidays with business-day maths, 8,900+ airports, languages and locales, calling codes, postal-code formats and ECB reference exchange rates — one key, one envelope.

Reference data developers otherwise stitch together from five sources, bundled at the edge and answered in milliseconds: ISO 3166-1 countries (codes, capital, coordinates, area, population, M49 region, currencies, calling code, TLD, languages, neighbours, weekend, postal-code format), 5,000+ ISO 3166-2 subdivisions, ISO 4217 currencies with minor units, every IANA time zone with current offset, DST transitions and conversions, public holidays computed from rules for 200+ countries with business-day checks, additions and counts, 8,900+ IATA airports with time zones, nearest-airport and great-circle distance, ISO 639 languages, BCP 47 locale facts, calling codes and the European Central Bank’s euro reference rates (cached ≥ 6 h, attributed).

Everything except the ECB rates is computed from bundled, licence-checked datasets (GeoNames CC BY 4.0, Unicode CLDR, IANA tz, OurAirports public domain, Wikidata CC0, date-holidays CC BY 3.0) — no third-party API sits in the request path, so answers are fast, deterministic for the same input and dataset version, and private. Sources and attribution: /attribution.

Endpoints (32)

MethodPathSummary
GET/v1/countriesList countries, filtered by region, currency, language or calling code
GET/v1/countries/lookupEverything about one country: codes, capital, coordinates, population, currencies, time zones, week
GET/v1/countries/searchFind countries by name in any language, or by code
GET/v1/postal-codes/validateCheck a postal code against the country’s published format
GET/v1/calling-codesList international calling codes and the countries that share them
GET/v1/calling-codes/lookupCalling code, dialling prefixes and an example number for a country (or countries for a code)
GET/v1/subdivisionsList ISO 3166-2 subdivisions of a country
GET/v1/subdivisions/lookupLook up one ISO 3166-2 subdivision with its parents and children
GET/v1/currenciesList current ISO 4217 currencies with names, symbols and minor units
GET/v1/currencies/lookupOne currency: names, symbols, minor units, countries and a formatted sample
GET/v1/rates/latestLatest ECB reference exchange rates for any base currency
GET/v1/rates/convertConvert an amount between currencies at the ECB reference rate
GET/v1/rates/historyECB reference rates of a past day (last 90 days)
GET/v1/rates/seriesDaily ECB reference rates between two dates (time series, last 90 days)
GET/v1/timezonesList IANA time zones with their countries and current offsets
GET/v1/timezones/infoOffset, DST status, local time and next/previous transition of a zone
GET/v1/timezones/transitionsAll DST / offset transitions of a zone between two dates
GET/v1/timezones/convertConvert a date-time from one time zone to another (DST-safe)
GET/v1/holidaysPublic holidays of a country (and subdivision) in a year — computed from rules
GET/v1/holidays/checkIs a date a holiday, a weekend day or a business day in a country?
GET/v1/holidays/nextUpcoming holidays of a country from a date
GET/v1/holidays/countriesCountries and subdivisions with holiday rules
GET/v1/business-days/checkIs a date a business day? Plus the previous and next business days
GET/v1/business-days/addAdd or subtract business days (WORKDAY semantics, holiday-aware)
GET/v1/business-days/countCount business days between two dates (NETWORKDAYS semantics)
GET/v1/airports/lookupAirport by IATA or ICAO code
GET/v1/airports/searchSearch airports by name, city or code
GET/v1/airports/nearestNearest airports to a coordinate
GET/v1/airports/distanceGreat-circle distance and bearing between two airports
GET/v1/languagesList languages with ISO 639 codes, names and speaker estimates
GET/v1/languages/lookupOne language by ISO 639-1, 639-2/T, 639-2/B or 639-3 code
GET/v1/locales/infoFacts about a BCP 47 locale: likely script/region, direction, week, formats

Quick start

Example: GET /v1/countries

cURL

curl --request GET 'https://world-reference-data-api.p.rapidapi.com/v1/countries?continent=AF&locale=de' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: world-reference-data-api.p.rapidapi.com'

JavaScript (fetch)

const res = await fetch('https://world-reference-data-api.p.rapidapi.com/v1/countries?continent=AF&locale=de', {
  method: 'GET',
  headers: {
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    "X-RapidAPI-Host": "world-reference-data-api.p.rapidapi.com"
  },
});
const { success, data, error } = await res.json();

Python (requests)

import requests

resp = requests.request(
    "GET",
    "https://world-reference-data-api.p.rapidapi.com/v1/countries?continent=AF&locale=de",
    headers={"X-RapidAPI-Key":"YOUR_RAPIDAPI_KEY","X-RapidAPI-Host":"world-reference-data-api.p.rapidapi.com"},
    timeout=10,
)
print(resp.json())

Limits

EndpointLimit
GET /v1/countriesquery string ≤ 2048 bytes; returns at most 250 items
GET /v1/countries/lookupquery string ≤ 2048 bytes; one country per call
GET /v1/countries/searchquery string ≤ 2048 bytes; q ≤ 60 characters; limit ≤ 50
GET /v1/postal-codes/validatequery string ≤ 2048 bytes; code ≤ 16 characters
GET /v1/calling-codesquery string ≤ 2048 bytes; no parameters
GET /v1/calling-codes/lookupquery string ≤ 2048 bytes; one country or calling code per call
GET /v1/subdivisionsquery string ≤ 2048 bytes; one country per call
GET /v1/subdivisions/lookupquery string ≤ 2048 bytes; one code per call
GET /v1/currenciesquery string ≤ 2048 bytes; returns at most 160 items
GET /v1/currencies/lookupquery string ≤ 2048 bytes; one currency per call
GET /v1/rates/latestquery string ≤ 2048 bytes; symbols ≤ 200 characters
GET /v1/rates/convertquery string ≤ 2048 bytes; |amount| ≤ 1e15
GET /v1/rates/historyquery string ≤ 2048 bytes; symbols ≤ 200 characters; dates within the last 90 days
GET /v1/rates/seriesquery string ≤ 2048 bytes; symbols ≤ 10 codes; range inside the last 90 days
GET /v1/timezonesquery string ≤ 2048 bytes; returns at most 420 items
GET /v1/timezones/infoquery string ≤ 2048 bytes; one zone per call
GET /v1/timezones/transitionsquery string ≤ 2048 bytes; range ≤ 10 years
GET /v1/timezones/convertquery string ≤ 2048 bytes; one conversion per call
GET /v1/holidaysquery string ≤ 2048 bytes; year 1970–2100
GET /v1/holidays/checkquery string ≤ 2048 bytes; date within 1970–2100
GET /v1/holidays/nextquery string ≤ 2048 bytes; limit ≤ 50
GET /v1/holidays/countriesquery string ≤ 2048 bytes; no limit parameters
GET /v1/business-days/checkquery string ≤ 2048 bytes; date within 1970–2100
GET /v1/business-days/addquery string ≤ 2048 bytes; |days| ≤ 2,500
GET /v1/business-days/countquery string ≤ 2048 bytes; range ≤ 3,660 days
GET /v1/airports/lookupquery string ≤ 2048 bytes; one code per call
GET /v1/airports/searchquery string ≤ 2048 bytes; q ≤ 60 characters; limit ≤ 50
GET /v1/airports/nearestquery string ≤ 2048 bytes; limit ≤ 25; max_km ≤ 20,000
GET /v1/airports/distancequery string ≤ 2048 bytes; two codes per call
GET /v1/languagesquery string ≤ 2048 bytes; returns at most 400 items
GET /v1/languages/lookupquery string ≤ 2048 bytes; one code per call
GET /v1/locales/infoquery string ≤ 2048 bytes; tag ≤ 35 characters

Responses

Every response is JSON. Success: {"success":true,"data":…,"meta":{"request_id","ms","source"}}. Errors: {"success":false,"error":{"code","message","hint","docs_url","request_id"}} with a semantically correct HTTP status — see the error catalogue.

Version 1.0.0 · We never log request bodies, query values, headers or IP addresses.