Nager.Date
90 多个国家的公共节假日
- 认证方式
- No auth
- HTTPS
- Yes
- CORS
- No
- 分类
- 日历
- 文档 / URL
- https://date.nager.at
简介
Nager.Date 以 JSON 提供 90+ 个国家的公共节假日——免费、免密钥、每年更新。是节假日日历、工作日计算和“今天是假日吗”功能的实用组件。
快速开始
某国某年的公共节假日(实测可用——美国 2026):
curl "https://date.nager.at/api/v3/PublicHolidays/2026/US"
[
{
"date": "2026-01-01",
"localName": "New Year's Day",
"name": "New Year's Day",
"countryCode": "US",
"fixed": true,
"global": true,
"counties": null,
"launchYear": null,
"types": ["Public"]
}
]
某国今天的节假日:
curl "https://date.nager.at/api/v3/Today/US"
接下来的公共节假日:
curl "https://date.nager.at/api/v3/NextPublicHolidays/US"
某年的长周末:
curl "https://date.nager.at/api/v3/LongWeekend/2026/US"
支持的国家列表:
curl "https://date.nager.at/api/v3/AvailableCountries"
认证方式
无需认证——免密钥。
速率限制与注意事项
- 免费;没有文档化的硬性限制——请礼貌使用。
- 国家代码是 ISO 3166-1 alpha-2(
US、DE、CN……)。 - 假日条目含
localName(当地语言)、name(英文)、fixed、global(全国 vs 区域)、counties和types。 - 数据由社区策展、每年更新——特殊情况请自行核实。
常见问题
Nager.Date 免费吗? 是的——免费且免密钥。
支持哪些国家? 90+ 个国家(ISO alpha-2 代码)。
如何获取某国的节假日?
/api/v3/PublicHolidays/{年份}/{国家代码}。
日历 分类更多
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| caldays Public holidays for 195+ countries | No auth | Yes | Yes | ↗ |
| Calendarific Worldwide Holidays | API Key | Yes | Unknown | ↗ |
| Checkiday - National Holiday Industry-leading holiday data with over 5,000 holidays and thousands of descriptions | API Key | Yes | Unknown | ↗ |
| Church Calendar Catholic liturgical calendar | No auth | No | Unknown | ↗ |
| Czech Namedays Calendar Lookup for a name and returns nameday date | No auth | No | Unknown | ↗ |