Enables queries via CityId (ID of Feiertagskalender.ch) and date. Indicates if and to what percentage on this day a holiday is valid, or school holidays.
The available CityIds 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 |
| cityId required |
CityID of the desired location. The CityID of Feiertagskalender.ch is used. | &cityid=88 |
| date | Date of the desired data.
Available according to contract |
&date=2019-04-18 |
| 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/CityId | |||
| apiStatus | description | Description of the API status | active | ||
| date | Date of data export | 27.03.2026 | |||
| request: | cityId | CityId, according to request | 88 | ||
| date | Date of data in output | 2019-04-18 | |||
| 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 | Berlin | ||
| type | Designation of the type of geographical unit | Stadt | |||
| cityId | Id of the geographical unit (Id by Feiertagskalender.ch) | 88 | |||
| iso | ISO country code, 2 digits | DE | |||
| iso-3166-2 | Region code according to ISO 3166-2 | DE-BE | |||
| date_status | Day status | ||||
| date | Date | 2019-04-18 | |||
| total_population | Total number of inhabitants | 3601131 | |||
| 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 | 3601131 | |||
| school_holiday_percent | Percentage of inhabitants with school holidays | 100 | |||
| school_holiday_description | Designation School holidays | Osterferien | |||
| sum_population | Sum of affected inhabitants | 3601131 | |||
| percent_population | Percentage of affected inhabitants | 100 |
| 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 CityId is not known. Please check the parameter: cityId |
| 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/CityId/?api_key=YOUR_API_KEY&cityId=88&date=2019-04-18
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/CityId",
"apiStatus":{
"description":"active"
},
"date":"2019-04-11",
"request":{
"cityId":"88",
"date":"2019-04-18",
"charset":"utf-8",
"format":"json",
"date_format":"Y-m-d",
"hl":"de"
},
"results":{
"status":{
"description":"ok"
},
"location":{
"description":"Berlin",
"type":"Stadt",
"cityId":"88",
"iso":"DE",
"iso-3166-2":"DE-BE",
"date_status":{
"date":"2019-04-18",
"total_population":3601131,
"public_holiday_population":0,
"public_holiday_percent":0,
"public_holiday_description":null,
"school_holiday_population":3601131,
"school_holiday_percent":100,
"school_holiday_description":"Osterferien",
"sum_population":3601131,
"sum_percent":100
}
}
}
}
Call:
https://feiertagskalender.ch/api/CheckDate/CityId/?api_key=YOUR_API_KEY&charset=iso-8859-1&cityId=88&date=2019-04-18&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/CityId</apiName> <date>2019-04-11</date> <request> <cityId>88</cityId> <date>2019-04-18</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>Berlin</description> <type>Stadt</type> <cityId>88</cityId> <iso>DE</iso> <iso-3166-2>DE-BE</iso-3166-2> <date_status> <date>2019-04-18</date> <total_population>3601131</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>3601131</school_holiday_population> <school_holiday_percent>100</school_holiday_percent> <school_holiday_description>Osterferien</school_holiday_description> <sum_population>3601131</sum_population> <sum_percent>100</sum_percent> </date_status> </location> </results> </fcal_api>
Call:
view-source:https://feiertagskalender.ch/api/CheckDate/CityId/?api_key=YOUR_API_KEY&cityId=88&date=2019-04-18&charset=iso-8859-1&format=csv
Reply in CSV / ISO-8859-1:
"location";"cityId";"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" "Berlin";"88";"DE";"DE-BE";"2019-04-18";"3601131";"0";"0";"";"3601131";"100";"Osterferien";"3601131";"100"