Free Geography & Reference API

Country profiles with capitals, ISO codes, currencies and flags; public holidays for more than 100 countries; and IPv4/IPv6 geolocation — three classic reference datasets behind one key.

Endpoints

MethodEndpointDescriptionSource
GET /api/v1/geography/countries?search=... Search countries by name mledoze/countries
GET /api/v1/geography/countries/{code} Country by ISO alpha-2/alpha-3 code mledoze/countries
GET /api/v1/geography/holidays?country=US&year=2026 Public holidays for a country/year Nager.Date
GET /api/v1/geography/ip-lookup?ip=... Geolocate an IPv4/IPv6 address ip-api.com

Full request/response details for every endpoint are in the API documentation.

Example request

curl "https://freeopenapi.dev/api/v1/geography/countries/NL" \
  -H "X-Api-Key: YOUR_API_KEY"

Works the same with ?apiKey=... as a query parameter. Every response carries X-RateLimit-Limit / X-RateLimit-Remaining headers so you can track your budget.

Switching from another API?

Looking for a restcountries.com alternative? The free restcountries v3.1 API has been discontinued and its successor requires a paid key. Our country endpoints serve the same kind of data (names, capitals, ISO codes, currencies, languages, flags) from the openly licensed mledoze/countries dataset — with a free tier and no key migration every time an upstream disappears.

Frequently asked questions

Is the country and holidays API really free?

Yes. The free tier includes 100 requests per day and only requires a verified email address — no credit card. Paid Pro and Business tiers raise the daily limit.

Which countries have holiday data?

Public holidays are available for over 100 countries, per calendar year, including regional holidays where the source data provides them.

Can I look up both IPv4 and IPv6 addresses?

Yes, the IP lookup endpoint accepts both and returns country, region, city, coordinates, timezone and ISP.

How do I get an API key?

Request a key with your email address on the Docs page, click the confirmation link we send you, and your key is active immediately on the free tier.

More free APIs, same key