Hari Libur Nasional
Hari libur nasional dan daerah di Indonesia.
Base URL
https://use.api.co.id
Semua endpoint ada di bawah path /holidays/indonesia dan dipanggil dengan header x-api-co-id. Filter seperti tahun, bulan, tanggal, atau jenis libur dikirim sebagai query parameter. Response berisi nama, tanggal, dan kategori hari libur.
Jenis hari libur
Data mencakup hari libur umum, cuti bersama, hari libur nasional, dan hari peringatan. Gunakan nilai berikut di parameter type:
Nilai type | Keterangan |
|---|---|
Public Holiday | Hari libur umum |
Joint Holiday | Cuti bersama |
National Holiday | Hari libur nasional |
Observance | Hari peringatan |
Fitur
| Kebutuhan | Endpoint |
|---|---|
| Daftar hari libur dengan filter lengkap | /holidays/indonesia/ |
| Cek apakah tanggal tertentu hari libur | /holidays/indonesia/check/date |
| Hari libur dalam rentang tanggal | /holidays/indonesia/check/range |
| Hari libur berikutnya, lengkap dengan countdown | /holidays/indonesia/next |
| Daftar hari libur mendatang | /holidays/indonesia/upcoming |
| Statistik hari libur dan deteksi long weekend | /holidays/indonesia/stats |
| Tampilan kalender per bulan | /holidays/indonesia/calendar |
| Tahun dan jenis libur yang tersedia | /holidays/indonesia/years, /holidays/indonesia/types |
Core Endpoints
List Holidays
Get all holidays with comprehensive filtering options. Supports filtering by year, month, type, date range, with pagination support. Note: Pagination size is fixed at 100 items per page and cannot be configured.
| Nama | Tipe | Keterangan |
|---|---|---|
yearOpsional | integer | Filter by year Contoh: 2025 |
monthOpsional | integer | Filter by month (1-12) Contoh: 1 |
typeOpsional | string | Filter by holiday type Nilai: Public HolidayJoint HolidayNational HolidayObservanceContoh: Public Holiday |
start_dateOpsional | string | Filter holidays from this date (YYYY-MM-DD) Contoh: 2025-01-01 |
end_dateOpsional | string | Filter holidays until this date (YYYY-MM-DD) Contoh: 2025-12-31 |
pageOpsional | integer | Page number Contoh: 1 |
| Nama | Tipe | Keterangan |
|---|---|---|
is_successOpsional | boolean | Contoh: true |
messageOpsional | string | Contoh: Success |
dataOpsional | object[] | |
data[].idOpsional | string | Holiday ID Contoh: holiday_2025_01_01 |
data[].dateOpsional | string | Holiday date (YYYY-MM-DD) Contoh: 2025-01-01 |
data[].nameOpsional | string | Holiday name Contoh: Tahun Baru 2025 |
data[].typeOpsional | string | Holiday type Contoh: Public Holiday |
data[].is_national_holidayOpsional | boolean | Whether it's a national holiday Contoh: true |
pagingOpsional | object | |
paging.pageOpsional | integer | Contoh: 1 |
paging.sizeOpsional | integer | Contoh: 100 |
paging.total_itemOpsional | integer | Contoh: 20 |
paging.total_pageOpsional | integer | Contoh: 1 |
curl -X GET "https://use.api.co.id/holidays/indonesia/" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "id": "holiday_2025_01_01", "date": "2025-01-01", "name": "Tahun Baru 2025", "type": "Public Holiday", "is_national_holiday": true }, { "id": "holiday_2025_01_17", "date": "2025-01-17", "name": "Hari Raya Idul Fitri 1446 H", "type": "National Holiday", "is_national_holiday": true } ], "paging": { "page": 1, "size": 100, "total_item": 20, "total_page": 1 }}Get Holiday by ID
Get a single holiday by its ID.
| Nama | Tipe | Keterangan |
|---|---|---|
idWajib | string | Holiday ID Contoh: holiday_2025_01_01 |
curl -X GET "https://use.api.co.id/holidays/indonesia/holiday_2025_01_01" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": { "id": "holiday_2025_01_01", "date": "2025-01-01", "name": "Tahun Baru 2025", "type": "Public Holiday", "is_national_holiday": true, "description": "Hari libur nasional Tahun Baru 2025" }}Date Checking
Check Date
Check if a specific date is a holiday.
| Nama | Tipe | Keterangan |
|---|---|---|
dateWajib | string | Date to check (YYYY-MM-DD) Contoh: 2025-01-01 |
curl -X GET "https://use.api.co.id/holidays/indonesia/check/date?date=2025-01-01" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": { "date": "2025-01-01", "is_holiday": true, "holiday": { "id": "holiday_2025_01_01", "name": "Tahun Baru 2025", "type": "Public Holiday" } }}Check Date Range
Get all holidays within a date range.
| Nama | Tipe | Keterangan |
|---|---|---|
start_dateWajib | string | Start date (YYYY-MM-DD) Contoh: 2025-01-01 |
end_dateWajib | string | End date (YYYY-MM-DD) Contoh: 2025-01-31 |
typeOpsional | string | Filter by holiday type Nilai: Public HolidayJoint HolidayNational HolidayObservanceContoh: Public Holiday |
curl -X GET "https://use.api.co.id/holidays/indonesia/check/range?start_date=2025-01-01&end_date=2025-01-31" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "id": "holiday_2025_01_01", "date": "2025-01-01", "name": "Tahun Baru 2025", "type": "Public Holiday" }, { "id": "holiday_2025_01_17", "date": "2025-01-17", "name": "Hari Raya Idul Fitri 1446 H", "type": "National Holiday" } ], "total": 2}Upcoming & Next Holiday
Get Next Holiday
Get the next upcoming holiday with countdown information.
| Nama | Tipe | Keterangan |
|---|---|---|
typeOpsional | string | Filter by holiday type Nilai: Public HolidayJoint HolidayNational HolidayObservanceContoh: Public Holiday |
curl -X GET "https://use.api.co.id/holidays/indonesia/next" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": { "id": "holiday_2025_01_01", "date": "2025-01-01", "name": "Tahun Baru 2025", "type": "Public Holiday", "days_until": 15, "countdown": "15 days until Tahun Baru 2025" }}Get Upcoming Holidays
Get a list of upcoming holidays with optional limit.
| Nama | Tipe | Keterangan |
|---|---|---|
limitOpsional | integer | Maximum number of upcoming holidays to return Contoh: 5 |
typeOpsional | string | Filter by holiday type Nilai: Public HolidayJoint HolidayNational HolidayObservanceContoh: Public Holiday |
curl -X GET "https://use.api.co.id/holidays/indonesia/upcoming" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "id": "holiday_2025_01_01", "date": "2025-01-01", "name": "Tahun Baru 2025", "type": "Public Holiday", "days_until": 15 }, { "id": "holiday_2025_01_17", "date": "2025-01-17", "name": "Hari Raya Idul Fitri 1446 H", "type": "National Holiday", "days_until": 31 } ], "total": 2}Statistics & Analytics
Get Holiday Statistics
Get holiday statistics including long weekend detection for a specific year.
| Nama | Tipe | Keterangan |
|---|---|---|
yearWajib | integer | Year to get statistics for Contoh: 2025 |
curl -X GET "https://use.api.co.id/holidays/indonesia/stats?year=2025" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": { "year": 2025, "total_holidays": 20, "public_holidays": 15, "national_holidays": 5, "long_weekends": [ { "date": "2025-01-01", "name": "Tahun Baru 2025", "type": "Public Holiday" }, { "date": "2025-01-17", "name": "Hari Raya Idul Fitri 1446 H", "type": "National Holiday" } ], "total_long_weekends": 2 }}Get Holiday Calendar
Get holidays for a specific month in calendar format.
| Nama | Tipe | Keterangan |
|---|---|---|
yearWajib | integer | Year Contoh: 2025 |
monthWajib | integer | Month (1-12) Contoh: 1 |
curl -X GET "https://use.api.co.id/holidays/indonesia/calendar?year=2025&month=1" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": { "year": 2025, "month": 1, "holidays": [ { "date": "2025-01-01", "name": "Tahun Baru 2025", "type": "Public Holiday" }, { "date": "2025-01-17", "name": "Hari Raya Idul Fitri 1446 H", "type": "National Holiday" } ], "total": 2 }}Metadata
Get Available Years
Get all years that have holiday data in the database.
curl -X GET "https://use.api.co.id/holidays/indonesia/years" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ 2020, 2021, 2022, 2023, 2024, 2025, 2026 ], "total": 7}Get Holiday Types
Get all available holiday types with descriptions.
curl -X GET "https://use.api.co.id/holidays/indonesia/types" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "type": "Public Holiday", "description": "Public holiday observed nationwide" }, { "type": "Joint Holiday", "description": "Joint holiday observed by multiple regions" }, { "type": "National Holiday", "description": "National holiday of significant importance" }, { "type": "Observance", "description": "Cultural or religious observance" } ], "total": 4}