List supported countries
Lists the countries that the other operations can be called for.
Loading / 加载中…
Public holidays and business days · Utilities & AI data
Holiday data looked up by two-letter country code for 123 countries, with a separate operation that lists the supported codes. Get the holidays for a year, test whether one date is a working day, count working days between two dates, list the holidays still ahead of a reference date, or find long weekends together with suggested bridge days. Optional inputs let a caller redefine the weekend, choose which holiday types count as a day off, and narrow results to a region.
JSON in, a structured response out. Every public gateway endpoint uses POST.
Lists the countries that the other operations can be called for.
Lists the holidays of one country for one year.
Tells whether one date is a working day in a country.
Finds the long weekends in one country's year.
Returns the upcoming public holidays after today or a reference date you supply, with the days remaining for each.
Returns the working, weekend and holiday day counts between a start date and an end date.
Each operation takes its inputs in a JSON body and returns its answer inside data. A calendar is selected by a two-letter ISO-3166 code in body.country, which 5 of the 6 operations require.
holidays-countries is the lookup behind that input: it needs no input of its own and returns count, the number of supported countries, and a countries array, in which each countryCode is a value that body.country accepts and each name is the readable label for it. Load the list once and the same codes and labels can drive the country menu of each form that sends a request.
holidays-holidays returns country, year, count and a holidays array for one country and one body.year. body.year is a 4-digit integer such as 2026.
Each entry gives the date, the name and the localName of the holiday, its types and the weekday it falls on. Entries also carry the global and counties fields and nationwide, and both weekday and nationwide are computed from the holiday data. Because each holiday carries its own types, one yearly list can be split by type in your own code, for example to colour holidays of different types differently in a calendar legend, without a request per type.
holidays-next-holidays returns country, asOf, count and a holidays array in which each entry adds daysUntil to the full holiday fields, counted from the reference date to that holiday.
holidays-long-weekends returns country, year, count and longWeekends, whose windows carry these fields:
| Field | What it tells you |
|---|---|
startDate | the date on which the window begins |
endDate | the date on which the window ends |
dayCount | the length of the window in days |
startWeekday | the weekday on which the window begins |
needBridgeDay | whether a bridge day is needed to complete the window |
holidays-is-workday answers a yes-or-no question for one country and one body.date in YYYY-MM-DD form, and dates in any other format are rejected. Besides is_workday, the response returns the date, the country and the weekday together with these fields, so an interface can explain the answer to a user instead of showing a bare flag:
| Field | What it tells you |
|---|---|
is_weekend | whether the date falls on the weekend |
is_public_holiday | whether the date is a public holiday |
reasons | the reasons behind the answer |
holidays | the holidays that fall on that date |
weekend_definition | the weekend definition that was applied |
holidays-workday-count takes body.start and body.end, both inclusive, and returns country, start and end together with these fields:
| Field | What it tells you |
|---|---|
total_days | a count covering every calendar day of the range |
workdays | how many working days the range has |
weekend_days | how many days of the range fall on the weekend set by body.weekend |
holiday_days | how many holiday days the range has, counting the holidays that body.types and body.subdivision select |
holidays | the holidays that fall inside the range |
weekend_definition | the weekend definition used for the counts |
Start and end dates in any format other than YYYY-MM-DD are rejected. One request replaces a single-date check for each day of the period.
holidays-is-workday and holidays-workday-count share 3 optional inputs that decide which days count as off:
body.weekend sets the weekend days by name, such as Sat,Sun; when it is omitted the weekend is Saturday and Sunday, or Friday and Saturday for EG and BDbody.types names the holiday types that count as a day off, and when it is omitted only Public counts, so a weekday that is only a bank or school holiday stays a working daybody.subdivision takes an ISO-3166-2 code such as US-CA and brings that region's holidays into the answer; without it the answer is nationwidePublic stands for statutory public holidays, Bank for bank holidays and School for school holidays.
A public holiday is a day set by law as a non-working day, and depending on the country it is also called a national, statutory or bank holiday. The weekend differs between countries: Israel and several Muslim-majority countries observe a Friday and Saturday weekend. Business-day counts are used to settle payments and trades, quote shipping times and work out contract or consumer-protection deadlines.
{
"body": {
"country": "DE",
"year": 2027
}
}POST /api/v1/holidays/<action> with x-api-key, Content-Type: application/json and a required Idempotency-Key.ok: true: data is the result of the operation, meta.requestId identifies the recorded request and meta.chargedCreditUnits is the amount charged. Otherwise ok is false and error.code names the reason; read ok and error.code rather than relying on the HTTP status alone. Every gateway reply carries a request id for support: meta.requestId, or a top-level requestId in a reply without meta (such as a refusal before admission).Send body.country and body.year to holidays-holidays. One request covers one country and one year, so a view that compares several countries sends one request per country, and a view that spans two years sends one request per year. Keep both inputs in one form, because holidays-long-weekends takes exactly the same pair and can fill a long-weekend view from the same selection.
Send body.country and body.date in YYYY-MM-DD form to holidays-is-workday and read is_workday. For a run of dates, such as moving a due date forward until it lands on a working day, send one request per date and keep body.weekend, body.types and body.subdivision identical across them, so that every answer follows the same weekend, holiday-type and region rules.
Send body.country, body.start and body.end to holidays-workday-count and read workdays. For a monthly or yearly payroll figure, use the first and last day of the month or year as the two dates. A period longer than one range allows can be split into consecutive ranges that neither overlap nor leave gaps; with identical optional inputs on every part, the workdays values of the parts add up to the total.
The supported set is the list that holidays-countries returns, so read it from there instead of hard-coding country codes. Codes are read case-insensitively, so us and US select the same country, while a code outside the set is rejected. Normalise stored codes to upper case and check user input against the list before sending it.
Send day names such as Fri,Sat in body.weekend with holidays-is-workday or holidays-workday-count, and the response lists the days it used in weekend_definition. A value that cannot be recognised falls back to the default weekend instead of producing an error, so compare weekend_definition with the days you sent to catch a misspelt value before a count reaches your users.
Yes. Send the region's ISO-3166-2 code, for example GB-SCT, in body.subdivision with holidays-is-workday or holidays-workday-count; codes are read case-insensitively. A code that cannot be recognised produces the nationwide answer rather than an error, so keep subdivision codes in your own list and send them exactly as stored, with the same code on each request of one plan.
Yes: name the type in body.types, for example Bank, or several types separated by commas, such as Public,Bank. Do not add up counts from separate holidays-workday-count requests, because each count covers the whole range on its own and a date can be a holiday of more than one type.
Pass that date as body.today (YYYY-MM-DD) to holidays-next-holidays. When body.today is omitted, or holds a value that cannot be read, the current UTC date is used instead, and asOf in the response shows which date was applied. Comparing asOf with the date you sent is how you notice a body.today value that was ignored.
Call holidays-long-weekends with body.country and body.year, then filter on needBridgeDay to separate the windows that need a bridge day from those that do not, and sort by dayCount to rank them by length. To add holiday names, call holidays-holidays with the same inputs and match the holiday dates that fall between a window's startDate and endDate.