Holidays API
The Holidays API provides holiday information for over 230 countries and territories around the world, from 2005 to 2039. The data includes public holidays, religious dates, bank holidays, and many other categories.
If you are only interested in public holidays over a longer range of years, please use the Public Holidays API instead, which covers 1980 to 2050 for over 100 countries.
Invalid input returns HTTP 400 with an error message: an unrecognized country, a country without data, a malformed date, a year outside the supported range, or an unknown type.
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
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
countryrequired2-letter ISO 3166-1 alpha-2 country code (preferred, e.g.
US), 3-letter alpha-3 code (e.g.USA), or English country name (e.g.United States). Not case-sensitive. Names must match exactly; common short names such asUK,USA,UAEandSouth Koreaalso work. Territories have their own codes: for example, Curaçao isCWand Sint Maarten isSX, notNL. An unrecognized country returns a400error.yearoptionalPremium onlyCalendar year between
2005and2039(inclusive). Defaults to the current year. Free plans can omit it or pass the current year; other years require a premium plan.typeoptionalReturn only one type of holiday. Not case-sensitive:
PUBLIC_HOLIDAYandpublic_holidayare equivalent, andmajor_holidayis accepted as an alias ofpublic_holiday. An unknown value returns a400error. Possible values:Type Description PUBLIC_HOLIDAYA national day off for the general population. Includes national holidays with a religious origin, such as Good Friday and Christmas Day in Germany. STATE_HOLIDAYA holiday observed at the state or regional level within a country, applicable to residents of that state but not necessarily the nation as a whole. LOCAL_HOLIDAYA holiday observed only within a specific city, district, or municipality, with no broader regional or national application. PROVINCE_TERRITORY_HOLIDAYA holiday specific to a province or territory within a federal state, such as those observed in Canadian provinces or Australian territories. DE_FACTO_HOLIDAYA day that is widely treated as a holiday in practice (through informal tradition, employer convention, or cultural norm) without a formal legal mandate. SUBSTITUTE_HOLIDAYA replacement day off granted when an official holiday falls on a weekend or non-working day, or when a holiday is moved to another date. BANK_HOLIDAYA day on which banks and financial institutions are officially closed. May or may not align with a general public holiday. GOVERNMENT_HOLIDAYA day off that applies specifically to government employees and public sector workers, which may not extend to the private sector or general population. PRIVATE_SECTOR_HOLIDAYA day off that applies specifically to private sector employees, which may differ from public sector or general population holidays. OPTIONAL_HOLIDAYA holiday that individuals or employers may choose to observe, but which carries no universal legal obligation. RESTRICTED_TRADING_DAYA day on which commercial or retail activity is permitted but subject to legal restrictions, such as limited trading hours. Not a full day off. CHRISTIAN_HOLIDAYA Western Christian (Catholic or Protestant) religious observance that is not a national day off. ORTHODOX_HOLIDAYAn Eastern Orthodox Christian religious observance that is not a national day off. MUSLIM_HOLIDAYAn Islamic religious observance that is not a national day off. JEWISH_HOLIDAYA Jewish religious observance that is not a national day off. HINDU_HOLIDAYA Hindu religious observance that is not a national day off. OBSERVANCEA recognized day of cultural, civic, or commemorative significance that is not an official day off. A holiday that is suspended or cancelled in a given year is also typed OBSERVANCEfor that year.UNITED_NATIONS_OBSERVANCEAn observance designated by the United Nations or another international body, recognised globally rather than within a single country or region. FLAG_DAYA day designated to honour a nation's flag, often marked by ceremonies or displays. SILENT_DAYA day on which noise, public gatherings, or commercial activity is restricted by law or strong cultural convention, typically for remembrance or mourning. HALF_DAYA partial holiday on which businesses or institutions close for only part of the day, typically the afternoon. WORKING_DAYA regular working day that may coincide with a notable calendar event but is not a day off. SEASONAn astronomical event marking the start of a new season: an equinox or solstice. CLOCK_CHANGEA day on which clocks are adjusted for daylight saving time. Not a day off, but a notable calendar event affecting daily schedules. COVID_19_MEASUREA non-working day or closure introduced in response to the COVID-19 pandemic, such as a lockdown, work suspension, or emergency public holiday. SPORTING_EVENTA day designated around a major sporting event, which may result in altered working hours, public gatherings, or unofficial closures.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
The /v2/holidays endpoint returns a JSON array of objects, each with the following fields, or an error if the request is unsuccessful.
countryName of the country or territory.
iso2-letter ISO 3166-1 alpha-2 code of the country or territory, in upper case.
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, in upper case (e.g.
PUBLIC_HOLIDAY). See the type parameter for possible values.
Live Demo
Code Examples
curl -X GET "https://api.api-ninjas.com/v2/holidays?country=US&type=public_holiday" \
-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.
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 Premium only. Free plans can query past years and the current year.countryoptional2-letter ISO 3166-1 alpha-2 country code (preferred), 3-letter alpha-3 code, or English country name, matched exactly as for /v2/holidays. If not specified, holidays from all countries are returned.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
The /v1/isholiday endpoint returns a JSON array of objects, each with the following fields, or an error if the request is unsuccessful.
countryName of the country or territory.
iso2-letter ISO 3166-1 alpha-2 code of the country or territory, in upper case.
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, in upper case (e.g.
PUBLIC_HOLIDAY). See the type parameter for possible values.
Live Demo
Code Examples
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 and territories worldwide, with the/v2/holidaysendpoint supporting any calendaryearbetween2005and2039. Territories have their own ISO codes, for example Curaçao (CW) and Guadeloupe (GP). 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 26 supported categories. The filter is not case-sensitive.PUBLIC_HOLIDAYcovers every national day off, including national holidays with a religious origin such as Good Friday in Germany. 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. Free plans can request the current year; other years viayear, and dates in future years viadate, require a premium subscription.
Explore API integration use cases for recommended APIs and workflow examples.