Public Holidays API

The Public Holidays API provides public holiday information for countries around the world. Get holiday data from 1980 to 2050 for over 100 countries.

For non-public holidays, religious holidays, and other special events, please use the Holidays API instead.

(4.7)

From 5,929 users

2,400+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
299ms345ms380ms617ms995ms

Didn't find what you were looking for? Suggest an improvement


/v1/publicholidays GET

https://api.api-ninjas.com/v1/publicholidays

Returns a list of public holidays for a given country and year.

To look up whether a given date is a public holiday, use the /v1/ispublicholiday endpoint instead.

Parameters

  • country  required

    2-letter ISO country code or full country name.

  • year  optionalpremium only

    Calendar year between 1980 and 2050 (inclusive). Defaults to current year.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The response will be a JSON object with the following fields:

  • name

    Holiday name.

  • local_name

    Local holiday name. This is often (but not always) the same as the name.

  • date

    Holiday date.

  • country

    2-letter ISO country code.

  • year

    Calendar year.

  • regions

    List of regions where the holiday is observed.

  • federal

    Whether the holiday is a federal holiday.

Sample Request Live Demo!

country
year premium

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

https://api.api-ninjas.com/v1/publicholidays?country=US

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/publicholidays?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/ispublicholiday GET

https://api.api-ninjas.com/v1/ispublicholiday

Returns whether a given date is a public holiday for a given country.

Parameters

  • country  required

    2-letter ISO country code.

  • date  required

    Date in YYYY-MM-DD format. Must be between 1980-01-01 and 2050-12-31 (inclusive).

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The response will be a JSON object with the following fields:

  • is_public_holiday

    Whether the date is a public holiday.

  • public_holiday_name

    Name of the public holiday.

  • date

    Holiday date in YYYY-MM-DD format.

  • country

    2-letter ISO country code.

Sample Request Live Demo!

country
date

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

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

Headers

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

Sample Response

JSON