Enables queries via GeoId (ID of Feiertagskalender.ch) and date. Indicates if and to what percentage on this day a holiday is valid, or school holidays.
The available GeoIds can be found in the API: GeoTree/ISO
To retrieve the data, use the following URL.
Please pay attention to capital letters.
The following variables can be used to complete the query and affect the API results.
| Parameter | Explanation | Examples |
|---|---|---|
| api_key required |
Your API key |
?api_key=abc-123-def-456 |
| geoId required |
Geo-ID of the desired location. The Geo-ID of Feiertagskalender.ch is used. | &geoid=2872 |
| date | Date of the desired data.
Available according to contract |
&date=2019-02-28 |
| class or klasse |
Scope of the holidays by significance. Variants: |
&klasse=5 |
| charset | The desired encoding of the answer. Variants: |
&charset=iso-8859-1 |
| format | The desired output format. Variants: |
&format=xml |
| date_format | The desired date format. Variants: |
&date_format=d.m.Y |
| hl | Desired output language. Variants: |
&hl=en |
The contents of the API answers result from:
- the dates you subscribe to (countries, holidays, school holidays, calendar years)
- the official known data of the legislators
- availability based on our research (actual situation of our database)
Please note that the output in CSV format differs
| Parameter | Explanation | Example | |||
|---|---|---|---|---|---|
| interface | Version of the API | ||||
| source: | href | URL to data source (website) | |||
| description | Name of the data source | ||||
| copyright: | href | URL to the copyright owner (website) | |||
| description | Designation of the copyright holder | ||||
| apiName | Identification of the API | CheckDate/GeoId | |||
| apiStatus | description | Description of the API status | active | ||
| date | Date of data export | 27.10.2025 | |||
| request: | geoId | GeoId according to request | 2872 | ||
| date | Date of data in output | 2019-02-28 | |||
| charset | Font encoding of the output | utf-8 | |||
| format | Data format of the output | json | |||
| date_format | Date format, according to request | d.m.Y | |||
| hl | Output language | de | |||
| results | status | description | Output status | ok | |
| location | description | Name of the geographical unit | Zürich | ||
| type | Designation of the type of geographical unit | Kanton | |||
| geoId | Id of the geographical unit (Id by Feiertagskalender.ch) | 2872 | |||
| iso | ISO country code, 2 digits | CH | |||
| iso-3166-2 | Region code according to ISO 3166-2 | CH-ZH | |||
| date_status | Day status | ||||
| date | Date | 2019-02-28 | |||
| total_population | Total number of inhabitants | 1502167 | |||
| public_holiday_population | No. of inhabitants with holiday | 0 | |||
| public_holiday_percent | Percentage of inhabitants with holidays | 0 | |||
| public_holiday_description | Designation Holiday | ||||
| school_holiday_population | No. of inhabitants with school holidays | 501752 | |||
| school_holiday_percent | Percentage of inhabitants with school holidays | 33.4018787524955 | |||
| school_holiday_description | Designation School holidays | Sportferien | |||
| sum_population | Sum of affected inhabitants | 501752 | |||
| percent_population | Percentage of affected inhabitants | 33.4018787524955 |
| Place of issue | Error message | Explanation |
|---|---|---|
| results: status: description | not subscribed | You have not subscribed to the required data. Please contact our support. |
| results: status: description | unknown location | The requested GeoId is unknown. Please check the parameter: geoId |
| apiStatus: description | invalid usage | The use of this API is not intended for you. Please contact our support. |
| apiStatus: description | invalid key | Invalid API key. Please check your API key. |
| apiStatus: description | invalid referer | Invalid access. Links from websites (front-ends) are not permitted. Set up your query so that it comes from a protected back-end. If necessary, please contact the Feiertagskalender.ch support. |
| apiStatus: description | inactive | The API has not yet been unlocked for use. Please try again later. |
| apiStatus: description | expired | The useful life according to the contract has expired. Please contact the Feiertagskalender.ch Administration for a contract extension. |
Call:
https://feiertagskalender.ch/api/CheckDate/GeoId/?api_key=YOUR_API_KEY&geoId=2872&date=2019-02-28
Reply in JSON / UTF-8:
{
"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/GeoId",
"apiStatus":{
"description":"active"
},
"date":"2019-04-11",
"request":{
"geoId":"2872",
"date":"2019-02-28",
"charset":"utf-8",
"format":"json",
"date_format":"Y-m-d",
"hl":"de"
},
"results":{
"status":{
"description":"ok"
},
"location":{
"description":"Zürich",
"type":"Kanton",
"geoId":"2872",
"iso":"CH",
"iso-3166-2":"CH-ZH",
"date_status":{
"date":"2019-02-28",
"total_population":1502167,
"public_holiday_population":0,
"public_holiday_percent":0,
"public_holiday_description":null,
"school_holiday_population":501752,
"school_holiday_percent":33.401878752495563,
"school_holiday_description":"Sportferien",
"sum_population":501752,
"sum_percent":33.401878752495563
}
}
}
}
Call:
https://feiertagskalender.ch/api/CheckDate/GeoId/?api_key=YOUR_API_KEY&charset=iso-8859-1&geoId=2872&date=2019-02-28&format=xml
Reply in XML / ISO-8859-1:
<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/GeoId</apiName> <date>2019-04-11</date> <request> <geoId>2872</geoId> <date>2019-02-28</date> <charset>iso-8859-1</charset> <format>xml</format> <date_format>Y-m-d</date_format> <hl>de</hl> </request> <results> <status> <description>ok</description> </status> <location> <description>Zürich</description> <type>Kanton</type> <geoId>2872</geoId> <iso>CH</iso> <iso-3166-2>CH-ZH</iso-3166-2> <date_status> <date>2019-02-28</date> <total_population>1502167</total_population> <public_holiday_population>0</public_holiday_population> <public_holiday_percent>0</public_holiday_percent> <public_holiday_description></public_holiday_description> <school_holiday_population>501752</school_holiday_population> <school_holiday_percent>33.401878752496</school_holiday_percent> <school_holiday_description>Sportferien</school_holiday_description> <sum_population>501752</sum_population> <sum_percent>33.401878752496</sum_percent> </date_status> </location> </results> </fcal_api>
Call:
https://feiertagskalender.ch/api/Data/GeoId/?api_key=YOUR_API_KEY&charset=iso-8859-1&jahr=2015&date_format=d.m.Y&geoId=410&format=csv
Reply in CSV / ISO-8859-1:
"location";"geoId";"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" "Zürich";"2872";"CH";"CH-ZH";"2019-02-28";"1502167";"0";"0";"";"501752";"33.401878752496";"Sportferien";"501752";"33.401878752496"