Endpoints
| Purpose | Path |
|---|---|
| Discovery manifest | /api/v1/index.json |
| All years | /api/v1/all.json |
| By year | /api/v1/years/{year}.json |
| By month | /api/v1/months/{YYYY-MM}.json |
| By type | /api/v1/types/{national_holiday|joint_leave}.json |
Quick start
curl -s https://tanggalmerah.pages.dev/api/v1/years/2026.json
const base = "https://tanggalmerah.pages.dev/api/v1";
const { holidays, _meta } = await (await fetch(`${base}/years/2026.json`)).json();
const cuti = holidays.filter((h) => h.type === "joint_leave");
console.log(_meta.last_updated, cuti);
<?php
$base = "https://tanggalmerah.pages.dev/api/v1";
$data = json_decode(file_get_contents("$base/years/2026.json"), true);
$national = array_filter($data["holidays"], fn ($h) => $h["type"] === "national_holiday");
echo $data["_meta"]["last_updated"], PHP_EOL;
import urllib.request, json
base = "https://tanggalmerah.pages.dev/api/v1"
with urllib.request.urlopen(f"{base}/types/joint_leave.json") as r:
data = json.load(r)
print(data["_meta"]["last_updated"], len(data["holidays"]), "cuti bersama")
#[derive(serde::Deserialize)]
struct YearFile { holidays: Vec<Holiday> }
#[derive(serde::Deserialize)]
struct Holiday { date: String, name_id: String, r#type: String }
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let url = "https://tanggalmerah.pages.dev/api/v1/years/2026.json";
let f: YearFile = reqwest::get(url).await?.json().await?;
println!("{} holidays", f.holidays.len());
Ok(())
}
res, _ := http.Get("https://tanggalmerah.pages.dev/api/v1/years/2026.json")
defer res.Body.Close()
var f struct {
Holidays []map[string]any `json:"holidays"`
}
json.NewDecoder(res.Body).Decode(&f)
fmt.Println(len(f.Holidays), "holidays")
Official sources
- JDIH Kementerian PANRB
- JDIH Kemnaker
- Kemenko PMK
Unofficial redistribution of public government decisions. Verify against the sources above before legal or payroll reliance.