Docs / Calendar
Holidays
Lists public holidays for a country and year.
GET
/v1/holidaysimport { Client } from "@liveapiio/liveapi";
const client = new Client({ token: process.env.LIVEAPI_TOKEN });
const holidays = await client.holidays("TR", 2026);Request
Send Authorization: Bearer YOUR_TOKEN. The token stays on your server. Each library reads it from the environment and calls this endpoint for you.
| Field | Type | Description |
|---|---|---|
| country | string | ISO country code. Required. |
| year | number | Calendar year. Optional. |
Response
A 200 response uses one call. Returns the country, year, and the holiday dates.
Errors
A failed request returns { "error": { "code", "message" } } and does not use a call.
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A required field is missing or has the wrong type. |
| 404 | not_found | No holiday data for this country. |
| 503 | upstream_unavailable | The holiday source is unavailable. |
| 401 | unauthorized | The bearer token is missing or not recognized. |