具
Nager.Date API
8 endpointsUtilitiesGlobalsocial:read6 real examples
Returns public holidays, upcoming holidays, long weekends and country info for many countries.
View as Markdown| GET | /nagerdate/countries | The countries that Nager.Date has holidays for. |
| GET | /nagerdate/countryInfo | A country's names, region and the countries it borders, by two-letter code. |
| GET | /nagerdate/publicHolidays | The public holidays of one country in one year. |
| GET | /nagerdate/nextHolidays | The next upcoming public holidays of one country. |
| GET | /nagerdate/longWeekend | The long weekends of one country in one year, with the bridge days that make them. |
| GET | /nagerdate/isTodayHoliday | Whether today is a public holiday in one country. |
| GET | /nagerdate/nextHolidaysWorldwide | The next upcoming public holidays in every country Nager.Date covers, each with its country code, soonest first. |
| GET | /nagerdate/workingDays | The working days of one country between two dates, both included: weekdays that are not nationwide public holidays. Covers up to four years. |
countries
GET
/v1/nagerdate/countriesThe countries that Nager.Date has holidays for.
scope social:read1 unitcached 24 hpaginated
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
2 fields
countryCode | string |
name | string |
curl "https://api.hoshime.com/v1/nagerdate/countries" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/nagerdate/countries", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/nagerdate/countries", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "countryCode": "AD", "name": "Andorra" }, { "countryCode": "AG", "name": "Antigua and Barbuda" } ], "meta": { "cached": false, "endpoint": "countries", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "nagerdate", "requestId": "req_2Xb9kQ…", "units": 1 } }
countryInfo
GET
/v1/nagerdate/countryInfoA country's names, region and the countries it borders, by two-letter code.
scope social:read1 unitcached 24 h
Parameters
countrystring required | Two-letter country code, such as ID for Indonesia. e.g. ID |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
borders | Country[] |
countryCode | string |
name | string |
commonName | string |
countryCode | string |
officialName | string |
region | string |
curl "https://api.hoshime.com/v1/nagerdate/countryInfo?country=ID" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/nagerdate/countryInfo?country=ID", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/nagerdate/countryInfo?country=ID", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "borders": [ { "countryCode": "TL", "name": "Timor-Leste" }, { "countryCode": "MY", "name": "Malaysia" } ], "commonName": "Indonesia", "countryCode": "ID", "officialName": "Republic of Indonesia", "region": "Asia" }, "meta": { "cached": false, "endpoint": "countryInfo", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "nagerdate", "requestId": "req_2Xb9kQ…", "units": 1 } }
publicHolidays
GET
/v1/nagerdate/publicHolidaysThe public holidays of one country in one year.
scope social:read1 unitcached 24 hpaginated
Parameters
yearinteger required | Year, from 1900 to 2100, such as 2026. e.g. 2026 |
countrystring required | Two-letter country code, such as ID for Indonesia. e.g. ID |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
counties | Label[] |
name | string |
countryCode | string |
date | string |
global | boolean |
localName | string |
name | string |
curl "https://api.hoshime.com/v1/nagerdate/publicHolidays?year=2026&country=ID" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/nagerdate/publicHolidays?year=2026&country=ID", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/nagerdate/publicHolidays?year=2026&country=ID", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "counties": [], "countryCode": "ID", "date": "2026-01-01", "global": true, "localName": "Tahun Baru Masehi", "name": "New Year's Day" }, { "counties": [], "countryCode": "ID", "date": "2026-04-03", "global": true, "localName": "Wafat Isa Almasih", "name": "Good Friday" } ], "meta": { "cached": false, "endpoint": "publicHolidays", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "nagerdate", "requestId": "req_2Xb9kQ…", "units": 1 } }
nextHolidays
GET
/v1/nagerdate/nextHolidaysThe next upcoming public holidays of one country.
scope social:read1 unitcached 1 hpaginated
Parameters
countrystring required | Two-letter country code, such as ID for Indonesia. e.g. ID |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
counties | Label[] |
name | string |
countryCode | string |
date | string |
global | boolean |
localName | string |
name | string |
curl "https://api.hoshime.com/v1/nagerdate/nextHolidays?country=ID" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/nagerdate/nextHolidays?country=ID", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/nagerdate/nextHolidays?country=ID", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "counties": [], "countryCode": "ID", "date": "2026-12-25", "global": true, "localName": "Hari Raya Natal", "name": "Christmas Day" }, { "counties": [], "countryCode": "ID", "date": "2027-01-01", "global": true, "localName": "Tahun Baru Masehi", "name": "New Year's Day" } ], "meta": { "cached": false, "endpoint": "nextHolidays", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "nagerdate", "requestId": "req_2Xb9kQ…", "units": 1 } }
longWeekend
GET
/v1/nagerdate/longWeekendThe long weekends of one country in one year, with the bridge days that make them.
scope social:read1 unitcached 24 hpaginated
Parameters
yearinteger required | Year, from 1900 to 2100, such as 2026. e.g. 2026 |
countrystring required | Two-letter country code, such as ID for Indonesia. e.g. ID |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
6 fields
bridgeDays | Label[] |
name | string |
dayCount | integer (int64) |
endDate | string |
needBridgeDay | boolean |
startDate | string |
curl "https://api.hoshime.com/v1/nagerdate/longWeekend?year=2026&country=ID" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/nagerdate/longWeekend?year=2026&country=ID", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/nagerdate/longWeekend?year=2026&country=ID", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "bridgeDays": [ { "name": "2026-01-02" } ], "dayCount": 4, "endDate": "2026-01-04", "needBridgeDay": true, "startDate": "2026-01-01" }, { "bridgeDays": [], "dayCount": 3, "endDate": "2026-04-05", "needBridgeDay": false, "startDate": "2026-04-03" } ], "meta": { "cached": false, "endpoint": "longWeekend", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "nagerdate", "requestId": "req_2Xb9kQ…", "units": 1 } }
isTodayHoliday
GET
/v1/nagerdate/isTodayHolidayWhether today is a public holiday in one country.
scope social:read1 unitcached 1 h
Parameters
countrystring required | Two-letter country code, such as ID for Indonesia. e.g. ID |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
2 fields
countryCode | string |
isHoliday | boolean |
curl "https://api.hoshime.com/v1/nagerdate/isTodayHoliday?country=ID" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/nagerdate/isTodayHoliday?country=ID", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/nagerdate/isTodayHoliday?country=ID", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "countryCode": "ID", "isHoliday": false }, "meta": { "cached": false, "endpoint": "isTodayHoliday", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "nagerdate", "requestId": "req_2Xb9kQ…", "units": 1 } }
nextHolidaysWorldwide
GET
/v1/nagerdate/nextHolidaysWorldwideThe next upcoming public holidays in every country Nager.Date covers, each with its country code, soonest first.
scope social:read1 unitcached 1 hpaginated
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
counties | Label[] |
name | string |
countryCode | string |
date | string |
global | boolean |
localName | string |
name | string |
curl "https://api.hoshime.com/v1/nagerdate/nextHolidaysWorldwide" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/nagerdate/nextHolidaysWorldwide", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/nagerdate/nextHolidaysWorldwide", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "counties": [ { "name": null } ], "countryCode": "…", "date": "…", "global": false, "localName": "…", "name": "…" } ], "meta": { "cached": false, "endpoint": "nextHolidaysWorldwide", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "nagerdate", "requestId": "req_2Xb9kQ…", "units": 1 } }
workingDays
GET
/v1/nagerdate/workingDaysThe working days of one country between two dates, both included: weekdays that are not nationwide public holidays. Covers up to four years.
scope social:read1 unitcached 6 h
Parameters
countrystring required | Two-letter country code, such as ID for Indonesia. e.g. ID |
fromstring required | First day, YYYY-MM-DD. e.g. 2026-01-01 |
tostring required | Last day, YYYY-MM-DD, on or after from. e.g. 2026-12-31 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
6 fields
country | string |
days | integer (int64) |
from | string |
holidaysOnWeekdays | integer (int64) |
to | string |
workingDays | integer (int64) |
curl "https://api.hoshime.com/v1/nagerdate/workingDays?country=ID&from=2026-01-01&to=2026-12-31" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/nagerdate/workingDays?country=ID&from=2026-01-01&to=2026-12-31", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/nagerdate/workingDays?country=ID&from=2026-01-01&to=2026-12-31", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "country": "…", "days": 0, "from": "…", "holidaysOnWeekdays": 0, "to": "…", "workingDays": 0 }, "meta": { "cached": false, "endpoint": "workingDays", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "nagerdate", "requestId": "req_2Xb9kQ…", "units": 1 } }