An API for Indonesian public holidays and collective leave days. Query by year, month, or check a specific date.
Click any link to see a live response — no setup needed.
All public holidays in 2026
https://tanggalmerah.upset.dev/api/holidays?year=2026
Holidays in January 2026
https://tanggalmerah.upset.dev/api/holidays?year=2026&month=1
Is January 1st, 2026 a day off?
https://tanggalmerah.upset.dev/api/check?date=2026-01-01
Which years have data?
https://tanggalmerah.upset.dev/api/years
Three endpoints, all GET, all returning the same JSON envelope.
Returns all public holidays and collective leave days for a given year. Optionally filter by month or type.
| Param | Type | Description |
|---|---|---|
| year* | integer | 4-digit year, e.g. 2026 |
| month | integer | Filter by month 1–12 |
| type | string | holiday or leave — omit for both |
Request
GET /api/holidays?year=2026 GET /api/holidays?year=2026&month=3 GET /api/holidays?year=2026&type=holiday
Response
{
"success": true,
"data": [
{
"date": "2026-01-01",
"day": "Kamis",
"name": "Tahun Baru 2026 Masehi",
"type": "holiday"
}
],
"meta": { "year": 2026, "count": 17 }
}Check whether a specific date is a holiday, collective leave day, or regular workday. The most useful endpoint — pass today's date and get a boolean answer.
| Param | Type | Description |
|---|---|---|
| date* | string | ISO 8601 date — YYYY-MM-DD |
Request
GET /api/check?date=2026-03-21
Response
{
"success": true,
"data": {
"date": "2026-03-21",
"is_holiday": true,
"is_leave": false,
"is_off_day": true,
"holidays": [...]
}
}is_off_day is true when the date is a holiday ora collective leave day — the simplest check for “should my app treat today as non-working?”
Returns all years that have holiday data. No parameters required.
Request
GET /api/years
Response
{
"success": true,
"data": [2020, 2021, 2022,
2023, 2024, 2025,
2026]
}Every response follows the same top-level shape.
{
"success": boolean,
"data": T,
"meta"?: {
"year": number,
"month"?: number,
"count": number
}
}Standard HTTP status codes with a consistent body.
// 400 — invalid params
{ "success": false,
"error": "Invalid date format." }
// 404 — no data for year
{ "success": false,
"error": "No data for year 2099." }The type field on every entry is one of two values.
Mandatory national public holidays — all employees are legally entitled to a day off.
e.g. Idul Fitri, Hari Kemerdekaan, Natal
Government-designated collective leave days — typically bridge days around a public holiday.
e.g. bridge days before/after Lebaran or Natal