Public Holidays
Math & Calculations Credits / request: 1Public holiday list by country and year or date range. Single date returns isHoliday.
GET
https://api.apikodu.com/api/v1/holidays
Documentation
Overview
Public holidays from resmi_tatil. When date is set, isHoliday is returned.
Authentication
Every request requires the x-api-key header. Credits used and remaining quota are returned in response headers (x-api-credits-used, x-api-remaining-credits, x-rate-limit-*).
Request
GET
https://api.apikodu.com/api/v1/holidays?countryCode=TR&year=2026
Query string. year or fromDate/toDate or date.
Parameters
| Name | Type | Required | Default | Options | Description |
|---|---|---|---|---|---|
countryCode |
string | * Required | — | — | ISO 3166-1 alpha-2. |
year |
integer | Optional | — | — | Year. Empty uses UTC year. Ignored when fromDate is set. |
fromDate |
string | Optional | — | — | YYYY-MM-DD with toDate. Max 366 days. |
toDate |
string | Optional | — | — | YYYY-MM-DD. |
date |
string | Optional | — | — | Single day YYYY-MM-DD → isHoliday. |
Response
| Name | Type | Description |
|---|---|---|
countryCode |
string | Normalized country code. |
year |
integer | Year in year mode. Otherwise null. |
isHoliday |
boolean | Set when date is provided. Otherwise null. |
count |
integer | Number of holidays returned. |
holidays |
array | Holiday rows. |
holidays[].date |
string | YYYY-MM-DD. |
holidays[].name |
string | Holiday name from the table. |
Errors
| HTTP | code | Description |
|---|---|---|
400 |
-280 |
countryCode is empty. |
400 |
-243 |
Not ISO or unknown in ulke. |
400 |
-247 |
Invalid date format/year/range. |
401 |
-100 |
x-api-key is missing, empty, malformed, inactive, banned, expired, IP-restricted, or not allowed for this API. |
429 |
-221 |
Per-minute request limit exceeded. Response headers: x-rate-limit-limit, x-rate-limit-remaining, x-rate-limit-reset. |
429 |
— | Package credit quota cannot cover this request. Body may be { error, limit, currentUsage, requestCost } (no code field). |
500 |
-1 |
Unexpected server error. message is a generic error text without technical details. |
Notes
- Success body is { data: { ... } }. Error body is { code, message }. code is an ApiResponseCode enum value (negative integer).
Sample response
{
"data": {
"countryCode": "TR",
"year": 2026,
"isHoliday": null,
"count": 2,
"holidays": [
{
"date": "2026-01-01",
"name": "New Year's Day"
},
{
"date": "2026-04-23",
"name": "National Sovereignty and Children's Day"
}
]
}
}
Code samples
const response = await fetch('https://api.apikodu.com/api/v1/holidays', {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
import requests
headers = {
'x-api-key': 'YOUR_API_KEY'
}
response = requests.get('https://api.apikodu.com/api/v1/holidays', headers=headers)
print(response.json())
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var response = await client.GetStringAsync("https://api.apikodu.com/api/v1/holidays");
Console.WriteLine(response);
$response = file_get_contents('https://api.apikodu.com/api/v1/holidays', false, stream_context_create([
'http' => [
'header' => "x-api-key: YOUR_API_KEY"
]
]));
print_r(json_decode($response, true));
curl -X GET 'https://api.apikodu.com/api/v1/holidays' \
-H 'x-api-key: YOUR_API_KEY'
Start building in minutes
Create a free account, get your API key and send your first request in minutes.