Daily information whether there is a public holiday and/or school holidays on this date.
API Chapters
Enables queries by means of date and Swiss postcodes. Indicates whether there is a public holiday or school holiday on this day and to what percentage.
The query also works for postcodes in Liechtenstein.
To retrieve the data, use the following URL. Please pay attention to upper case lower case.
With the following variables you can complete the query and control the API results.
Parameter | Explanation | Examples |
---|---|---|
api_key required |
Your API Key | api_key=abc-123-def-456 |
PLZ required |
Swiss postcode | &PLZ=2504 |
date | The date to check |
&date=2025-08-13 |
class or klasse |
Scope of the data Variants: |
klasse=5 |
charset | The desired coding of the response Variants: |
charset=iso-8859-1 |
format | The desired output format Variants: |
format=xml |
date_format | The desired date format for the response. Default: `Y-m-d` (e.g., 2025-12-31)
Variants: |
date_format=d.m.Y |
hl | Desired language of the output Variants: |
hl=en |
The contents of the API responses result from:
- the data you have subscribed to (countries, public holidays, school holidays, calendar years)
- the officially known data of the legislators
- the availability based on our research (ACTUAL situation of our database)
Please note that the output in CSV format differs.
Array | Explanation | Example | ||||
---|---|---|---|---|---|---|
interface | Version of the API | |||||
source: | href | URL to the data source (website) | ||||
description | Name of the data source | |||||
copyright | href | URL to the copyright holder (website) | ||||
description | Designation of the copyright holder | |||||
apiName | Identification of the API | CheckDate/CH/PLZ | ||||
apiStatus | description | Designation of the API status. For variants, see the Error messages | active | |||
date | Date of the data export | 13.07.2025 | ||||
request: | plz | Swiss postcode | 2504 | |||
date | Date of the data in the output | 2019-04-15 | ||||
charset | Font coding of the output | utf-8 | ||||
format | Output data format | json | ||||
date_format | Output date format | d.m.Y | ||||
hl | Language of issue, according to request | en | ||||
results | status | description | Output status. For variants, see the Error messages | ok | ||
location | description | Designation of the geographical unit | Biel/Bienne | |||
type | Designation of the type of geographical unit | City | ||||
geoId | Geo-ID of the geographical unit. | 424 | ||||
iso | ISO country code, 2 digits | CH | ||||
iso-3166-2 | Region code according to ISO 3166-2 | CH-BE | ||||
note | Special notes | NEW 30.03.2023 | ||||
date_status | Day status | |||||
date | Date | 2019-04-15 | ||||
total_population | Total number of inhabitants | 54640 | ||||
public_holiday_population | Number of inhabitants with public holiday | 0 | ||||
public_holiday_percent | Percent Inhabitants with public holiday | 0 | ||||
public_holiday_description | Designation of the public holiday | |||||
school_holiday_population | Number of inhabitants with school holidays | 54640 | ||||
school_holiday_percent | Percent Inhabitants with school holidays | 100 | ||||
school_holiday_description | Designation school holidays | Spring time holidays | ||||
sum_population | Total number of inhabitants affected | 54640 | ||||
percent_population | Percentage of inhabitants affected | 100 |
Output location | Error message | Explanation |
---|---|---|
results: status: | ||
results: status: description | not subscribed | You have not subscribed to the desired data. | The requested Swiss postcode is not known. |
results: status: description | unknown location | The requested Swiss postcode is not known. |
apiStatus | ||
apiStatus: description | invalid usage | The use of this API is not enabled for this user. |
apiStatus: description | invalid key | Invalid API key. |
apiStatus: description | invalid referer | Invalid access. Links from web pages (front-ends) are not allowed. |
apiStatus: description | inactive | The API has not yet been activated for use. |
apiStatus: description | expired | The period of use according to the contract has expired. |
URL:
https://feiertagskalender.ch/api/CheckDate/CH/PLZ/index.php?api_key=YOUR_API_KEY&plz=2504&date=2019-04-15
Response from the API:
{ "interface":"fcal API 2.0", "source":{ "href":"https://feiertagskalender.ch", "description":"feiertagskalender.ch" }, "copyright":{ "href":"https://psc.ch", "description":"psc Peter Schuetz Informatik-Dienstleistungen, CH Bern" }, "apiName":"CheckDate/CH/PLZ", "apiStatus":{ "description":"active" }, "date":"2025-07-13", "request":{ "plz":"2504", "date":"2019-04-15", "charset":"utf-8", "format":"json", "date_format":"Y-m-d", "hl":"de" }, "results":{ "status":{ "description":"ok" }, "location":{ "description":"Biel/Bienne", "type":"Gemeinde", "geoId":"424", "iso":"CH", "iso-3166-2":"CH-BE", "date_status":{ "date":"2019-04-15", "total_population":54640, "public_holiday_population":0, "public_holiday_percent":0, "public_holiday_description":null, "school_holiday_population":54640, "school_holiday_percent":100, "school_holiday_description":"Frühlingsferien", "sum_population":54640, "sum_percent":100 } } } }
URL:
https://feiertagskalender.ch/api/CheckDate/CH/PLZ/index.php?api_key=YOUR_API_KEY&plz=2504&date=2019-04-15&format=XML
Response from the API:
<fcal_api> <interface>fcal API 2.0</interface> <source> <href>https://feiertagskalender.ch</href> <description>feiertagskalender.ch</description> </source> <copyright> <href>https://psc.ch</href> <description>psc Peter Schuetz Informatik-Dienstleistungen, CH Bern</description> </copyright> <apiStatus> <description>active</description> </apiStatus> <apiName>CheckDate/CH/PLZ</apiName> <date>2019-04-11</date> <request> <plz>2504</plz> <date>2019-04-15</date> <charset>utf-8</charset> <format>xml</format> <date_format>Y-m-d</date_format> <hl>de</hl> </request> <results> <status> <description>ok</description> </status> <location> <description>Biel/Bienne</description> <type>Gemeinde</type> <geoId>424</geoId> <iso>CH</iso> <iso-3166-2>CH-BE</iso-3166-2> <date_status> <date>2019-04-15</date> <total_population>54640</total_population> <public_holiday_population>0</public_holiday_population> <public_holiday_percent>0</public_holiday_percent> <public_holiday_description/> <school_holiday_population>54640</school_holiday_population> <school_holiday_percent>100</school_holiday_percent> <school_holiday_description>Frühlingsferien</school_holiday_description> <sum_population>54640</sum_population> <sum_percent>100</sum_percent> </date_status> </location> </results> </fcal_api>
URL:
https://feiertagskalender.ch/api/CheckDate/CH/PLZ/index.php?api_key=YOUR_API_KEY&plz=2504&date=2019-04-15&format=csv
Response from the API:
"location";"plz";"iso";"iso-3166-2";"date";"total_population";"public_holiday_population";"public_holiday_percent";"public_holiday_description";"school_holiday_population";"school_holiday_percent";"school_holiday_description";"sum_population";"sum_percent" "Biel/Bienne";"2504";"CH";"CH-BE";"2019-04-15";"54640";"0";"0";"";"54640";"100";"Frühlingsferien";"54640";"100"