Documentation
Public holidays API reference for the six operations
Reference for the public holidays API: the endpoint of each operation on this site, its inputs with formats, bounds and defaults, and the fields it returns.
See also: Public holidays and business days overview and prices · Public holidays API guide: workday and holiday logic
On this page
Requests to the public holidays API
The response fields named for each operation sit inside data of a successful reply. Inputs follow these rules:
- Aliases are also accepted:
countryCodeandccforbody.country,start_dateandfromforbody.start,end_dateandtoforbody.end, andcounty,regionandlocationforbody.subdivision - Where an operation takes
body.country, it expects a two-letter ISO-3166 code, read case-insensitively; 123 countries are supported, and a code outside that set is rejected - Dates are strings in YYYY-MM-DD form
Fields in this section (3)
body, body.country, data
List supported countries
holidays-countries returns count, the number of supported countries, and a countries array in which each entry pairs a countryCode with the country's name. The codes in that array are the values that body.country accepts wherever an operation takes it. Call it when you build a country selector, when you want to turn away an unsupported code in your own form before a request is sent, or when you need the display name for a code you have stored.
Fields in this section (2)
holidays-countries, body
Holidays for one country and year
In each holiday that holidays-holidays returns, weekday is the weekday the holiday falls on, and weekday and nationwide are derived from the holiday data. Use the yearly list when you need the holidays themselves, with names and types, as opposed to a yes-or-no answer for one date.
Fields in this section (3)
holidays-holidays, body.country, body.year
Long-weekend windows
holidays-long-weekends takes the same two required inputs as the yearly list, body.country and body.year. Each window has a startDate and an endDate, a dayCount giving its length in days, the startWeekday on which it begins and needBridgeDay, which shows whether the window needs a bridge day. Send one request per country and year; comparing two countries or two years takes two requests.
Fields in this section (3)
holidays-long-weekends, body.country, body.year
Single-date workday check
holidays-is-workday takes body.date, the day to test, as a YYYY-MM-DD string; a date in another format is rejected. The reasons array explains the result, holidays holds the holidays falling on that date and weekend_definition shows the weekend that was applied.
is_weekend shows whether the date is one of those weekend days, and is_public_holiday shows whether it is a public holiday. Read is_workday for the decision and use is_weekend, is_public_holiday and reasons to explain it.
Fields in this section (3)
holidays-is-workday, body.country, body.date
Working-day count over a range
For holidays-workday-count, body.start and body.end are both dates in YYYY-MM-DD form and both inclusive, so a range from the first to the last day of a month covers the whole month. A start or end date in another format is rejected. One range spans about 10 years at most; split a longer period into consecutive ranges that do not overlap.
total_days counts each calendar day from body.start to body.end. workdays, weekend_days and holiday_days count the working days, the weekend days and the holiday days in that span.
holidays lists the holidays inside the range and weekend_definition gives the weekend definition used. The optional weekend, holiday-type and subdivision inputs work as in the single-date check, and the counts follow those settings: the weekend input decides which days enter weekend_days, while the holiday-type and subdivision inputs decide which holidays enter holiday_days.
Fields in this section (3)
holidays-workday-count, body.start, body.end
Optional inputs of the two workday operations
body.weekend redefines the weekend with comma-separated day names such as Sat,Sun or Fri,Sat. When it is omitted, the weekend is Saturday and Sunday, except for EG and BD, where it is Friday and Saturday. This site accepts any string here; a value that cannot be recognised is ignored and the default weekend applies, and weekend_definition in the response shows the days that were used.
body.types chooses the holiday types that count as a day off: one allowed value, or several separated by commas, read case-insensitively. A value outside the allowed list is ignored, and when it is omitted only Public counts. Among the allowed values, Public means statutory public holidays, Bank bank holidays and School school holidays.
body.subdivision takes an ISO-3166-2 code such as US-CA or GB-SCT, read case-insensitively, for answers that include regional holidays; when it is omitted the answer is nationwide, and an unrecognised code is ignored, which also gives the nationwide answer.
Fields in this section (5)
holidays-is-workday, holidays-workday-count, body.weekend, body.types, body.subdivision
Upcoming holidays from a reference date
For holidays-next-holidays, body.today is the reference date in YYYY-MM-DD form from which daysUntil is counted. When body.today is omitted, the current UTC date is used. This site accepts any string for it, and a value that cannot be read is ignored, so the current UTC date applies in that case too.
The result covers the public holidays of about the next 365 days after the reference date. It returns country, asOf, count and a holidays array whose entries carry the full holiday fields plus daysUntil, the number of days from the reference date to that holiday. asOf gives the reference date that was applied, so an ignored body.today shows up there as the current UTC date.
Fields in this section (3)
holidays-next-holidays, body.country, body.today
{
"body": {
"country": "US",
"date": "2027-07-05",
"types": "Bank"
}
}{
"body": {
"country": "US",
"start": "2027-11-01",
"end": "2027-11-30",
"subdivision": "US-CA"
}
}Operations
Every public gateway operation uses POST /api/v1/{project}/{action}.
Use a JSON object with the documented path, query, headers and body locations; omit unused locations. input.headers is JSON data for the operation, not browser request headers. Do not put credentials here. Keep body arrays, scalar values and null as documented; omission is different from null.
List supported countries
POST /api/v1/holidays/holidays-countries
Lists the countries that the other operations can be called for.
Input fields
This operation takes no input fields. Send the JSON request body shown below.
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/holidays/holidays-countries' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{}}'Response fields
countcountries[]countryCodename
Holidays for a year
POST /api/v1/holidays/holidays-holidays
Lists the holidays of one country for one year.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.country | string | Required | — | — |
body.year | integer | Required | — | 1900–2200 |
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/holidays/holidays-holidays' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"country":"US","year":2026}}'Response fields
countryyearcountholidays[]datenamelocalNametypes[]globalcounties[]weekdaynationwide
Check a single date
POST /api/v1/holidays/holidays-is-workday
Tells whether one date is a working day in a country.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.country | string | Required | — | — |
body.date | string | Required | — | — |
body.subdivision | string | Optional | — | — |
body.types | string | Optional | "Public""Bank""School""Authorities""Optional""Observance" | — |
body.weekend | string | Optional | — | — |
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/holidays/holidays-is-workday' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"country":"US","date":"2026-01-01"}}'Response fields
datecountryweekdayis_workdayis_weekendis_public_holidayreasons[]holidays[]weekend_definition[]
Find long weekends
POST /api/v1/holidays/holidays-long-weekends
Finds the long weekends in one country's year.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.country | string | Required | — | — |
body.year | integer | Required | — | 1900–2200 |
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/holidays/holidays-long-weekends' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"country":"US","year":2026}}'Response fields
countryyearcountlongWeekends[]startDateendDatedayCountneedBridgeDaystartWeekday
Upcoming holidays
POST /api/v1/holidays/holidays-next-holidays
Returns the upcoming public holidays after today or a reference date you supply, with the days remaining for each.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.country | string | Required | — | — |
body.today | string | Optional | — | — |
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/holidays/holidays-next-holidays' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"country":"US"}}'Response fields
countryasOfcountholidays[]
Count working days
POST /api/v1/holidays/holidays-workday-count
Returns the working, weekend and holiday day counts between a start date and an end date.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.country | string | Required | — | — |
body.end | string | Required | — | — |
body.start | string | Required | — | — |
body.subdivision | string | Optional | — | — |
body.types | string | Optional | "Public""Bank""School""Authorities""Optional""Observance" | — |
body.weekend | string | Optional | — | — |
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/holidays/holidays-workday-count' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"country":"US","end":"2026-01-31","start":"2026-01-01"}}'Response fields
countrystartendtotal_daysworkdaysweekend_daysholiday_daysholidays[]weekend_definition[]
How calls work
POST /api/v1/holidays/<action>withx-api-key,Content-Type: application/jsonand a requiredIdempotency-Key.- A successful call returns
ok: true:datais the result of the operation,meta.requestIdidentifies the recorded request andmeta.chargedCreditUnitsis the amount charged. Otherwiseokisfalseanderror.codenames the reason; readokanderror.coderather than relying on the HTTP status alone. Every gateway reply carries a request id for support:meta.requestId, or a top-levelrequestIdin a reply withoutmeta(such as a refusal before admission). - Charged the listed price only when a call succeeds. Failures are not charged; an unconfirmed outcome is released after at most 900 seconds without a charge.
- Repeating the same request with the same Idempotency-Key after it has finished returns the stored response for 24 hours without a new charge.
In the gateway reference: