apipick-public-holidays
使用 apipick 公共假期 API 查询任何国家和年份的公共假期。支持 ISO 3166-1 alpha-2 国家/地区代码标识的 100 多个国家/地区。返回带有日期和官方名称的假期排序列表。当用户想要查找某个国家/地区的公共假期、检查特定日期是否为假期、列出给定年份的所有国家假期或计划任何国家/地区的假期时使用。需要 apipick API 密钥 (x-api-key)。在 https://www.apipick.com 获取免费密钥。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~javainthinking-apipick-public-holidayscURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~javainthinking-apipick-public-holidays/file -o javainthinking-apipick-public-holidays.md## 概述(中文)
使用 apipick 公共假期 API 查询任何国家和年份的公共假期。支持 ISO 3166-1 alpha-2 国家/地区代码标识的 100 多个国家/地区。返回带有日期和官方名称的假期排序列表。当用户想要查找某个国家/地区的公共假期、检查特定日期是否为假期、列出给定年份的所有国家假期或计划任何国家/地区的假期时使用。需要 apipick API 密钥 (x-api-key)。在 https://www.apipick.com 获取免费密钥。
## 原文
# apipick Public Holidays
Query public holidays for 100+ countries by ISO country code and year.
## Endpoint
```
GET https://www.apipick.com/api/holidays
```
**Authentication:** `x-api-key: YOUR_API_KEY` header required.
Get a free API key at https://www.apipick.com/dashboard/api-keys
## Request Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| `country` | Yes | ISO 3166-1 alpha-2 code (e.g. `US`, `GB`, `CN`, `DE`, `JP`) |
| `year` | No | 4-digit year (defaults to current year). Range: 1900 to current year + 10 |
```bash
GET /api/holidays?country=US&year=2026
```
## Response
```json
{
"success": true,
"code": 200,
"message": "Holidays retrieved successfully",
"data": {
"country": "US",
"country_name": "United States",
"year": 2026,
"total": 11,
"holidays": [
{"date": "2026-01-01", "name": "New Year's Day"},
{"date": "2026-07-04", "name": "Independence Day"},
{"date": "2026-12-25", "name": "Christmas Day"}
]
},
"credits_used": 1,
"remaining_credits": 99
}
```
## Error Codes
| Code | Meaning |
|------|---------|
| 400 | Invalid country code or year |
| 401 | Missing or invalid API key |
| 402 | Insufficient credits |
**Cost:** 1 credit per request
## Usage Pattern
1. Use `$APIPICK_API_KEY` env var as the `x-api-key` header value; if not set, ask the user for their apipick API key
2. Convert a country name to ISO code if the user provides a full name (e.g. "China" → `CN`, "United Kingdom" → `GB`)
3. Make the GET request with `country` and optional `year`
4. Present the holidays as a sorted list with dates and names
See [references/api_reference.md](references/api_reference.md) for full response field descriptions.