Public Holidays API
APIs to Look up
Public Holidays API
Abstract’s Public Holidays API is a fast, lightweight, modern, and RESTful JSON API that allows you to get the public, local, religious, and other holidays of a particular country.
GET
Public Holidays API
It’s simple to use: you only need to submit your
This was a successful request, so the public holidays from Singapore and details associated with it are returned as the example on the right.
And this would return any holidays in the US on January 1, 2021:
api_key and a two letter country code country. The API will return the public holidays for that country.
Getting started
REST
The Public Holidays API, like all of Abstract’s APIs, is organized around REST. It is designed to use predictable, resource-oriented URLs and to use HTTP status codes to indicate errors.HTTPS
The Public Holidays API requires all communications to be secured with TLS 1.2 or greater.API Versions
All of Abstract’s APIs are versioned. The Public Holidays API is currently on Version 1.Your API Key
Your API key is your unique authentication key to be used to access Abstract’s Public Holidays API. Note that each of Abstract’s APIs has a unique API key, so you will need different keys to access the Public Holidays and Email Validation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.Base URL
Validation endpoint
Abstract’s Public Holidays API simply requires your unique API key and the country you’d like to get the public holidays from.Checking specific days, months, or years
It’s also possible to specify the day, month, or year. Note that if you specify a day, you must also include a month and year. If you specify a month, you must also specify the year. For example, this will return all the holidays in the US in January 2021:Note: if the query is valid but there are no holidays in the checked period, you will get a 200 response with an empty array.
Request parameters
Your unique API key. Note that each user has unique API keys for each of Abstract’s APIs, so your Public Holiday API key will not work for your IP Geolocation API, for example.
The country’s two letter ISO 3166-1 alpha-2 code.
The year to get the holiday(s) from. Note that this is optional on paid plans and required on free plans, and if left blank it will default to the current year.
The month to get the holiday(s) from, in the format of 1-12 (e.g., 1 is January, 2 is February, etc). Note that this is optional on paid plans and required on free plans, and if left blank it will default to the current month.
The day to get the holiday(s) from, in the format of 1-31. Note that this is optional on paid plans and required on free plans, and if left blank it will default to the current day.
Response parameters
The API response is returned in a universal and lightweight JSON format.The name of the holiday.
The local name of the holiday.
If the name_local is used, then this specifies the language in which it is in.
A short description or additional details on the holiday, such as whether it is part of a long weekend.
The country in which the holiday occurs, returned directly from the request.
The location or region in which the holiday occurs, if the holiday is that specific.
The type of holiday it is (e.g., public holiday, religious holiday, etc).
The date on which the holiday occurs.
The year in which the holiday occurs.
The month in which the holiday occurs.
The day in which the holiday occurs.
The day of the week on which the holiday occurs (Monday, Tuesday, Wednesday, etc.)