Public holidays API: every holiday for a country and year

A public holidays API returns the official holidays for a country and year, usually with the local name and whether the day is nationwide or only in some regions. Nager.Date is a free, open-source source with no key, and the Python holidays library works offline. Our Public Holidays API is built on the open-source date-holidays library (data CC BY-SA 3.0) and adds the weekday and the next upcoming holiday for $0.002 per call.

Try it free Public Holidays API — 100+ countries, $0.002 · $0.002 / call

Free options first

SourceHowNotes
Nager.DateGET date.nager.at/api/v3/PublicHolidays/2027/USFree, no key, open source; its terms require commercial users to sponsor it
date-holidays (JavaScript library)npm install date-holidaysOffline; data CC BY-SA 3.0, so credit it if you republish
Python holidays librarypip install holidaysOffline; many countries and subdivisions
Government calendarsOfficial websitesThe final authority; formats vary
Public Holidays (iamai.markets)POST with country and year$0.002 per call; adds weekday and next holiday

Nager.Date in Python

import requests

days = requests.get("https://date.nager.at/api/v3/PublicHolidays/2027/DE", timeout=10).json()
for d in days:
    scope = "nationwide" if d["global"] else ", ".join(d["counties"] or [])
    print(d["date"], d["localName"], scope)

Regional holidays are the hard part

Germany, Switzerland, Spain, the US and Australia have holidays that apply only in some states or cantons. Corpus Christi is a holiday in Bavaria but not in Berlin. If you plan deliveries or payroll, check the regions list, not only the date.

Our API

Send a 2-letter country code and a year from 1975 to 2075. You get every holiday with date, weekday, English name, local name, nationwide true or false, the regions it applies to and its types, plus the next holiday from today. If the source has no data for a country, the call fails and isn't charged. Paid per call with x402 in USDC on Base; 5 free tries a day on the listing page.

curl -i -X POST https://iamai.markets/api/x402/services/hHSdW0-pDiBU \
  -H "Content-Type: application/json" \
  -d '{"country": "US", "year": 2027}'

# result: country, year, count, next, holidays [{date, weekday, name, local_name, nationwide, regions}]

Uses that save real time

The product

Questions

Does it include school holidays?

No. Public holidays only; school holidays vary by region and need another source.

Can I rely on it for legal deadlines?

Use it for planning, and confirm deadlines that carry penalties with the official government calendar, since governments sometimes add or move holidays at short notice.

Which countries are covered?

More than 100, from the open-source date-holidays library (data CC BY-SA 3.0). Some smaller countries are missing; the call tells you and isn't charged.

Related

Updated 2026-12-02