Get public holidays and school holidays for a whole year, based on `lat` and `lon` (geocoordinates).
Enables queries via geo-coordinates. Displays public holidays and school holidays of the corresponding municipality/region. To improve the results in outlying areas, an ISO country code can also be sent and/or the search distance can be changed.
Attention: The localisation is done by distance measurement. In peripheral areas, the assignment may therefore produce incorrect results.
Opens the interactive API documentation with Swagger, where you can test and explore API endpoints.
To retrieve the data, use the following URL. Please pay attention to upper case lower case.
https://feiertagskalender.ch/api/Data/LatLon/index.php
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 |
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 allocation. |
iso=CH |
dist | Maximum search distance in km without specification: 100km (= default) |
dist=200 |
year or jahr |
Year of the requested dates |
year= 2026 |
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 | Data/LatLon | ||||
apiStatus | description | Designation of the API status. For variants, see the Error messages | active | |||
date | Date of the data export | 19.10.2025 | ||||
request: | lat | Latitude. Geographical latitude | 46.9576 | |||
lon | Longitude. Geographical longitude | 7.45134 | ||||
iso | ISO country code, 2 digits | CH | ||||
dist | Maximum search distance in km | 100 | ||||
year | Year of the data in the output | 2015 | ||||
class | Class of the query (concerns the scope of the data) | 4 | ||||
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 | Bern | |||
type | Designation of the type of geographical unit | City | ||||
geoId | Geo-ID of the geographical unit. | 410 | ||||
iso | ISO country code, 2 digits | BE | ||||
iso-3166-2 | Region code according to ISO 3166-2 | |||||
note | Special notes | |||||
events | The calendar events | |||||
description | Designation of the public holiday, or school holidays | New Year´s Day | ||||
id | Unique ID of the event. Public holidays have the same ID every year. School holidays all have their own IDs. |
1 | ||||
dateStart | Date Start of the event | 01.01.2015 | ||||
dateEnd | Date end of the event | 01.01.2015 | ||||
class | Class of the event: 0 = School holidays 1 = official holiday 2 = Public holiday on a par with Sundays 3 = half-holiday (normally starting from noon) 4 = legally not recognized 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 (Art. 5). 5 = event day # = partially valid |
2 | ||||
percent | Size of affected residents / school classes in percent | 100 | ||||
prov | Flag for provisionally set data 0 = definitely 1 = provisional |
0 | ||||
note | special notes |
URL:
https://www.feiertagskalender.ch/api/Data/LatLon/index.php?api_key=YOUR_API_KEY&lat=46.9488&lon=7.4388&year=2022
Response from the API:
{ "interface": "fcal API 2.02", "source": { "href": "https://feiertagskalender.ch", "description": "feiertagskalender.ch" }, "copyright": { "href": "https://psc.ch", "description": "psc Peter Schuetz Informatik-Dienstleistungen, CH Arch" }, "apiName": "Data/LatLon", "apiStatus": { "description": "active" }, "date": "2025-02-27", "request": { "lat": "46.9488", "lon": "7.4388", "iso": "", "dist": "100", "year": 2022, "class": "4", "charset": "utf-8", "format": "json", "date_format": "Y-m-d", "hl": "de" }, "results": { "status": { "description": "ok" }, "location": { "description": "Bern", "type": "Stadt", "geoId": "410", "iso": "CH", "iso-3166-2": "CH-BE", "note": "", "events": [ { "description": "Neujahr", "id": "1", "dateStart": "2022-01-01", "dateEnd": "2022-01-01", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Berchtoldstag", "id": "3", "dateStart": "2022-01-02", "dateEnd": "2022-01-02", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Karfreitag", "id": "17", "dateStart": "2022-04-15", "dateEnd": "2022-04-15", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Ostern", "id": "18", "dateStart": "2022-04-17", "dateEnd": "2022-04-17", "class": "4", "percent": "100", "prov": "0", "note": null }, { "description": "Ostermontag", "id": "19", "dateStart": "2022-04-18", "dateEnd": "2022-04-18", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Auffahrt", "id": "31", "dateStart": "2022-05-26", "dateEnd": "2022-05-26", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Pfingsten", "id": "30", "dateStart": "2022-06-05", "dateEnd": "2022-06-05", "class": "4", "percent": "100", "prov": "0", "note": null }, { "description": "Pfingstmontag", "id": "35", "dateStart": "2022-06-06", "dateEnd": "2022-06-06", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Nationalfeiertag Schweiz", "id": "12", "dateStart": "2022-08-01", "dateEnd": "2022-08-01", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Weihnachten", "id": "23", "dateStart": "2022-12-25", "dateEnd": "2022-12-25", "class": "2", "percent": "100", "prov": "0", "note": null }, { "description": "Stephanstag", "id": "37", "dateStart": "2022-12-26", "dateEnd": "2022-12-26", "class": "2", "percent": "100", "prov": "0", "note": null }, { "name": "Weihnachtsferien", "description": "Weihnachtsferien", "id": "530660", "dateStart": "2021-12-25", "dateEnd": "2022-01-09", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Sportferien", "description": "Sportferien", "id": "531963", "dateStart": "2022-02-05", "dateEnd": "2022-02-13", "class": "0", "percent": "100", "prov": "0", "note": "DIN Woche 6" }, { "name": "Frühlingsferien", "description": "Frühlingsferien", "id": "530661", "dateStart": "2022-04-09", "dateEnd": "2022-04-24", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Auffahrtsferien", "description": "Auffahrtsferien", "id": "732799", "dateStart": "2022-05-26", "dateEnd": "2022-05-29", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Pfingstmontag", "description": "Pfingstmontag", "id": "732800", "dateStart": "2022-06-06", "dateEnd": "2022-06-06", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Sommerferien", "description": "Sommerferien", "id": "530662", "dateStart": "2022-07-09", "dateEnd": "2022-08-14", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Herbstferien", "description": "Herbstferien", "id": "530663", "dateStart": "2022-09-24", "dateEnd": "2022-10-16", "class": "0", "percent": "100", "prov": "0", "note": null }, { "name": "Weihnachtsferien", "description": "Weihnachtsferien", "id": "530664", "dateStart": "2022-12-24", "dateEnd": "2023-01-08", "class": "0", "percent": "100", "prov": "0", "note": null } ] } } }
URL:
https://www.feiertagskalender.ch/api/Data/LatLon/index.php?api_key=YOUR_API_KEY&lat=46.9488&lon=7.4388&year=2022&format=xml
Response from the API:
<fcal_api> <interface>fcal API 2.02</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/LatLon</apiName> <date>2025-02-27</date> <request> <lat>46.9488</lat> <lon>7.4388</lon> <iso></iso> <dist>100</dist> <year>2022</year> <class>4</class> <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>Bern</description> <type>Stadt</type> <geoId>410</geoId> <iso>CH</iso> <iso-3166-2>CH-BE</iso-3166-2> <note></note> <events> <event> <description>Neujahr</description> <id>1</id> <dateStart>2022-01-01</dateStart> <dateEnd>2022-01-01</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Berchtoldstag</description> <id>3</id> <dateStart>2022-01-02</dateStart> <dateEnd>2022-01-02</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Karfreitag</description> <id>17</id> <dateStart>2022-04-15</dateStart> <dateEnd>2022-04-15</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Ostern</description> <id>18</id> <dateStart>2022-04-17</dateStart> <dateEnd>2022-04-17</dateEnd> <class>4</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Ostermontag</description> <id>19</id> <dateStart>2022-04-18</dateStart> <dateEnd>2022-04-18</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Auffahrt</description> <id>31</id> <dateStart>2022-05-26</dateStart> <dateEnd>2022-05-26</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Pfingsten</description> <id>30</id> <dateStart>2022-06-05</dateStart> <dateEnd>2022-06-05</dateEnd> <class>4</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Pfingstmontag</description> <id>35</id> <dateStart>2022-06-06</dateStart> <dateEnd>2022-06-06</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Nationalfeiertag Schweiz</description> <id>12</id> <dateStart>2022-08-01</dateStart> <dateEnd>2022-08-01</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Weihnachten</description> <id>23</id> <dateStart>2022-12-25</dateStart> <dateEnd>2022-12-25</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Stephanstag</description> <id>37</id> <dateStart>2022-12-26</dateStart> <dateEnd>2022-12-26</dateEnd> <class>2</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Weihnachtsferien</description> <id>530660</id> <dateStart>2021-12-25</dateStart> <dateEnd>2022-01-09</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Sportferien</description> <id>531963</id> <dateStart>2022-02-05</dateStart> <dateEnd>2022-02-13</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note>DIN Woche 6</note> </event> <event> <description>Frühlingsferien</description> <id>530661</id> <dateStart>2022-04-09</dateStart> <dateEnd>2022-04-24</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Auffahrtsferien</description> <id>732799</id> <dateStart>2022-05-26</dateStart> <dateEnd>2022-05-29</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Pfingstmontag</description> <id>732800</id> <dateStart>2022-06-06</dateStart> <dateEnd>2022-06-06</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Sommerferien</description> <id>530662</id> <dateStart>2022-07-09</dateStart> <dateEnd>2022-08-14</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Herbstferien</description> <id>530663</id> <dateStart>2022-09-24</dateStart> <dateEnd>2022-10-16</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> <event> <description>Weihnachtsferien</description> <id>530664</id> <dateStart>2022-12-24</dateStart> <dateEnd>2023-01-08</dateEnd> <class>0</class> <percent>100</percent> <prov>0</prov> <note></note> </event> </events> </location> </results> </fcal_api>
URL:
https://www.feiertagskalender.ch/api/Data/LatLon/index.php?api_key=YOUR_API_KEY&lat=46.9488&lon=7.4388&year=2022&format=csv
Response from the API:
"location";"geoId";"description";"id";"dateStart";"dateEnd";"class";"percent";"prov";"note" "Bern";"410";"Neujahr";"1";"2022-01-01";"2022-01-01";"2";"100";"0";"" "Bern";"410";"Berchtoldstag";"3";"2022-01-02";"2022-01-02";"2";"100";"0";"" "Bern";"410";"Karfreitag";"17";"2022-04-15";"2022-04-15";"2";"100";"0";"" "Bern";"410";"Ostern";"18";"2022-04-17";"2022-04-17";"4";"100";"0";"" "Bern";"410";"Ostermontag";"19";"2022-04-18";"2022-04-18";"2";"100";"0";"" "Bern";"410";"Auffahrt";"31";"2022-05-26";"2022-05-26";"2";"100";"0";"" "Bern";"410";"Pfingsten";"30";"2022-06-05";"2022-06-05";"4";"100";"0";"" "Bern";"410";"Pfingstmontag";"35";"2022-06-06";"2022-06-06";"2";"100";"0";"" "Bern";"410";"Nationalfeiertag Schweiz";"12";"2022-08-01";"2022-08-01";"2";"100";"0";"" "Bern";"410";"Weihnachten";"23";"2022-12-25";"2022-12-25";"2";"100";"0";"" "Bern";"410";"Stephanstag";"37";"2022-12-26";"2022-12-26";"2";"100";"0";"" "Bern";"410";"Weihnachtsferien";"530660";"2021-12-25";"2022-01-09";"0";"100";"0";"" "Bern";"410";"Sportferien";"531963";"2022-02-05";"2022-02-13";"0";"100";"0";"DIN Woche 6" "Bern";"410";"Frühlingsferien";"530661";"2022-04-09";"2022-04-24";"0";"100";"0";"" "Bern";"410";"Auffahrtsferien";"732799";"2022-05-26";"2022-05-29";"0";"100";"0";"" "Bern";"410";"Pfingstmontag";"732800";"2022-06-06";"2022-06-06";"0";"100";"0";"" "Bern";"410";"Sommerferien";"530662";"2022-07-09";"2022-08-14";"0";"100";"0";"" "Bern";"410";"Herbstferien";"530663";"2022-09-24";"2022-10-16";"0";"100";"0";"" "Bern";"410";"Weihnachtsferien";"530664";"2022-12-24";"2023-01-08";"0";"100";"0";""
Output location | Error message | Explanation |
---|---|---|
results: status: | ||
results: status: description | not subscribed | You have not subscribed to the desired data. |
results: status: description | unknown location | The requested coordinates could not be assigned. The coordinates are outside the recorded area, or are invalid. Please check the parameters lat and lon. |
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. |