Holidays API
The Holidays API provides holiday information on over 230 countries, regions, and territories around the world. It contains holiday data going back previous years as well as calendars in the future. The data incudes public holidays, different religious dates, bank holidays, and many other categories.
If you are only interested in public holidays, please use the Public Holidays API instead as it contains holiday data for many more years.
Available endpoints:
- /v2/holidays - Get holidays for a given country and year
- /v1/isholiday - Check if a specific date is a holiday
From 5,149 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 345ms | 392ms | 442ms | 602ms | 1158ms |
Didn't find what you were looking for? Suggest an improvement
/v2/holidays GET
https://api.api-ninjas.com/v2/holidays
Returns a list of holiday entries for a given country and year. Each entry in the response contains the holiday name, date, day of the week, and the type of holiday.
Parameters
countryrequiredCountry name or ISO 3166-2 country code (preferred).
yearoptionalpremium onlyCalendar year between
2005and2039(inclusive). Default is the current year. Note: not all countries are guaranteed to contain data going back to 2005.typeoptionalHoliday type filter. Possible values are:
Show all types ▼
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.
countryCountry name.
iso2-letter ISO 3166 alpha-2 country code.
yearThe year for which the holiday is observed.
dateDate of the holiday in YYYY-MM-DD format.
dayDay of the week.
nameName of the holiday.
typeType of holiday. See the type parameter for possible values.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v2/holidays?country=CA&type=public_holidayHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v2/holidays?country=US&year=2024" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
/v1/isholiday GET
https://api.api-ninjas.com/v1/isholiday
Returns a list of all holidays that fall on a given date. If no country is specified, holidays from all countries matching the date are returned.
Parameters
daterequiredDate in
YYYY-MM-DDformat (e.g.2025-12-25). Note: dates in future calendar years are for premium subscribers only.countryoptionalCountry name or ISO 3166-2 country code (preferred). If not specified, holidays from all countries are returned.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.
countryCountry name.
iso2-letter ISO 3166 alpha-2 country code.
yearThe year for which the holiday is observed.
dateDate of the holiday in YYYY-MM-DD format.
dayDay of the week.
nameName of the holiday.
typeType of holiday. See the type parameter for possible values.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/isholiday?date=2025-01-01&country=CAHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/isholiday?date=2025-01-01&country=CA" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
Frequently Asked Questions
Can I use the Holidays API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Holidays API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Holidays API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Holidays API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.What countries and years does the Holidays API cover?
The Holidays API provides holiday information for over 230 countries, regions, and territories worldwide, with the/v2/holidaysendpoint supporting any calendaryearbetween2005and2039(not all countries have data going back to 2005). If you only need public holidays across a wider range of years, consider the dedicated Public Holidays API instead.What is the difference between the /v2/holidays and /v1/isholiday endpoints?
The/v2/holidaysendpoint returns a list of all holidays for a givencountryandyear, while/v1/isholidayreturns the holidays that fall on a specificdate(returning matches across all countries ifcountryis omitted). To simply check whether a date is a business day instead, see the Working Days API.How do I filter holidays by category, such as bank holidays or religious dates?
Pass the optionaltypeparameter to the/v2/holidaysendpoint with a value likepublic_holiday,bank_holiday,christian_holiday, orobservance, among more than 25 supported categories. If you specifically only need bank closures, the Bank Holidays API may be a better fit.What fields are included in the Holidays API response?
Each holiday object includescountry, theisoalpha-2 code,year, thedatein YYYY-MM-DD format, thedayof the week, the holidayname, and itstype; a failed request returns an error instead. Note that querying historical or future years via theyearanddateparameters requires a premium subscription.