The Holiday API allows you to retrieve information about public holidays in Germany for the current date. By specifying a federal state code, you can get holidays specific to that region.
GET https://holidays.woxly.de/api/feiertage/aktuellesDatumland (string, required): The code representing the federal state for which you want to fetch holidays.Select the federal state code from the list above that corresponds to the region you&aposre interested in. For example, use SL for Saarland.
Append the land query parameter with your chosen state code to the endpoint URL.
https://holidays.woxly.de/api/feiertage/aktuellesDatum?land=SLYou can use any HTTP client to send the request. This can be a web browser, curl, Postman, or code in your preferred programming language.
The API will return a JSON array of holiday objects for the current date in the specified federal state.
[
{
"name": "German Unity Day",
"date": "2024-10-03",
"federal_state": "SL"
}
]Each holiday object in the response array contains the following fields:
YYYY-MM-DD format.If the land query parameter is missing or contains an invalid state code, the API may return an error message.
{
"error": "Invalid federal state code."
}NATIONAL code to retrieve holidays recognized nationwide.fetch('https://holidays.woxly.de/api/feiertage/aktuellesDatum?land=SL')
.then(response => response.json())
.then(data => {
if (data.length > 0) {
data.forEach(holiday => {
console.log(`Holiday: ${holiday.name} on ${holiday.date}`);
});
} else {
console.log('No holidays today in SL.');
}
})
.catch(error => console.error('Error fetching holidays:', error));land parameter to ensure it&aposs a valid federal state code from the list provided.For further assistance or to report issues, please contact the API provider through their official channels.