Holidays API

Holidays API

Dates of holidays for various countries, states and regions

Overview

Retrieve a list of public, non-public and religious holidays for various countries, states and regions. You can retrieve a list of holidays or check a specific date.

Features

Example

To retrieve a list of holidays for a specific country, send the following request:

curl -X 'GET' 'https://anyapi.io/api/v1/holidays?country=CA&apiKey=<YOUR_API_KEY>'

which returns this payload:

{
  "country": "CA",
  "holidays": [
    {
    "date": "2021-01-01 00:00:00",
    "start": "2021-01-01T05:00:00.000Z",
    "end": "2021-01-02T05:00:00.000Z",
    "name": "New Year's Day",
    "type": "public",
    "rule": "01-01"
    },
    {
    "date": "2021-02-02 00:00:00",
    "start": "2021-02-02T05:00:00.000Z",
    "end": "2021-02-03T05:00:00.000Z",
    "name": "Groundhog Day",
    "type": "observance",
    "rule": "02-02"
    },
    ...
    {
    "date": "2021-12-26 00:00:00",
    "start": "2021-12-26T05:00:00.000Z",
    "end": "2021-12-27T05:00:00.000Z",
    "name": "Boxing Day",
    "type": "public",
    "rule": "12-26"
    }
  ],
  "languages": [
    "en",
    "fr"
  ]
}

Or you can optionally set the locale to

fr
:

curl -X 'GET' 'https://anyapi.io/api/v1/holidays?country=CA&language=fr&apiKey=<YOUR_API_KEY>'

which returns:

{
  "country": "CA",
  "holidays": [
    {
      "date": "2021-01-01 00:00:00",
      "start": "2021-01-01T05:00:00.000Z",
      "end": "2021-01-02T05:00:00.000Z",
      "name": "Nouvel An",
      "type": "public",
      "rule": "01-01"
    },
    {
      "date": "2021-02-02 00:00:00",
      "start": "2021-02-02T05:00:00.000Z",
      "end": "2021-02-03T05:00:00.000Z",
      "name": "Jour de la marmotte",
      "type": "observance",
      "rule": "02-02"
    },
    {
      "date": "2021-02-14 00:00:00",
      "start": "2021-02-14T05:00:00.000Z",
      "end": "2021-02-15T05:00:00.000Z",
      "name": "Saint-Valentin",
      "type": "observance",
      "rule": "02-14"
    },
    ...
  ],
  "languages": [
    "fr",
    "en"
  ]
}

To check whether a specific datetime is a holiday, send the following request:

curl -X 'GET' 'https://anyapi.io/api/v1/holidays/check/?country=US&date=2021-01-02'
{
  "date": "2021-01-02",
  "country": "US",
  "holiday": [
    {
      "date": "2021-01-01 00:00:00",
      "start": "2021-01-01T05:00:00.000Z",
      "end": "2021-01-02T05:00:00.000Z",
      "name": "New Year's Day",
      "type": "public"
    }
  ]
}

Endpoints

This API provides the following endpoints:

Check out the Holidays API Docs for more details.