GET /v1/holidays
GET /v1/holidays/{country}/{year}.json returns every national public holiday for one country in 2026.
Parameters
| Parameter | Where | Notes |
|---|---|---|
country | Path or query | ISO alpha-2: US, GB, DE, JP, SA and the rest of the 12. |
year | Path or query | 2026 is the only covered year. Others return year_not_covered. |
Response fields
| Field | Meaning |
|---|---|
date | Date the holiday is observed, YYYY-MM-DD. |
name | English name as published by the source authority. |
type | public for every entry in this dataset. |
source | Authority the list was checked against, returned at the top level. |
count | Number of entries. US 2026 returns 11. |
Examples you can run
curl:
curl -s https://api.kingai.work/v1/holidays/US/2026.jsonJavaScript:
const r = await fetch('https://api.kingai.work/v1/holidays/US/2026.json');
const j = await r.json();
console.log(j.count, j.holidays[0]); // 11 {date:'2026-01-01',...}Python:
import requests
j = requests.get('https://api.kingai.work/v1/holidays/US/2026.json').json()
print(j['count']) # 11Regional holidays sit outside v1. A state holiday in Bavaria or a provincial holiday in Ontario will not appear, and payroll teams have been burned by exactly that assumption, which is why it is written here and on the home page.
Error codes
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_parameter | A parameter is missing or malformed, for example a date that is not YYYY-MM-DD. |
| 404 | country_not_found | The country code is not in the covered set of 12. |
| 404 | year_not_covered | Only 2026 is in the dataset. Other years return this error instead of a guess. |
Errors use one shape: {"error": {"code": "...", "message": "..."}}. Try the bad-country button in the console to see one.