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 Code | Country Name | Subdivision Code | Subdivision Name |
---|---|---|---|
AD | Andorra | 07 | Andorra la Vella |
AE | دولة الإمارات العربية المتحدة | ||
AG | Antigua & Barbuda | 10 | Barbuda |
AI | Anguilla | ||
AL | Shqipëri | ||
AM | Հայաստան | ||
AO | Angola | ||
AR | Argentina | ||
AS | American Samoa | ||
AT | Österreich | 1 | Burgenland |
AT | Österreich | 2 | Kärnten |
AT | Österreich | 3 | Niederösterreich |
AT | Österreich | 4 | Oberösterreich |
AT | Österreich | 5 | Land Salzburg |
AT | Österreich | 6 | Steiermark |
AT | Österreich | 7 | Tirol |
AT | Österreich | 8 | Vorarlberg |
AT | Österreich | 9 | Wien |
AU | Australia | ACT | Australian Capital Territory |
AU | Australia | NSW | New South Wales |
AU | Australia | NT | Northern Territory |
AU | Australia | QLD | Queensland |
AU | Australia | SA | South Australia |
AU | Australia | TAS | Tasmania |
AU | Australia | VIC | Victoria |
AU | Australia | WA | Western Australia |
AW | Aruba | ||
AX | Landskapet Åland | ||
AZ | Azərbaycan Respublikası | ||
BA | Bosna i Hercegovina | BIH | Federation of Bosnia and Herzegovina |
BA | Bosna i Hercegovina | BIH-W | Western Herzegovina |
BA | Bosna i Hercegovina | BRC | Brčko District |
BA | Bosna i Hercegovina | SRP | Republika Srpska |
BB | Barbados | ||
BD | গণপ্রজাতন্ত্রী বাংলাদেশ | ||
BE | Belgique | BRU | Bruxelles |
BE | Belgique | DE | Deutschsprachige Gemeinschaft |
BE | Belgique | VLG | Vlaamse Gemeenschap |
BE | Belgique | WAL | Communauté française |
BF | Burkina Faso | ||
BG | България | ||
BH | مملكة البحرين | ||
BI | République du Burundi | ||
BJ | République du Bénin | ||
BL | St. Barthélemy | ||
BM | Bermuda | ||
BN | Negara Brunei Darussalam | ||
BO | Bolivia | B | Beni |
BO | Bolivia | C | Cochabamba |
BO | Bolivia | H | Chuquisaca |
BO | Bolivia | L | La Paz |
BO | Bolivia | N | Pando |
BO | Bolivia | O | Oruro |
BO | Bolivia | P | Potosí |
BO | Bolivia | S | Santa Cruz |
BO | Bolivia | T | Tarija |
BQ | Caribisch Nederland | BO | Bonaire |
BQ | Caribisch Nederland | SA | Saba |
BQ | Caribisch Nederland | SE | Sint Eustatius |
BR | Brasil | AC | Acre |
BR | Brasil | AL | Alagoas |
BR | Brasil | AM | Amazonas |
BR | Brasil | AP | Amapá |
BR | Brasil | BA | Bahia |
BR | Brasil | CE | Ceará |
BR | Brasil | DF | Distrito Federal |
BR | Brasil | MA | Maranhão |
BR | Brasil | MG | Minas Gerais |
BR | Brasil | MG-BH | Belo Horizonte |
BR | Brasil | MS | Mato Grosso do Sul |
BR | Brasil | MT | Mato Grosso |
BR | Brasil | PA | Pará |
BR | Brasil | PB | Paraíba |
BR | Brasil | PE | Pernambuco |
BR | Brasil | PE-RE | Recife |
BR | Brasil | PI | Piauí |
BR | Brasil | PR | Paraná |
BR | Brasil | PR-CU | Curitiba |
BR | Brasil | RJ | Rio de Janeiro |
BR | Brasil | RJ-RJ | Rio de Janeiro |
BR | Brasil | RN | Rio Grande do Norte |
BR | Brasil | RO | Rondônia |
BR | Brasil | RR | Roraima |
BR | Brasil | RS | Rio Grande do Sul |
BR | Brasil | SC | Santa Catarina |
BR | Brasil | SE | Sergipe |
BR | Brasil | SP | São Paulo |
BR | Brasil | SP-SP | São Paulo |
BR | Brasil | TO | Tocantins |
BS | Bahamas | ||
BW | Botswana | ||
BY | Рэспубліка Беларусь | ||
BZ | Belize | ||
CA | Canada | AB | Alberta |
CA | Canada | BC | British Columbia |
CA | Canada | MB | Manitoba |
CA | Canada | NB | New Brunswick |
CA | Canada | NL | Newfoundland and Labrador |
CA | Canada | NS | Nova Scotia |
CA | Canada | NT | Northwest Territories |
CA | Canada | NU | Nunavut |
CA | Canada | ON | Ontario |
CA | Canada | PE | Prince Edward Island |
CA | Canada | QC | Quebec |
CA | Canada | SK | Saskatchewan |
CA | Canada | YT | Yukon |
CC | Cocos (Keeling) Islands | ||
CD | République démocratique du Congo | ||
CF | République centrafricaine | ||
CG | République du Congo | ||
CH | Schweiz | ZH | Kanton Zürich |
CH | Schweiz | BE | Kanton Bern |
CH | Schweiz | LU | Kanton Luzern |
CH | Schweiz | UR | Kanton Uri |
CH | Schweiz | SZ | Kanton Schwyz |
CH | Schweiz | OW | Kanton Obwalden |
CH | Schweiz | NW | Kanton Nidwalden |
CH | Schweiz | GL | Kanton Glarus |
CH | Schweiz | ZG | Kanton Zug |
CH | Schweiz | FR | Canton de Fribourg |
CH | Schweiz | SO | Kanton Solothurn |
CH | Schweiz | BS | Kanton Basel-Stadt |
CH | Schweiz | BL | Kanton Basel-Landschaft |
CH | Schweiz | SH | Kanton Schaffhausen |
CH | Schweiz | AR | Kanton Appenzell Ausserrhoden |
CH | Schweiz | AI | Kanton Appenzell Innerrhoden |
CH | Schweiz | SG | Kanton St. Gallen |
CH | Schweiz | GR | Kanton Graubünden |
CH | Schweiz | AG | Kanton Aargau |
CH | Schweiz | TG | Kanton Thurgau |
CH | Schweiz | TI | Canton Ticino |
CH | Schweiz | VD | Canton de Vaud |
CH | Schweiz | VS | Canton du Valais |
CH | Schweiz | NE | Canton de Neuchâtel |
CH | Schweiz | GE | Canton de Genève |
CH | Schweiz | JU | Canton du Jura |
CI | Côte d'Ivoire | ||
CK | Cook Islands | ||
CL | Chile | AI | Aysén |
CL | Chile | AN | Antofagasta |
CL | Chile | AP | Arica y Parinacota |
CL | Chile | AR | Araucanía |
CL | Chile | AT | Atacama |
CL | Chile | BI | Biobío |
CL | Chile | CO | Coquimbo |
CL | Chile | LI | Libertador General Bernardo O'Higgins |
CL | Chile | LL | Los Lagos |
CL | Chile | LR | Los Ríos |
CL | Chile | MA | Magallanes |
CL | Chile | ML | Maule |
CL | Chile | RM | Región Metropolitana de Santiago |
CL | Chile | TA | Tarapacá |
CL | Chile | VS | Valparaíso |
CM | République du Cameroun | ||
CN | 中国 | ||
CO | Colombia | ||
CR | Costa Rica | ||
CU | Cuba | ||
CU | Cuba | 14 | Guantánamo |
CV | Cabo Verde | ||
CW | Curaçao | ||
CX | Christmas Island | ||
CY | Κύπρος | ||
CZ | Česká republika | ||
DE | Deutschland | BW | Baden-Württemberg |
DE | Deutschland | BY | Bayern |
DE | Deutschland | BE | Berlin |
DE | Deutschland | BB | Brandenburg |
DE | Deutschland | HB | Bremen |
DE | Deutschland | HH | Hamburg |
DE | Deutschland | HE | Hessen |
DE | Deutschland | MV | Mecklenburg-Vorpommern |
DE | Deutschland | NI | Niedersachsen |
DE | Deutschland | NW | Nordrhein-Westfalen |
DE | Deutschland | RP | Rheinland-Pfalz |
DE | Deutschland | SL | Saarland |
DE | Deutschland | SN | Sachsen |
DE | Deutschland | ST | Sachsen-Anhalt |
DE | Deutschland | SH | Schleswig-Holstein |
DE | Deutschland | TH | Thüringen |
DJ | جيبوتي | ||
DK | Danmark | ||
DM | Dominica | ||
DO | República Dominicana | ||
DZ | الجزائر | ||
EC | Ecuador | ||
EE | Eesti | ||
EG | مصر | ||
ER | إرتريا | ||
ES | España | AN | Andalucía |
ES | España | AR | Aragón |
ES | España | AS | Asturias, Principado de |
ES | España | CN | Canarias |
ES | España | CB | Cantabria |
ES | España | CM | Castilla-La Mancha |
ES | España | CL | Castilla y León |
ES | España | CT | Cataluña |
ES | España | EX | Extremadura |
ES | España | GA | Galicia |
ES | España | IB | Balears, Illes |
ES | España | RI | La Rioja |
ES | España | MD | Madrid, Comunidad de |
ES | España | MC | Murcia, Región de |
ES | España | NC | Navarra, Comunidad Foral de |
ES | España | PV | País Vasco |
ES | España | VC | Valenciana, Comunidad |
ET | Ethiopia | ||
FI | Suomi | ||
FJ | Fiji | ||
FM | Micronesia | ||
FO | Føroyar | ||
FR | France | A | Alsace |
FR | France | B | Aquitaine |
FR | France | C | Auvergne |
FR | France | D | Bourgogne |
FR | France | E | Bretagne |
FR | France | F | Centre |
FR | France | G | Champagne-Ardenne |
FR | France | H | Corse |
FR | France | I | Franche-Comté |
FR | France | J | Île-de-France |
FR | France | K | Languedoc-Roussillon |
FR | France | L | Limousin |
FR | France | M | Lorraine |
FR | France | N | Midi-Pyrénées |
FR | France | O | Nord-Pas-de-Calais |
FR | France | P | Basse-Normandie |
FR | France | Q | Haute-Normandie |
FR | France | R | Pays de la Loire |
FR | France | S | Picardie |
FR | France | T | Poitou-Charentes |
FR | France | U | Provence-Alpes-Côte d'Azur |
FR | France | V | Rhône-Alpes |
FR | France | GUA | Guadeloupe |
FR | France | GUF | Guyane |
FR | France | MTQ | Martinique |
FR | France | MYT | Mayotte |
FR | France | NCL | Nouvelle-Calédonie |
FR | France | PYF | Polynésie française |
FR | France | REU | La Réunion |
FR | France | SPM | Saint-Pierre-et-Miquelon |
FR | France | WLF | Wallis-et-Futuna |
GA | Gabon | ||
GB | United Kingdom | ENG | England |
GB | United Kingdom | NIR | Northern Ireland |
GB | United Kingdom | SCT | Scotland |
GB | United Kingdom | WLS | Wales |
GD | Grenada | ||
GE | საქართველო | ||
GH | Ghana | ||
GI | Gibraltar | ||
GL | Kalaallit Nunaat | ||
GM | Gambia | ||
GN | Guinée | ||
GQ | Guinea Ecuatorial | ||
GR | Ελλάδα | ||
GT | Guatemala | ||
GW | Guiné-Bissau | ||
GY | Guyana | ||
HK | 香港 | ||
HN | Honduras | ||
HR | Hrvatska | 17 | Splitsko-dalmatinska |
HR | Hrvatska | 19 | Dubrovačko-neretvanska |
HT | Haïti | ||
HU | Magyarország | ||
ID | Indonesia | ||
IE | Ireland | ||
IL | ישראל | ||
IM | Isle of Man | ||
IR | ایران | ||
IS | Ísland | ||
IT | Italia | 25 | Lombardia |
IT | Italia | 32 | Trentino-Alto Adige |
JM | Jamaica | ||
JO | الأردن | ||
JP | 日本 | ||
KE | Kenya | ||
KG | Кыргызстан | ||
KH | កម្ពុជា | ||
KI | Kiribati | ||
KM | القمر | ||
KN | Saint Kitts and Nevis | ||
KP | 조선민주주의인민공화국 | ||
KR | 대한민국 | ||
KW | الكويت | ||
KY | Cayman Islands | ||
KZ | Қазақстан | ||
LA | ລາວ | ||
LB | لبنان | ||
LC | Saint Lucia | ||
LI | Liechtenstein | ||
LK | இலங்கை | ||
LR | Liberia | ||
LS | Lesotho | ||
LT | Lietuva | ||
LV | Latvija | ||
LY | ليبيا | ||
MA | المغرب | ||
MC | Monaco | ||
MD | Moldova | ||
ME | Crna Gora | ||
MG | Madagasikara | ||
MH | Marshall Islands | ||
MK | Македонија | ||
ML | Mali | ||
MM | မြန်မာ | ||
MN | Монгол улс | ||
MO | 澳門 | ||
MP | Northern Mariana Islands | ||
MR | موريتانيا | ||
MT | Malta | ||
MU | Maurice | ||
MV | ދިވެހި | ||
MW | Malawi | ||
MX | México | ||
MY | Malaysia | ||
MZ | Moçambique | ||
NA | Namibia | ||
NC | Nouvelle-Calédonie | ||
NE | Niger | ||
NG | Nigeria | ||
NI | Nicaragua | ||
NL | Nederland | ||
NO | Norge | ||
NP | नेपाल | ||
NR | Nauru | ||
NU | Niue | ||
NZ | New Zealand | ||
OM | عُمان | ||
PA | Panamá | ||
PE | Perú | AMA | Amazonas |
PE | Perú | CUS | Cusco |
PF | Polynésie française | ||
PG | Papua New Guinea | ||
PH | Pilipinas | ||
PK | پاكستان | ||
PL | Polska | ||
PM | Saint-Pierre-et-Miquelon | ||
PR | Puerto Rico | ||
PS | فلسطين | ||
PT | Portugal | ||
PW | Palau | ||
PY | Paraguay | ||
QA | قطر | ||
RO | România | ||
RS | Србија | ||
RU | Россия | ||
RW | Rwanda | ||
SB | Solomon Islands | ||
SC | Seychelles | ||
SD | السودان | ||
SE | Sverige | ||
SG | Singapore | ||
SH | Saint Helena, Ascension and Tristan da Cunha | ||
SI | Slovenija | ||
SJ | Svalbard and Jan Mayen | ||
SK | Slovensko | ||
SL | Sierra Leone | ||
SM | San Marino | ||
SN | Sénégal | ||
SO | Soomaaliya | ||
SR | Suriname | ||
SS | جنوب السودان | ||
ST | São Tomé e Príncipe | ||
SV | El Salvador | ||
SX | Sint Maarten | ||
SY | سورية | ||
SZ | Eswatini | ||
TC | Turks and Caicos Islands | ||
TD | تشاد | ||
TF | Terres australes françaises | ||
TG | Togo | ||
TH | ไทย | ||
TJ | Тоҷикистон | ||
TK | Tokelau | ||
TL | Timor-Leste | ||
TM | Türkmenistan | ||
TN | تونس | ||
TO | Tonga | ||
TR | Türkiye | ||
TT | Trinidad and Tobago | ||
TV | Tuvalu | ||
TW | 台灣 | ||
TZ | Tanzania | ||
UA | Україна | ||
UG | Uganda | ||
UM | United States Minor Outlying Islands | ||
US | United States | AK | Alaska |
US | United States | AL | Alabama |
US | United States | AR | Arkansas |
US | United States | AZ | Arizona |
US | United States | CA | California |
US | United States | CO | Colorado |
US | United States | CT | Connecticut |
US | United States | DC | District of Columbia |
US | United States | DE | Delaware |
US | United States | FL | Florida |
US | United States | GA | Georgia |
US | United States | HI | Hawaii |
US | United States | IA | Iowa |
US | United States | ID | Idaho |
US | United States | IL | Illinois |
US | United States | IN | Indiana |
US | United States | KS | Kansas |
US | United States | KY | Kentucky |
US | United States | LA | Louisiana |
US | United States | MA | Massachusetts |
US | United States | MD | Maryland |
US | United States | ME | Maine |
US | United States | MI | Michigan |
US | United States | MN | Minnesota |
US | United States | MO | Missouri |
US | United States | MS | Mississippi |
US | United States | MT | Montana |
US | United States | NC | North Carolina |
US | United States | ND | North Dakota |
US | United States | NE | Nebraska |
US | United States | NH | New Hampshire |
US | United States | NJ | New Jersey |
US | United States | NM | New Mexico |
US | United States | NV | Nevada |
US | United States | NY | New York |
US | United States | OH | Ohio |
US | United States | OK | Oklahoma |
US | United States | OR | Oregon |
US | United States | PA | Pennsylvania |
US | United States | RI | Rhode Island |
US | United States | SC | South Carolina |
US | United States | SD | South Dakota |
US | United States | TN | Tennessee |
US | United States | TX | Texas |
US | United States | UT | Utah |
US | United States | VA | Virginia |
US | United States | VT | Vermont |
US | United States | WA | Washington |
US | United States | WI | Wisconsin |
US | United States | WV | West Virginia |
US | United States | WY | Wyoming |
UY | Uruguay | ||
UZ | Oʻzbekiston | ||
VA | Holy See | ||
VC | Saint Vincent and the Grenadines | ||
VE | Venezuela | ||
VG | Virgin Islands (British) | ||
VI | Virgin Islands (U.S.) | ||
VN | Việt Nam | ||
VU | République de Vanuatu | ||
XK | Republika e Kosovës | ||
YT | Mayotte | ||
ZA | South Africa | ||
ZM | Zambia | ||
ZW | Zimbabwe |
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
Response parameters
The API returns its response in a simple, lightweight JSON format.
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®ion=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
Response parameters
The API returns its response in a simple, lightweight JSON format.
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 Code | Type | Details |
---|---|---|
200 | OK | The request was successful. |
400 | Bad Request | The request was invalid or cannot be otherwise served. |
401 | Unauthorized | Authentication credentials were missing or incorrect. |
422 | Quota reached | The request cannot be served due to the application's rate limit having been exhausted for the resource. |
404 | Not Found | The requested resource could not be found. |
429 | Too Many Requests | The request cannot be served due to the application's rate limit having been exhausted for the resource. |
500 | Internal Server Error | Something went wrong on the server. |
503 | Service Unavailable | The service is temporarily unavailable. |