API reference
Public holidays and business-day arithmetic for 200+ countries and territories, with regional coverage: state, province and canton level holidays for 20 countries via ISO 3166-2 subdivision codes. Calendars are precomputed for 2000 through 2060 from curated open data. Every country in GET /countries carries a coverage flag (full or partial) so you can tell where the national list is known to be incomplete.
Base URL: https://api.polystash.com. Machine-readable spec: /openapi.json.
Authentication
Requests go through RapidAPI. Send your RapidAPI key on every request as the
X-RapidAPI-Key header, together with the X-RapidAPI-Host
header for this API. RapidAPI forwards the call and counts it against your plan.
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: api.polystash.com
Keys are issued and rotated on RapidAPI: Subscribe on RapidAPI.
The coverage field
Is coverage the same for every country?
No, and the API says so. Every entry in /countries carries a coverage field: full means the national list is complete and reviewed through 2060; partial means the national list is known to be incomplete or lunar-calendar holidays are missing for some years. India, Thailand and Malaysia are partial today and are being upgraded. Check the flag before relying on a country for payroll or legal deadlines.
Endpoints
GET /countries
List supported countries
Example response
[
{
"code": "DE",
"name": "DE",
"regionCount": 16,
"coverage": "full"
},
{
"code": "IN",
"name": "IN",
"regionCount": 35,
"coverage": "partial"
},
{
"code": "US",
"name": "US",
"regionCount": 37,
"coverage": "full"
}
]
Example request
curl -H 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
-H 'X-RapidAPI-Host: api.polystash.com' \
'https://api.polystash.com/countries'
GET /v1/holidays/{country}/{year}
Holidays for a country and year
| Name | In | Required | Description | Example |
|---|---|---|---|---|
country |
path | yes | US |
|
year |
path | yes | 2026 |
|
region |
query | no | ISO 3166-2 subdivision code, e.g. US-TX | US-TX |
type |
query | no | Comma-separated holiday types: public,bank,school,authorities,optional,observance. Matches any requested type (OR); whitespace is trimmed. Takes precedence over types when both are supplied. | public,optional |
types |
query | no | Alias for type: comma-separated holiday types with OR semantics. Used only when type is absent. | |
lang |
query | no | Preferred name language (falls back to English) | local |
Example request
curl -H 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
-H 'X-RapidAPI-Host: api.polystash.com' \
'https://api.polystash.com/v1/holidays/US/2026?region=US-TX&type=public%2Coptional&lang=local'
GET /v1/holidays/{country}/{year}.ics
iCalendar holidays for a country and year
RFC 5545 VCALENDAR with one all-day VEVENT per holiday on its observed date. English SUMMARY, local name and types in DESCRIPTION, exclusive next-day DTEND, and UID <id>@polystash.com. Uses CRLF and UTF-8 lines folded at 75 octets.
| Name | In | Required | Description | Example |
|---|---|---|---|---|
country |
path | yes | DE |
|
year |
path | yes | 2027 |
|
region |
query | no | ISO 3166-2 subdivision code; includes nationwide holidays | DE-BY |
Example request
curl -H 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
-H 'X-RapidAPI-Host: api.polystash.com' \
'https://api.polystash.com/v1/holidays/DE/2027.ics?region=DE-BY'
GET /v1/holidays/{country}.ics
iCalendar holidays over a range of years
Same all-day VEVENT format as the year feed. Defaults to the current UTC year through current year + 2. The range is inclusive and may contain at most five years. Years absent from the country data contribute no events.
| Name | In | Required | Description | Example |
|---|---|---|---|---|
country |
path | yes | US |
|
from |
query | no | First year, inclusive; defaults to the current UTC year | 2027 |
to |
query | no | Last year, inclusive; defaults to current UTC year + 2 | 2029 |
region |
query | no | ISO 3166-2 subdivision code; includes nationwide holidays | US-TX |
Example request
curl -H 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
-H 'X-RapidAPI-Host: api.polystash.com' \
'https://api.polystash.com/v1/holidays/US.ics?from=2027&to=2029®ion=US-TX'
GET /v1/businessdays/sla
Calculate an SLA deadline in business days or working hours
All arithmetic uses local wall-clock dates in start's fixed offset; no DST adjustment. Uses the country's weekend and country/region holidays. For days, first roll a non-business start to the next business day at dayStart, then advance offset business days, preserving time. For hours, snap to a working period and count only within [dayStart, dayEnd), carrying remainder forward; a deadline may equal dayEnd. Missing calendar years have no known holidays.
| Name | In | Required | Description | Example |
|---|---|---|---|---|
country |
query | yes | DE |
|
region |
query | no | DE-BY |
|
start |
query | yes | ISO 8601 YYYY-MM-DDTHH:MM[:SS[.sss]] followed by Z or +/-HH:MM. Seconds are optional; up to three fractional digits. Encode a positive offset's + as %2B. | 2027-03-05T16:40:00+01:00 |
offset |
query | yes | Positive safe integer in decimal digits. Deadlines beyond ISO year 9999 return INVALID_OFFSET. | 2 |
unit |
query | yes | hours |
|
dayStart |
query | no | Opening time; must precede dayEnd | |
dayEnd |
query | no | Exclusive closing time; overnight windows are not supported |
Example request
curl -H 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
-H 'X-RapidAPI-Host: api.polystash.com' \
'https://api.polystash.com/v1/businessdays/sla?country=DE®ion=DE-BY&start=2027-03-05T16%3A40%3A00%2B01%3A00&offset=2&unit=hours'
GET /v1/businessdays/add
Add N business days to a date
| Name | In | Required | Description | Example |
|---|---|---|---|---|
country |
query | yes | US |
|
date |
query | yes | 2026-07-02 |
|
days |
query | yes | Positive or negative, non-zero | 10 |
region |
query | no | US-TX |
Example request
curl -H 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
-H 'X-RapidAPI-Host: api.polystash.com' \
'https://api.polystash.com/v1/businessdays/add?country=US&date=2026-07-02&days=10®ion=US-TX'
GET /v1/businessdays/between
Count business days between two dates
| Name | In | Required | Description | Example |
|---|---|---|---|---|
country |
query | yes | DE |
|
start |
query | yes | 2026-12-20 |
|
end |
query | yes | 2027-01-10 |
|
region |
query | no |
Example request
curl -H 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
-H 'X-RapidAPI-Host: api.polystash.com' \
'https://api.polystash.com/v1/businessdays/between?country=DE&start=2026-12-20&end=2027-01-10'