Tanggal Merah

A free API for Indonesian public holidays.

Base URLhttps://tanggalmerah.upset.dev
Loading

Loading…

https://tanggalmerah.upset.dev/api/holidays?year=2026Open

Endpoints

All GET, all CORS-enabled, all from https://tanggalmerah.upset.dev. Every response has a success flag and a data field.

GET /api/holidays

List holidays

Public holidays and collective leave days for a year. Filter by month or type.

yearintegerFour-digit year. Required.
monthinteger1 to 12.
typestringholiday or leave. Leave it out for both.
Example
GET /api/holidays?year=2026&month=1

{
  "success": true,
  "data": [
    { "date": "2026-01-01", "day": "Kamis", "name": "Tahun Baru 2026 Masehi", "type": "holiday" }
  ],
  "meta": { "total": 1, "total_holidays": 1, "year": 2026, "month": 1 }
}

GET /api/check

Check a date

Whether a date is a holiday, a collective leave day or a regular workday. is_off_day is true for either kind of day off.

datestringYYYY-MM-DD. Required.
Example
GET /api/check?date=2026-01-01

{
  "success": true,
  "data": {
    "date": "2026-01-01",
    "is_holiday": true,
    "is_leave": false,
    "is_off_day": true,
    "holidays": [ ... ]
  }
}

GET /api/years

Available years

Every year that has holiday data. No parameters.

Example
GET /api/years

{ "success": true, "data": [2023, 2024, 2025, 2026, 2027], "meta": { "total": 5 } }

Errors

Errors use normal HTTP status codes, with a message and a code you can match on.

400 Bad Request
{ "success": false, "error": "Query parameter 'year' is required (YYYY)", "code": "MISSING_YEAR" }

Holiday types

The type field on every entry is one of two values.

  • holidayHari libur nasionalPublic holidays set by the government. Everyone gets the day off.
  • leaveCuti bersamaCollective leave days, usually next to a public holiday.

Related tools

Links