Enables queries via geocoordinates. Displays holidays and school holidays of the corresponding municipality/region. To improve hits in border areas, an ISO country code can be sent along with the search and/or the search distance can be changed.
Attention: The localization is done by distance measurement. In peripheral areas the assignment may therefore fail.
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 |
lat required |
Latitude. Geographical latitude | &lat=46.9576 |
lon required |
Longitude. Geographical longitude | &lon=7.45134 |
iso | ISO country code, 2 digits optional additional information for improved assignment. |
&iso=CH |
dist | Maximum search distance in kilometers (km) without specification: 100km (= default) |
&dist=200 |
year or jahr |
Year of the desired data. Available according to contract |
&year= 2026 |
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 | Data/LatLon | |||
apiStatus | description | Description of the API status | active | ||
date | Date of data export | 01.05.2025 | |||
request: | lat | Latitude. Geographical latitude | 46.9576 | ||
lon | Longitude. Geographical longitude | 7.45134 | |||
iso | Landeskürzel nach ISO, 2-stellig | CH | |||
dist | maximale Suchdistanz in km | 100 | |||
year | Year of the data in the output | 2015 | |||
class | Class of the query, concerns scope of data, by significance |
4 | |||
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 | Bern | ||
type | Designation of the type of geographical unit | Stadt | |||
geoId | Id of the geographical unit (Id by Feiertagskalender.ch) | 410 | |||
iso | ISO country code, 2 digits | BE | |||
iso-3166-2 | Region code according to ISO 3166-2 | ||||
events | the calendar events | ||||
description | Name of the holiday, or school holidays | Neujahrstag | |||
id | Unique ID of the event | 1 | |||
dateStart | Start date of the event | 01.01.2015 | |||
dateEnd | End date of the event | 01.01.2015 | |||
class | Class of the event: 0 = school holidays 1 = legally recognized public holiday (public rest day) 2 = holiday equivalent to Sundays 3 = half, legally recognized holiday (usually from noon) 4 = not legally recognized public holiday (shops, schools, administrations mostly closed), bank holiday; For the purposes of the European Convention on the Calculation of Time Limits, this day is treated as a public holiday (Article 5). 5 = event day # = only partially valid |
2 | |||
percent | Percentage of inhabitants / school classes | 100 | |||
prov | Flag for provisional data 0 = definitely 1 = provisional |
0 | |||
note | Special notes |
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 coordinates could not be assigned. The coordinates are outside the area covered, or invalid. Please check the parameters lat and lon |
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/Data/LatLon/?api_key=YOUR_API_KEY&jahr=2015&date_format=d.m.Y&lat=46.9576&lon=7.45134
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": "Data/CH/LatLon", "apiStatus": { "description": "active" }, "date": "04.08.2017", "request": { "lat": "46.9576", "lon": "7.45134", "iso": "", "dist": "100", "year": "2015", "class": "4", "charset": "utf-8", "format": "json", "hl": "de" }, "results": { "status": { "description": "ok" }, { "location": { "description": "Bern", "type": "Stadt", "geoId": "410", "iso": "CH", "iso-3166-2": "CH-BE", "events": [{ "description": "Neujahrstag", "id": "1", "dateStart": "01.01.2015", "dateEnd": "01.01.2015", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Berchtoldstag", "id": "3", "dateStart": "02.01.2015", "dateEnd": "02.01.2015", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Karfreitag", "id": "17", "dateStart": "03.04.2015", "dateEnd": "03.04.2015", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Ostern", "id": "18", "dateStart": "05.04.2015", "dateEnd": "05.04.2015", "class": "4", "percent": "100", "prov": "0", "note": null }, { "description": "Ostermontag", "id": "19", "dateStart": "06.04.2015", "dateEnd": "06.04.2015", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Auffahrt", "id": "31", "dateStart": "14.05.2015", "dateEnd": "14.05.2015", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Pfingsten", "id": "30", "dateStart": "24.05.2015", "dateEnd": "24.05.2015", "class": "4", "percent": "100", "prov": "0", "note": null }, { "description": "Pfingstmontag", "id": "35", "dateStart": "25.05.2015", "dateEnd": "25.05.2015", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Nationalfeiertag Schweiz", "id": "12", "dateStart": "01.08.2015", "dateEnd": "01.08.2015", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Weihnachten", "id": "23", "dateStart": "25.12.2015", "dateEnd": "25.12.2015", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Stephanstag", "id": "37", "dateStart": "26.12.2015", "dateEnd": "26.12.2015", "class": "2", "percent": "100", "prov": "0", "note": null }, { "name": "Winterferien", "id": "212582", "dateStart": "20.12.2014", "dateEnd": "4.01.2015", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Sportferien", "id": "220573", "dateStart": "31.01.2015", "dateEnd": "8.02.2015", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Fr\u00fchlingsferien", "id": "212583", "dateStart": "3.04.2015", "dateEnd": "19.04.2015", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Auffahrtsferien", "id": "220574", "dateStart": "14.05.2015", "dateEnd": "17.05.2015", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Sommerferien", "id": "212584", "dateStart": "4.07.2015", "dateEnd": "9.08.2015", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Herbstferien", "id": "212585", "dateStart": "19.09.2015", "dateEnd": "11.10.2015", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Winterferien", "id": "421836", "dateStart": "25.12.2015", "dateEnd": "10.01.2016", "class": "0", "percent": "100", "prov": "0", "note": null }] } } }
Call:
https://feiertagskalender.ch/api/Data/LatLon/?api_key=YOUR_API_KEY&jahr=2015&date_format=d.m.Y&format=xml&charset=ISO-8859-1&lat=46.9576&lon=7.45134
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>Data/CH/LatLon</apiName> <date>04.08.2017</date> <request> <lat>46.9576</lat> <lon>7.45134</lon> <iso></iso> <dist>100</dist> <year>2015</year> <class>4</class> <charset>utf-8</charset> <format>xml</format> <hl>de</hl> </request> <results> <status> <description>ok</description> </status> <location> <description>Bern</description> <type>Stadt</type> <geoId>410</geoId> <iso>CH</iso> <iso-3166-2>CH-BE</iso-3166-2> <events> <event> <description>Neujahrstag</description> <id>1</id> <dateStart>01.01.2015</dateStart> <dateEnd>01.01.2015</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Berchtoldstag</description> <id>3</id> <dateStart>02.01.2015</dateStart> <dateEnd>02.01.2015</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Karfreitag</description> <id>17</id> <dateStart>03.04.2015</dateStart> <dateEnd>03.04.2015</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Ostern</description> <id>18</id> <dateStart>05.04.2015</dateStart> <dateEnd>05.04.2015</dateEnd> <class>4</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Ostermontag</description> <id>19</id> <dateStart>06.04.2015</dateStart> <dateEnd>06.04.2015</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Auffahrt</description> <id>31</id> <dateStart>14.05.2015</dateStart> <dateEnd>14.05.2015</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Pfingsten</description> <id>30</id> <dateStart>24.05.2015</dateStart> <dateEnd>24.05.2015</dateEnd> <class>4</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Pfingstmontag</description> <id>35</id> <dateStart>25.05.2015</dateStart> <dateEnd>25.05.2015</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Nationalfeiertag Schweiz</description> <id>12</id> <dateStart>01.08.2015</dateStart> <dateEnd>01.08.2015</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Weihnachten</description> <id>23</id> <dateStart>25.12.2015</dateStart> <dateEnd>25.12.2015</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Stephanstag</description> <id>37</id> <dateStart>26.12.2015</dateStart> <dateEnd>26.12.2015</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <name>Winterferien</name> <id>212582</id> <dateStart>20.12.2014</dateStart> <dateEnd>4.01.2015</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <name>Sportferien</name> <id>220573</id> <dateStart>31.01.2015</dateStart> <dateEnd>8.02.2015</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <name>Frühlingsferien</name> <id>212583</id> <dateStart>3.04.2015</dateStart> <dateEnd>19.04.2015</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <name>Auffahrtsferien</name> <id>220574</id> <dateStart>14.05.2015</dateStart> <dateEnd>17.05.2015</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <name>Sommerferien</name> <id>212584</id> <dateStart>4.07.2015</dateStart> <dateEnd>9.08.2015</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <name>Herbstferien</name> <id>212585</id> <dateStart>19.09.2015</dateStart> <dateEnd>11.10.2015</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <name>Winterferien</name> <id>421836</id> <dateStart>25.12.2015</dateStart> <dateEnd>10.01.2016</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> </events> </location> </results> </fcal_api>
Call:
https://feiertagskalender.ch/api/Data/LatLon/?api_key=YOUR_API_KEY&charset=iso-8859-1&date_format=d.m.Y
&lat=46.9576&lon=7.45134&jahr=2015&format=csv
Reply in CSV / ISO-8859-1:
"location";"geoId";"description";"id";"dateStart";"dateEnd";"class";"percent";"prov";"note" "Bern";"410";"Neujahrstag";"1";"01.01.2015";"01.01.2015";"2";"100";"0";"" "Bern";"410";"Berchtoldstag";"3";"02.01.2015";"02.01.2015";"2";"100";"0";"" "Bern";"410";"Karfreitag";"17";"03.04.2015";"03.04.2015";"2";"100";"0";"" "Bern";"410";"Ostern";"18";"05.04.2015";"05.04.2015";"4";"100";"0";"" "Bern";"410";"Ostermontag";"19";"06.04.2015";"06.04.2015";"2";"100";"0";"" "Bern";"410";"Auffahrt";"31";"14.05.2015";"14.05.2015";"2";"100";"0";"" "Bern";"410";"Pfingsten";"30";"24.05.2015";"24.05.2015";"4";"100";"0";"" "Bern";"410";"Pfingstmontag";"35";"25.05.2015";"25.05.2015";"2";"100";"0";"" "Bern";"410";"Nationalfeiertag Schweiz";"12";"01.08.2015";"01.08.2015";"2";"100";"0";"" "Bern";"410";"Weihnachten";"23";"25.12.2015";"25.12.2015";"2";"100";"0";"" "Bern";"410";"Stephanstag";"37";"26.12.2015";"26.12.2015";"2";"100";"0";"" "Bern";"410";"Winterferien";"212582";"20.12.2014";"4.01.2015";"0";"100";"0";"" "Bern";"410";"Sportferien";"220573";"31.01.2015";"8.02.2015";"0";"100";"0";"" "Bern";"410";"Frühlingsferien";"212583";"3.04.2015";"19.04.2015";"0";"100";"0";"" "Bern";"410";"Auffahrtsferien";"220574";"14.05.2015";"17.05.2015";"0";"100";"0";"" "Bern";"410";"Sommerferien";"212584";"4.07.2015";"9.08.2015";"0";"100";"0";"" "Bern";"410";"Herbstferien";"212585";"19.09.2015";"11.10.2015";"0";"100";"0";"" "Bern";"410";"Winterferien";"421836";"25.12.2015";"10.01.2016";"0";"100";"0";""