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:

(4.2)

From 5,149 users

3,600+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
391ms441ms438ms770ms1162ms

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

  • country  required

    Country name or ISO 3166-2 country code (preferred).

  • year  optionalpremium only

    Calendar year between 2005 and 2039 (inclusive). Default is the current year. Note: not all countries are guaranteed to contain data going back to 2005.

  • type  optional

    Holiday type filter. Possible values are:

    Show all types

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.

  • country

    Country name.

  • iso

    2-letter ISO 3166 alpha-2 country code.

  • year

    The year for which the holiday is observed.

  • date

    Date of the holiday in YYYY-MM-DD format.

  • day

    Day of the week.

  • name

    Name of the holiday.

  • type

    Type of holiday. See the type parameter for possible values.

Sample Request Live Demo!

country
year premium
type

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v2/holidays?country=CA&type=public_holiday

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON

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

  • date  required

    Date in YYYY-MM-DD format (e.g. 2025-12-25). Note: dates in future calendar years are for premium subscribers only.

  • country  optional

    Country name or ISO 3166-2 country code (preferred). If not specified, holidays from all countries are returned.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.

  • country

    Country name.

  • iso

    2-letter ISO 3166 alpha-2 country code.

  • year

    The year for which the holiday is observed.

  • date

    Date of the holiday in YYYY-MM-DD format.

  • day

    Day of the week.

  • name

    Name of the holiday.

  • type

    Type of holiday. See the type parameter for possible values.

Sample Request Live Demo!

date
country

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/isholiday?date=2025-01-01&country=CA

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON

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.