Annual data of all municipalities in Sweden (incl. municipality codes).
Chapters:
Enables queries for Sweden. Outputs all municipalities (incl. municipality codes) with their holidays and school holidays, from 1.01. - 31.12. of a year.
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 |
year or jahr |
Year of the requested dates |
&year= 2025 |
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 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/Country/SE | ||||
apiStatus | description | Designation of the API status. For variants, see the Error messages | active | |||
date | Date of the data export | 30.04.2024 | ||||
request: | iso | ISO country code, 2 digits | SE | |||
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 | ||
locations | location | description | Designation of the geographical unit | Karlshamn | ||
type | Designation of the type of geographical unit | Commune | ||||
geoId | Geo-ID of the geographical unit. | 4849 | ||||
scb | SCB-Code (Statistics Sweden) | 1082 | ||||
iso | ISO country code, 2 digits | SE | ||||
iso-3166-2 | Region code according to ISO 3166-2 | SE-K | ||||
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 |
Output location | Error message | Explanation |
---|---|---|
results: status: | ||
results: status: description | not subscribed | You have not subscribed to the desired data. Please contact our support. |
apiStatus | ||
apiStatus: description | invalid usage | The use of this API is not activated 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 web pages (front-ends) are not allowed. Set up your query so that it comes from a protected back-end. If necessary, contact our support. |
apiStatus: description | inactive | The API has not yet been activated for you to use. Please try again at a later date. |
apiStatus: description | expired | The period of use according to the contract has expired. Contact our administration for a contract extension. |
URL:
https://feiertagskalender.ch/api/Data/Country/CH/?api_key=YOUR_API_KEY&jahr=2023
Response from the API:
{ "interface": "fcal API 2.01", "source": { "href": "https://feiertagskalender.ch", "description": "feiertagskalender.ch" }, "copyright": { "href": "https://psc.ch", "description": "psc Peter Schuetz Informatik-Dienstleistungen, CH Bern" }, "apiName": "Data/Country/SE", "apiStatus": { "description": "active" }, "date": "2023-06-16", "request": { "iso": "SE", "year": "2023", "class": "4", "charset": "utf-8", "format": "json", "date_format": "Y-m-d", "hl": "de" }, "results": { "status": { "description": "ok" }, "locations": [ { "description": "Ale", "type": "Gemeinde", "geoId": "4744", "scb": "1440", "iso": "SE", "iso-3166-2": "SE-O", "note": "", "events": [ { "description": "Neujahr", "id": "1", "dateStart": "2023-01-01", "dateEnd": "2023-01-01", "class": "1", "percent": "100", "prov": "0", "note": null }, { "description": "Heilige drei Könige", "id": "4", "dateStart": "2023-01-06", "dateEnd": "2023-01-06", "class": "1", "percent": "100", "prov": "0", "note": null }, { "description": "Karfreitag", "id": "17", "dateStart": "2023-04-07", "dateEnd": "2023-04-07", "class": "1", "percent": "100", "prov": "0", "note": null }, { "description": "Ostern", "id": "18", "dateStart": "2023-04-09", "dateEnd": "2023-04-09", "class": "4", "percent": "100", "prov": "0", "note": null }, { "description": "Ostermontag", "id": "19", "dateStart": "2023-04-10", "dateEnd": "2023-04-10", "class": "1", "percent": "100", "prov": "0", "note": null }, { ... } ] }, { "description": "Alingsås", "type": "Gemeinde", "geoId": "4745", "scb": "1489", "iso": "SE", "iso-3166-2": "SE-O", "note": "", "events": [ { ... }] }] } }
URL:
https://feiertagskalender.ch/api/Data/Country/CH/?api_key=YOUR_API_KEY&jahr=2023&charset=ISO-8859-1&date_format=Y-m-d&format=xml
Response from the API:
<fcal_api> <interface>fcal API 2.01</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/Country/SE</apiName> <date>2023-06-16</date> <request> <iso>SE</iso> <year>2023</year> <class>4</class> <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> <locations> <location> <description>Ale</description> <type>Gemeinde</type> <geoId>4744</geoId> <scb>1440</scb> <iso>SE</iso> <iso-3166-2>SE-O</iso-3166-2> <note/> <events> <event> <description>Neujahr</description> <id>1</id> <dateStart>2023-01-01</dateStart> <dateEnd>2023-01-01</dateEnd> <class>1</class> <percent>100</percent> <prov>0</prov> <note/> </event> <event> <description>Heilige drei Könige</description> <id>4</id> <dateStart>2023-01-06</dateStart> <dateEnd>2023-01-06</dateEnd> <class>1</class> <percent>100</percent> <prov>0</prov> <note/> </event> <event> <description>Karfreitag</description> <id>17</id> <dateStart>2023-04-07</dateStart> <dateEnd>2023-04-07</dateEnd> <class>1</class> <percent>100</percent> <prov>0</prov> <note/> </event> <event> <description>Ostern</description> <id>18</id> <dateStart>2023-04-09</dateStart> <dateEnd>2023-04-09</dateEnd> <class>4</class> <percent>100</percent> <prov>0</prov> <note/> </event> <event> </event> </events> </location> <location> <description>Alingsås</description> <type>Gemeinde</type> <geoId>4745</geoId> <scb>1489</scb> <iso>SE</iso> <iso-3166-2>SE-O</iso-3166-2> <note/> <events> ... </events> </location> </locations> </results> </fcal_api>
Aufruf:
https://feiertagskalender.ch/api/Data/Country/CE/?api_key=YOUR_API_KEY&charset=iso-8859-1&format=csv&jahr=2023
Response from the API:
"location";"geoId";"scb";"iso";"iso_3166_2";"description";"id";"dateStart";"dateEnd";"class";"percent";"prov";"note" "Ale";"4744";"1440";"SE";"SE-O";"Neujahr";"1";"2023-01-01";"2023-01-01";"1";"100";"0";"" "Ale";"4744";"1440";"SE";"SE-O";"Heilige drei Könige";"4";"2023-01-06";"2023-01-06";"1";"100";"0";"" "Ale";"4744";"1440";"SE";"SE-O";"Karfreitag";"17";"2023-04-07";"2023-04-07";"1";"100";"0";"" "Ale";"4744";"1440";"SE";"SE-O";"Ostern";"18";"2023-04-09";"2023-04-09";"4";"100";"0";"" ... "Alingsås";"4745";"1489";"SE";"SE-O";"Neujahr";"1";"2023-01-01";"2023-01-01";"1";"100";"0";"" "Alingsås";"4745";"1489";"SE";"SE-O";"Heilige drei Könige";"4";"2023-01-06";"2023-01-06";"1";"100";"0";"" ...