API Hari Libur

Indonesian public holiday API. Simple, fast, free. Query /api, /api/today, or /api/tomorrow.

Try It Live

Click an endpoint to fetch live data.

Endpoints

GET /api

Retrieve public holidays. Returns all holidays for a given year, optionally filtered by month and day.

Query Parameters

ParamTypeRequiredDescription
yearnumberNoYear to query. Range: 2011 - current year + 1. Defaults to current year.
monthnumberNoMonth filter. Range: 1 - 12.
daynumberNoDay filter. Range: 1 - 31. Requires month to be set.

Example Request

curl https://api-hari-libur.com/api?year=2025&month=1

Example Response

[
  {
    "name": "Tahun Baru",
    "date": "2025-01-01",
    "is_national_holiday": true
  },
  {
    "name": "Harbolnas",
    "date": "2025-01-27",
    "is_national_holiday": false
  }
]
GET /api/today

Check if today is a public holiday. Returns holiday status and a list of holidays for the current date.

Query Parameters

None. Uses the server's current date (Asia/Jakarta timezone).

Example Request

curl https://api-hari-libur.com/api/today

Example Response

{
  "date": "2025-01-01",
  "is_holiday": true,
  "is_national_holiday": true,
  "holiday_list": [
    "Tahun Baru"
  ]
}
GET /api/tomorrow

Check if tomorrow is a public holiday. Same response shape as /api/today but for the next date.

Query Parameters

None. Uses the server's current date + 1 day (Asia/Jakarta timezone).

Example Request

curl https://api-hari-libur.com/api/tomorrow

Example Response

{
  "date": "2025-01-02",
  "is_holiday": false,
  "is_national_holiday": false,
  "holiday_list": []
}