Holidays API

Holidays API

Dates of holidays for various countries, states and regions

Introduction

AnyAPI’s Holidays API allows you to retrieve a list of public, non-public, and religious holidays for various countries, states, and regions. You can use public holidays api to obtain information about holidays in specific locations or check if a particular date is a holiday.

Features

  • Endpoint for Checking Holidays: Public holidays API provides an endpoint that allows you to check whether a specific date is a holiday or not. By sending a request to this endpoint with the desired country and date, you can obtain information about the holiday(s) on that date, if any.
  • Endpoint for Retrieving Holiday List: API for holidays offers an endpoint to retrieve a list of holidays for a specific country. By specifying the country in the request, you can get a response containing details of various holidays, including the date, start and end times, name, type (public, observance, etc.), and rule (if applicable).
  • Country, State, and Region Support: Holidays API supports 200+ countries, states, and regions, allowing you to fetch holiday information for a wide range of locations globally. You can specify the desired country or region in your API requests to get the corresponding holiday data.
  • Localization: The API supports multiple languages, allowing you to retrieve holiday information in different languages. By specifying the desired language in the request, you can receive holiday names and other details in that particular language.
  • Datetime Parsing and Validation: Free holidays API includes functionality for parsing and validating datetime values. This ensures that the dates and times provided in the API requests are correctly interpreted and conform to the expected format.

Getting Started

To get started with the holidays API, you can create your API key for free on the AnyAPI.io platform. The API key is used for authentication and should be included in the request URL as a query parameter.

Let’s Try Sign In.

Supported Countries List

Below are the list of countries supported by the Holiday endpoints

Country CodeCountry NameSubdivision CodeSubdivision Name
ADAndorra07Andorra la Vella
AEدولة الإمارات العربية المتحدة
AGAntigua & Barbuda10Barbuda
AIAnguilla
ALShqipëri
AMՀայաստան
AOAngola
ARArgentina
ASAmerican Samoa
ATÖsterreich1Burgenland
ATÖsterreich2Kärnten
ATÖsterreich3Niederösterreich
ATÖsterreich4Oberösterreich
ATÖsterreich5Land Salzburg
ATÖsterreich6Steiermark
ATÖsterreich7Tirol
ATÖsterreich8Vorarlberg
ATÖsterreich9Wien
AUAustraliaACTAustralian Capital Territory
AUAustraliaNSWNew South Wales
AUAustraliaNTNorthern Territory
AUAustraliaQLDQueensland
AUAustraliaSASouth Australia
AUAustraliaTASTasmania
AUAustraliaVICVictoria
AUAustraliaWAWestern Australia
AWAruba
AXLandskapet Åland
AZAzərbaycan Respublikası
BABosna i HercegovinaBIHFederation of Bosnia and Herzegovina
BABosna i HercegovinaBIH-WWestern Herzegovina
BABosna i HercegovinaBRCBrčko District
BABosna i HercegovinaSRPRepublika Srpska
BBBarbados
BDগণপ্রজাতন্ত্রী বাংলাদেশ
BEBelgiqueBRUBruxelles
BEBelgiqueDEDeutschsprachige Gemeinschaft
BEBelgiqueVLGVlaamse Gemeenschap
BEBelgiqueWALCommunauté française
BFBurkina Faso
BGБългария
BHمملكة البحرين
BIRépublique du Burundi
BJRépublique du Bénin
BLSt. Barthélemy
BMBermuda
BNNegara Brunei Darussalam
BOBoliviaBBeni
BOBoliviaCCochabamba
BOBoliviaHChuquisaca
BOBoliviaLLa Paz
BOBoliviaNPando
BOBoliviaOOruro
BOBoliviaPPotosí
BOBoliviaSSanta Cruz
BOBoliviaTTarija
BQCaribisch NederlandBOBonaire
BQCaribisch NederlandSASaba
BQCaribisch NederlandSESint Eustatius
BRBrasilACAcre
BRBrasilALAlagoas
BRBrasilAMAmazonas
BRBrasilAPAmapá
BRBrasilBABahia
BRBrasilCECeará
BRBrasilDFDistrito Federal
BRBrasilMAMaranhão
BRBrasilMGMinas Gerais
BRBrasilMG-BHBelo Horizonte
BRBrasilMSMato Grosso do Sul
BRBrasilMTMato Grosso
BRBrasilPAPará
BRBrasilPBParaíba
BRBrasilPEPernambuco
BRBrasilPE-RERecife
BRBrasilPIPiauí
BRBrasilPRParaná
BRBrasilPR-CUCuritiba
BRBrasilRJRio de Janeiro
BRBrasilRJ-RJRio de Janeiro
BRBrasilRNRio Grande do Norte
BRBrasilRORondônia
BRBrasilRRRoraima
BRBrasilRSRio Grande do Sul
BRBrasilSCSanta Catarina
BRBrasilSESergipe
BRBrasilSPSão Paulo
BRBrasilSP-SPSão Paulo
BRBrasilTOTocantins
BSBahamas
BWBotswana
BYРэспубліка Беларусь
BZBelize
CACanadaABAlberta
CACanadaBCBritish Columbia
CACanadaMBManitoba
CACanadaNBNew Brunswick
CACanadaNLNewfoundland and Labrador
CACanadaNSNova Scotia
CACanadaNTNorthwest Territories
CACanadaNUNunavut
CACanadaONOntario
CACanadaPEPrince Edward Island
CACanadaQCQuebec
CACanadaSKSaskatchewan
CACanadaYTYukon
CCCocos (Keeling) Islands
CDRépublique démocratique du Congo
CFRépublique centrafricaine
CGRépublique du Congo
CHSchweizZHKanton Zürich
CHSchweizBEKanton Bern
CHSchweizLUKanton Luzern
CHSchweizURKanton Uri
CHSchweizSZKanton Schwyz
CHSchweizOWKanton Obwalden
CHSchweizNWKanton Nidwalden
CHSchweizGLKanton Glarus
CHSchweizZGKanton Zug
CHSchweizFRCanton de Fribourg
CHSchweizSOKanton Solothurn
CHSchweizBSKanton Basel-Stadt
CHSchweizBLKanton Basel-Landschaft
CHSchweizSHKanton Schaffhausen
CHSchweizARKanton Appenzell Ausserrhoden
CHSchweizAIKanton Appenzell Innerrhoden
CHSchweizSGKanton St. Gallen
CHSchweizGRKanton Graubünden
CHSchweizAGKanton Aargau
CHSchweizTGKanton Thurgau
CHSchweizTICanton Ticino
CHSchweizVDCanton de Vaud
CHSchweizVSCanton du Valais
CHSchweizNECanton de Neuchâtel
CHSchweizGECanton de Genève
CHSchweizJUCanton du Jura
CICôte d'Ivoire
CKCook Islands
CLChileAIAysén
CLChileANAntofagasta
CLChileAPArica y Parinacota
CLChileARAraucanía
CLChileATAtacama
CLChileBIBiobío
CLChileCOCoquimbo
CLChileLILibertador General Bernardo O'Higgins
CLChileLLLos Lagos
CLChileLRLos Ríos
CLChileMAMagallanes
CLChileMLMaule
CLChileRMRegión Metropolitana de Santiago
CLChileTATarapacá
CLChileVSValparaíso
CMRépublique du Cameroun
CN中国
COColombia
CRCosta Rica
CUCuba
CUCuba14Guantánamo
CVCabo Verde
CWCuraçao
CXChristmas Island
CYΚύπρος
CZČeská republika
DEDeutschlandBWBaden-Württemberg
DEDeutschlandBYBayern
DEDeutschlandBEBerlin
DEDeutschlandBBBrandenburg
DEDeutschlandHBBremen
DEDeutschlandHHHamburg
DEDeutschlandHEHessen
DEDeutschlandMVMecklenburg-Vorpommern
DEDeutschlandNINiedersachsen
DEDeutschlandNWNordrhein-Westfalen
DEDeutschlandRPRheinland-Pfalz
DEDeutschlandSLSaarland
DEDeutschlandSNSachsen
DEDeutschlandSTSachsen-Anhalt
DEDeutschlandSHSchleswig-Holstein
DEDeutschlandTHThüringen
DJجيبوتي
DKDanmark
DMDominica
DORepública Dominicana
DZالجزائر
ECEcuador
EEEesti
EGمصر
ERإرتريا
ESEspañaANAndalucía
ESEspañaARAragón
ESEspañaASAsturias, Principado de
ESEspañaCNCanarias
ESEspañaCBCantabria
ESEspañaCMCastilla-La Mancha
ESEspañaCLCastilla y León
ESEspañaCTCataluña
ESEspañaEXExtremadura
ESEspañaGAGalicia
ESEspañaIBBalears, Illes
ESEspañaRILa Rioja
ESEspañaMDMadrid, Comunidad de
ESEspañaMCMurcia, Región de
ESEspañaNCNavarra, Comunidad Foral de
ESEspañaPVPaís Vasco
ESEspañaVCValenciana, Comunidad
ETEthiopia
FISuomi
FJFiji
FMMicronesia
FOFøroyar
FRFranceAAlsace
FRFranceBAquitaine
FRFranceCAuvergne
FRFranceDBourgogne
FRFranceEBretagne
FRFranceFCentre
FRFranceGChampagne-Ardenne
FRFranceHCorse
FRFranceIFranche-Comté
FRFranceJÎle-de-France
FRFranceKLanguedoc-Roussillon
FRFranceLLimousin
FRFranceMLorraine
FRFranceNMidi-Pyrénées
FRFranceONord-Pas-de-Calais
FRFrancePBasse-Normandie
FRFranceQHaute-Normandie
FRFranceRPays de la Loire
FRFranceSPicardie
FRFranceTPoitou-Charentes
FRFranceUProvence-Alpes-Côte d'Azur
FRFranceVRhône-Alpes
FRFranceGUAGuadeloupe
FRFranceGUFGuyane
FRFranceMTQMartinique
FRFranceMYTMayotte
FRFranceNCLNouvelle-Calédonie
FRFrancePYFPolynésie française
FRFranceREULa Réunion
FRFranceSPMSaint-Pierre-et-Miquelon
FRFranceWLFWallis-et-Futuna
GAGabon
GBUnited KingdomENGEngland
GBUnited KingdomNIRNorthern Ireland
GBUnited KingdomSCTScotland
GBUnited KingdomWLSWales
GDGrenada
GEსაქართველო
GHGhana
GIGibraltar
GLKalaallit Nunaat
GMGambia
GNGuinée
GQGuinea Ecuatorial
GRΕλλάδα
GTGuatemala
GWGuiné-Bissau
GYGuyana
HK香港
HNHonduras
HRHrvatska17Splitsko-dalmatinska
HRHrvatska19Dubrovačko-neretvanska
HTHaïti
HUMagyarország
IDIndonesia
IEIreland
ILישראל
IMIsle of Man
IRایران
ISÍsland
ITItalia25Lombardia
ITItalia32Trentino-Alto Adige
JMJamaica
JOالأردن
JP日本
KEKenya
KGКыргызстан
KHកម្ពុជា
KIKiribati
KMالقمر
KNSaint Kitts and Nevis
KP조선민주주의인민공화국
KR대한민국
KWالكويت
KYCayman Islands
KZҚазақстан
LAລາວ
LBلبنان
LCSaint Lucia
LILiechtenstein
LKஇலங்கை
LRLiberia
LSLesotho
LTLietuva
LVLatvija
LYليبيا
MAالمغرب
MCMonaco
MDMoldova
MECrna Gora
MGMadagasikara
MHMarshall Islands
MKМакедонија
MLMali
MMမြန်မာ
MNМонгол улс
MO澳門
MPNorthern Mariana Islands
MRموريتانيا
MTMalta
MUMaurice
MVދިވެހި
MWMalawi
MXMéxico
MYMalaysia
MZMoçambique
NANamibia
NCNouvelle-Calédonie
NENiger
NGNigeria
NINicaragua
NLNederland
NONorge
NPनेपाल
NRNauru
NUNiue
NZNew Zealand
OMعُمان
PAPanamá
PEPerúAMAAmazonas
PEPerúCUSCusco
PFPolynésie française
PGPapua New Guinea
PHPilipinas
PKپاكستان‎
PLPolska
PMSaint-Pierre-et-Miquelon
PRPuerto Rico
PSفلسطين
PTPortugal
PWPalau
PYParaguay
QAقطر‎
RORomânia
RSСрбија
RUРоссия
RWRwanda
SBSolomon Islands
SCSeychelles
SDالسودان
SESverige
SGSingapore
SHSaint Helena, Ascension and Tristan da Cunha
SISlovenija
SJSvalbard and Jan Mayen
SKSlovensko
SLSierra Leone
SMSan Marino
SNSénégal
SOSoomaaliya
SRSuriname
SSجنوب السودان
STSão Tomé e Príncipe
SVEl Salvador
SXSint Maarten
SYسورية
SZEswatini
TCTurks and Caicos Islands
TDتشاد
TFTerres australes françaises
TGTogo
THไทย
TJТоҷикистон
TKTokelau
TLTimor-Leste
TMTürkmenistan
TNتونس‎
TOTonga
TRTürkiye
TTTrinidad and Tobago
TVTuvalu
TW台灣
TZTanzania
UAУкраїна
UGUganda
UMUnited States Minor Outlying Islands
USUnited StatesAKAlaska
USUnited StatesALAlabama
USUnited StatesARArkansas
USUnited StatesAZArizona
USUnited StatesCACalifornia
USUnited StatesCOColorado
USUnited StatesCTConnecticut
USUnited StatesDCDistrict of Columbia
USUnited StatesDEDelaware
USUnited StatesFLFlorida
USUnited StatesGAGeorgia
USUnited StatesHIHawaii
USUnited StatesIAIowa
USUnited StatesIDIdaho
USUnited StatesILIllinois
USUnited StatesINIndiana
USUnited StatesKSKansas
USUnited StatesKYKentucky
USUnited StatesLALouisiana
USUnited StatesMAMassachusetts
USUnited StatesMDMaryland
USUnited StatesMEMaine
USUnited StatesMIMichigan
USUnited StatesMNMinnesota
USUnited StatesMOMissouri
USUnited StatesMSMississippi
USUnited StatesMTMontana
USUnited StatesNCNorth Carolina
USUnited StatesNDNorth Dakota
USUnited StatesNENebraska
USUnited StatesNHNew Hampshire
USUnited StatesNJNew Jersey
USUnited StatesNMNew Mexico
USUnited StatesNVNevada
USUnited StatesNYNew York
USUnited StatesOHOhio
USUnited StatesOKOklahoma
USUnited StatesOROregon
USUnited StatesPAPennsylvania
USUnited StatesRIRhode Island
USUnited StatesSCSouth Carolina
USUnited StatesSDSouth Dakota
USUnited StatesTNTennessee
USUnited StatesTXTexas
USUnited StatesUTUtah
USUnited StatesVAVirginia
USUnited StatesVTVermont
USUnited StatesWAWashington
USUnited StatesWIWisconsin
USUnited StatesWVWest Virginia
USUnited StatesWYWyoming
UYUruguay
UZOʻzbekiston
VAHoly See
VCSaint Vincent and the Grenadines
VEVenezuela
VGVirgin Islands (British)
VIVirgin Islands (U.S.)
VNViệt Nam
VURépublique de Vanuatu
XKRepublika e Kosovës
YTMayotte
ZASouth Africa
ZMZambia
ZWZimbabwe

Check if a specific day is a holiday endpoint

Send a GET request to the following URL to Check if a specific day is a holiday

curl --request GET \
  --url 'https://anyapi.io/api/v1/holidays/check?date=2021-01-01%2000%3A00%3A00%20GMT%2B0000&country=US&apiKey=YOUR_API_KEY'
{
  "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"
    }
  ]
}

Request parameters

Use the parameters listed below to customize your request. Mandatory parameters are indicated

datestringRequired
A specific date (in the format "YYYY-MM-DD") to check if it is a holiday.
countrystringRequired
The country code (ISO 3166-1 alpha-2) for which you want to retrieve the holidays.
apiKeystringRequired
Your unique API key, which is required to authenticate your requests.

Response parameters

The API returns its response in a simple, lightweight JSON format.

datestring
The date of the holiday in the format "YYYY-MM-DD HH:mm:ss".
countrystring
The country for which the holidays are being retrieved.
holiday[].datestring
The date of the holiday.
holiday[].startstring
The start time of the holiday.
holiday[].endstring
The end time of the holiday.
holiday[].typestring
The type of the holiday (e.g., public, observance).
holiday[].namestring
The name of the holiday.

Returns a list of holidays endpoint

Send a GET request to the following URL to Returns a list of holidays

curl --request GET \
  --url 'https://anyapi.io/api/v1/holidays?country=US&state=SOME_STRING_VALUE&region=SOME_STRING_VALUE&language=SOME_STRING_VALUE&year=2022&apiKey=YOUR_API_KEY'
{
  "country": "US",
  "state": "",
  "region": "",
  "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 and if sunday then next monday if saturday then previous friday"
    }
  ]
}

Request parameters

Use the parameters listed below to customize your request. Mandatory parameters are indicated

countrystringRequired
The country for which you want to retrieve holidays.
statestringOptional
The state for which you want to retrieve holidays.
regionstringOptional
The region for which you want to retrieve holidays.
languagestringOptional
Set the locale
yearnumberOptional
The year for which you want to retrieve holidays.
apiKeystringRequired
Your unique API key, which is required to authenticate your requests.

Response parameters

The API returns its response in a simple, lightweight JSON format.

countrystring
The country for which the holidays are being retrieved.
statestring
The state for which the holidays are being retrieved.
regionstring
The region for which the holidays are being retrieved.
holidays[].datestring
The date of the holiday in the format "YYYY-MM-DD HH:mm:ss".
holidays[].startstring
The start time of the holiday in ISO 8601 format.
holidays[].endstring
The end time of the holiday in ISO 8601 format.
holidays[].namestring
The name of the holiday.
holidays[].typestring
The type of the holiday, either "public" or "observance".
holidays[].rulestring
The rule or criteria for observing the holiday, such as "3rd monday in January" or "02-14".

Response and error codes

Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.

Status CodeTypeDetails
200OKThe request was successful.
400Bad RequestThe request was invalid or cannot be otherwise served.
401UnauthorizedAuthentication credentials were missing or incorrect.
422Quota reachedThe request cannot be served due to the application's rate limit having been exhausted for the resource.
404Not FoundThe requested resource could not be found.
429Too Many RequestsThe request cannot be served due to the application's rate limit having been exhausted for the resource.
500Internal Server ErrorSomething went wrong on the server.
503Service UnavailableThe service is temporarily unavailable.