Documentation de l'API

Données annuelles

Lire des données annuelles agrégées

Ensembles de données avec les pourcentages des jours fériés/des vacances scolaires pour chaque jour de l'année.

API: Data/Aggreg

Chapitres :

API: Data/Aggreg

Fonction

Permet d'interroger les données annuelles agrégées par code pays ISO ou par code région ISO-3166-2.

URL pour les requêtes

Pour récupérer les données, utilisez l'URL suivante. Veuillez faire attention aux majuscules et aux minuscules.

Paramètres des requêtes

Les variables suivantes vous permettent de compléter la requête et de contrôler les résultats de l'API.

Paramètre Explication Exemples
api_key
requis

Votre clé API

?api_key=abc-123-def-456
iso
requis
Code pays ISO, 2 chiffres, oubièn
Code de région selon la norme ISO 3166-2
&iso=DE-BW
year
oubièn
jahr

Année des dates demandées

sans précision : année civile en cours (= standard)

&year= 2022
class
oubièn
klasse

Portée des données

Variantes :
0 = vacances scolaires uniquement
3 = 0 + jours fériés reconnus par la loi
4 = 0 + 3 + jours fériés (religieux, culturels) et non fériés (= standard)
5 = 0 + 3 + 4 + jours d'événements (par exemple, le Saint-Valentin, la fête des mères, les dimanches de l'Avent))

&klasse=5
charset

Le codage souhaité de la réponse

Variantes :
UTF-8 (= standard)
ISO-8859-1

&charset=iso-8859-1
format

Le format de sortie souhaité

Variantes :
JSON (= standard)
XML
CSV

&format=xml
date_format

Le format de date souhaité
Le format correspond au formatage de la date de l'instruction PHP date()

Variantes :
Y-m-d = YYYY-MM-DD (ISO-8601) (= standard)
d.m.Y = DD.MM.YYYY
Ymd = YYYYMMDD
dmY = DDMMYYYY
d.m.y = DD.MM.YY
j.n.y = D.M.YY

&date_format=d.m.Y
hl

Langue de sortie souhaitée

Variantes :
de = Allemand (= standard)
fr = Français
it = Italien
en = Anglais

&hl=en
compact

Indicateur pour la sortie de données compactes

Variantes :
0 = La production comprend tous les jours de l'année, même si aucun événement ne se produit.
1 = La production ne comprend que les jours où il y a des vacances scolaires et/ou un jour férié. (= standard)

&compact=0
filter Réglage du filtre pour les jours fériés en pourcentage

Variantes :
0 = la sortie contient tous les jours fériés enregistrés
5 = La sortie ne contient que les jours fériés dont la part est > 5% (= standard)
Le filtrage fonctionne avec des nombres entiers de 0 à 100.
&filter=0

Valeurs de retour de l'API

Le contenu des réponses de l'API résulte de :
- les données auxquelles vous avez souscrit (pays, vacances, congés scolaires, années civiles)
- les données officiellement connues des législateurs
- la disponibilité en fonction de nos recherches (situation réelle de notre base de données)

Veuillez noter que la version en format CSV diffère.

Array         Explication Exemple
interface         Version de l'API  
source: href       URL de la source de données (site web)  
  description       Nom de la source des données  
copyright href       URL du titulaire du droit d'auteur (site web)  
  description       Désignation du titulaire du droit d'auteur  
apiName         Identification de l'API Data/Aggreg
apiStatus description       Désignation du statut de l'API. Pour les variantes, voir les Messages d'erreur active
date         Date d'exportation des données 18.10.2021
request: iso       Code pays ISO, 2 chiffres DE
  year       Année des données dans la production 2015
  charset       Codage de la police de la sortie utf-8
  format       Format des données de la sortie json
  date_format       Format de la date de la sortie d.m.Y
  hl       Langue de délivrance, selon la demande fr
  compact       Flag für kompakte Ausgabe, gemäss Anfrage 1
  filter       Filterwert für Unterdrückung der Ausgabe von Feiertagen 0
results status description     Statut de la confirmation. Pour les variantes, voir les Messages d'erreur ok
  location description     Nom de l'unité géographique Deutschland
    type     Désignation du type d'unité géographique Land
    geoId     Géo-ID de l'unité géographique. 3059
    iso     Code pays ISO, 2 chiffres DE
    iso-3166-2     Code de région selon la norme ISO 3166-2  
    calendar     die Kalenderausgabe  
      date   Datum des Kalenders 2019-01-06
      total_population   Anzahl Einwohner im gewählten Gebiet 81835000
      public_holiday_population   Anzahl Einwohner, betroffen von einem Feiertag 25346076
      public_holiday_percent   Prozentualer Anteil der Einwohner, betroffen von einem Feiertag 30.97217083155129
      public_holiday_description   Bezeichnung Feiertag Heilige drei Könige
      school_holiday_population   Anzahl Einwohner, betroffen von Schulferien 81835000
      school_holiday_percent   Prozentualer Anteil der Einwohner, betroffen von Schulferien 100
      school_holiday_description   Désignation Vacances scolaires Weihnachtsferien
      sum_population   Summe aus public_holiday_population und school_holiday_population 81835000
      sum_percent   Summe aus public_holiday_percent und school_holiday_percent 100

Messages d'erreur

Emplacement de la sortie Message d'erreur Explication
results: status:
results: status: description not subscribed Vous n'avez pas souscrit aux données souhaitées.
Veuillez contacter notre service de soutien.
results: status: description unknown location Das angeforderte ISO-Länderkürzel ist nicht bekannt.
Prüfen Sie bitte den Parameter iso
apiStatus
apiStatus: description invalid usage L'utilisation de cette API n'est pas débloquée pour vous.
Veuillez contacter notre service de soutien.
apiStatus: description invalid key Clé API invalide.
Veuillez vérifier votre clé API.
apiStatus: description invalid referer Accès non valable. Les liens à partir de pages web (front-ends) ne sont pas autorisés.
Configurez votre requête de manière à ce qu'elle provienne d'un back-end protégé.
Si nécessaire, contactez notre support.
apiStatus: description inactive L'API n'a pas encore été activée pour que vous puissiez l'utiliser.
Veuillez réessayer plus tard.
apiStatus: description expired La période d'utilisation prévue par le contrat a expiré.
Contactez notre administration pour une prolongation de contrat.

Exemples

JSON

URL :
https://feiertagskalender.ch/api/Data/Aggreg/?api_key=YOUR_API_KEY&iso=DE&charset=ISO8859-1

Antwort in JSON / ISO8859-1:

{
   "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/Aggreg",
   "apiStatus":{
      "description":"active"
   },
   "date":"2021-10-18",
   "request":{
      "iso":"DE",
      "year":"2019",
      "charset":"iso8859-1",
      "format":"json",
      "date_format":"Y-m-d",
	   "hl":"de",
      "compact":"1",
      "filter":"5"
   },
   "results":{
      "status":{
         "description":"ok"
      },
      "location":{
         "description":"Deutschland",
         "type":"Land",
         "geoId":"3059",
         "iso":"DE",
         "iso-3166-2":"",
         "calendar":[
            {
               "datum":"2019-01-01",
               "total_population":81835000,
               "public_holiday_population":81835000,
               "public_holiday_percent":100,
               "public_holiday_description":"Neujahr",
               "school_holiday_population":81835000,
               "school_holiday_percent":100,
               "school_holiday_description":"Weihnachtsferien",
               "sum_population":81835000,
               "sum_percent":100
            },
            {
               "datum":"2019-01-02",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":81835000,
               "school_holiday_percent":100,
               "school_holiday_description":"Weihnachtsferien",
               "sum_population":81835000,
               "sum_percent":100
            },
            {
               "datum":"2019-01-03",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":81835000,
               "school_holiday_percent":100,
               "school_holiday_description":"Weihnachtsferien",
               "sum_population":81835000,
               "sum_percent":100
            },
            {
               "datum":"2019-01-04",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":81835000,
               "school_holiday_percent":100,
               "school_holiday_description":"Weihnachtsferien",
               "sum_population":81835000,
               "sum_percent":100
            },
            {
               "datum":"2019-01-05",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":81835000,
               "school_holiday_percent":100,
               "school_holiday_description":"Weihnachtsferien",
               "sum_population":81835000,
               "sum_percent":100
            },
            {
               "datum":"2019-01-06",
               "total_population":81835000,
               "public_holiday_population":25346076,
               "public_holiday_percent":30.972170831551292,
               "public_holiday_description":"Heilige drei Könige",
               "school_holiday_population":81835000,
               "school_holiday_percent":100,
               "school_holiday_description":"Weihnachtsferien",
               "sum_population":81835000,
               "sum_percent":100
            },
            {
               "datum":"2019-01-31",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":8528242,
               "school_holiday_percent":10.421264740025661,
               "school_holiday_description":"Semesterferien",
               "sum_population":8528242,
               "sum_percent":10.421264740025661
            },
            {
               "datum":"2019-02-01",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":10358673,
               "school_holiday_percent":12.657998411437649,
               "school_holiday_description":"Semesterferien",
               "sum_population":10358673,
               "sum_percent":12.657998411437649
            },
            {
               "datum":"2019-02-02",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":18064053,
               "school_holiday_percent":22.073749618134052,
               "school_holiday_description":"Winterferien",
               "sum_population":18064053,
               "sum_percent":22.073749618134052
            },
            {
               "datum":"2019-02-03",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":18064053,
               "school_holiday_percent":22.073749618134052,
               "school_holiday_description":"Winterferien",
               "sum_population":18064053,
               "sum_percent":22.073749618134052
            },
            {
               "datum":"2019-02-04",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":7705380,
               "school_holiday_percent":9.4157512066964024,
               "school_holiday_description":"Winterferien",
               "sum_population":7705380,
               "sum_percent":9.4157512066964024
            },
            {
               "datum":"2019-02-05",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":7705380,
               "school_holiday_percent":9.4157512066964024,
               "school_holiday_description":"Winterferien",
               "sum_population":7705380,
               "sum_percent":9.4157512066964024
            },
            {
               "datum":"2019-02-06",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":7705380,
               "school_holiday_percent":9.4157512066964024,
               "school_holiday_description":"Winterferien",
               "sum_population":7705380,
               "sum_percent":9.4157512066964024
            },
            {
               "datum":"2019-02-07",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":7705380,
               "school_holiday_percent":9.4157512066964024,
               "school_holiday_description":"Winterferien",
               "sum_population":7705380,
               "sum_percent":9.4157512066964024
            },
            {
               "datum":"2019-02-08",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":7705380,
               "school_holiday_percent":9.4157512066964024,
               "school_holiday_description":"Winterferien",
               "sum_population":7705380,
               "sum_percent":9.4157512066964024
            },
            {
               "datum":"2019-02-09",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":12099760,
               "school_holiday_percent":14.785556302315635,
               "school_holiday_description":"Winterferien",
               "sum_population":12099760,
               "sum_percent":14.785556302315635
            },
            {
               "datum":"2019-02-10",
               "total_population":81835000,
               "public_holiday_population":0,
               "public_holiday_percent":0,
               "public_holiday_description":"",
               "school_holiday_population":12099760,
               "school_holiday_percent":14.785556302315635,
               "school_holiday_description":"Winterferien",
               "sum_population":12099760,
               "sum_percent":14.785556302315635
            },
            ...
         ]
      }
   }
}
					

XML

URL :
https://feiertagskalender.ch/api/Data/Aggreg/?api_key=YOUR_API_KEY&iso=DE&charset=ISO8859-1&format=xml

Réponse de l'API :

<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/Aggreg</apiName>
	<date>2021-10-18</date>
	<request>
		<iso>DE</iso>
		<year>2019</year>
		<charset>iso8859-1</charset>
		<format>xml</format>
		<date_format>Y-m-d</date_format>
		<hl>de</hl>
		<compact>1</compact>
		<filter>5</filter>
	</request>
	<results>
		<status>
			<description>ok</description>
		</status>
		<location>
			<description>Deutschland</description>
			<type>Land</type>
			<geoId>3059</geoId>
			<iso>DE</iso>
			<iso-3166-2/>
			<events>
				<day>
					<datum>2019-01-01</datum>
					<total_population>81835000</total_population>
					<public_holiday_population>81835000</public_holiday_population>
					<public_holiday_percent>100</public_holiday_percent>
					<public_holiday_description>Neujahr</public_holiday_description>
					<school_holiday_population>81835000</school_holiday_population>
					<school_holiday_percent>100</school_holiday_percent>
					<school_holiday_description>Weihnachtsferien</school_holiday_description>
					<sum_population>81835000</sum_population>
					<sum_percent>100</sum_percent>
				</day>
				<day>
					<datum>2019-01-02</datum>
					<total_population>81835000</total_population>
					<public_holiday_population>0</public_holiday_population>
					<public_holiday_percent>0</public_holiday_percent>
					<public_holiday_description/>
					<school_holiday_population>81835000</school_holiday_population>
					<school_holiday_percent>100</school_holiday_percent>
					<school_holiday_description>Weihnachtsferien</school_holiday_description>
					<sum_population>81835000</sum_population>
					<sum_percent>100</sum_percent>
				</day>
				<day>
					<datum>2019-01-03</datum>
					<total_population>81835000</total_population>
					<public_holiday_population>0</public_holiday_population>
					<public_holiday_percent>0</public_holiday_percent>
					<public_holiday_description/>
					<school_holiday_population>81835000</school_holiday_population>
					<school_holiday_percent>100</school_holiday_percent>
					<school_holiday_description>Weihnachtsferien</school_holiday_description>
					<sum_population>81835000</sum_population>
					<sum_percent>100</sum_percent>
				</day>
				<day>
					<datum>2019-01-04</datum>
					<total_population>81835000</total_population>
					<public_holiday_population>0</public_holiday_population>
					<public_holiday_percent>0</public_holiday_percent>
					<public_holiday_description/>
					<school_holiday_population>81835000</school_holiday_population>
					<school_holiday_percent>100</school_holiday_percent>
					<school_holiday_description>Weihnachtsferien</school_holiday_description>
					<sum_population>81835000</sum_population>
					<sum_percent>100</sum_percent>
				</day>
				<day>
					<datum>2019-01-05</datum>
					<total_population>81835000</total_population>
					<public_holiday_population>0</public_holiday_population>
					<public_holiday_percent>0</public_holiday_percent>
					<public_holiday_description/>
					<school_holiday_population>81835000</school_holiday_population>
					<school_holiday_percent>100</school_holiday_percent>
					<school_holiday_description>Weihnachtsferien</school_holiday_description>
					<sum_population>81835000</sum_population>
					<sum_percent>100</sum_percent>
				</day>
				<day>
					<datum>2019-01-06</datum>
					<total_population>81835000</total_population>
					<public_holiday_population>25346076</public_holiday_population>
					<public_holiday_percent>30.972170831551</public_holiday_percent>
					<public_holiday_description>Heilige drei Könige</public_holiday_description>
					<school_holiday_population>81835000</school_holiday_population>
					<school_holiday_percent>100</school_holiday_percent>
					<school_holiday_description>Weihnachtsferien</school_holiday_description>
					<sum_population>81835000</sum_population>
					<sum_percent>100</sum_percent>
				</day>
				<day>
					<datum>2019-01-31</datum>
					<total_population>81835000</total_population>
					<public_holiday_population>0</public_holiday_population>
					<public_holiday_percent>0</public_holiday_percent>
					<public_holiday_description/>
					<school_holiday_population>8528242</school_holiday_population>
					<school_holiday_percent>10.421264740026</school_holiday_percent>
					<school_holiday_description>Semesterferien</school_holiday_description>
					<sum_population>8528242</sum_population>
					<sum_percent>10.421264740026</sum_percent>
				</day>
				<day>
					<datum>2019-02-01</datum>
					<total_population>81835000</total_population>
					<public_holiday_population>0</public_holiday_population>
					<public_holiday_percent>0</public_holiday_percent>
					<public_holiday_description/>
					<school_holiday_population>10358673</school_holiday_population>
					<school_holiday_percent>12.657998411438</school_holiday_percent>
					<school_holiday_description>Semesterferien</school_holiday_description>
					<sum_population>10358673</sum_population>
					<sum_percent>12.657998411438</sum_percent>
				</day>
				...
			</events>
		</location>
	</results>
</fcal_api>                  

CSV

URL :
https://feiertagskalender.ch/api/Data/Aggreg/?api_key=YOUR_API_KEY&iso=DE&format=csv

Antwort in CSV / UTF-8:

"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"
"Deutschland";"3059";"DE";"";"2019-01-01";"81835000";"81835000";"100";"Neujahr";"81835000";"100";"Weihnachtsferien";"81835000";"100"
"Deutschland";"3059";"DE";"";"2019-01-02";"81835000";"0";"0";"";"81835000";"100";"Weihnachtsferien";"81835000";"100"
"Deutschland";"3059";"DE";"";"2019-01-03";"81835000";"0";"0";"";"81835000";"100";"Weihnachtsferien";"81835000";"100"
"Deutschland";"3059";"DE";"";"2019-01-04";"81835000";"0";"0";"";"81835000";"100";"Weihnachtsferien";"81835000";"100"
"Deutschland";"3059";"DE";"";"2019-01-05";"81835000";"0";"0";"";"81835000";"100";"Weihnachtsferien";"81835000";"100"
"Deutschland";"3059";"DE";"";"2019-01-06";"81835000";"25346076";"30.972170831551";"Heilige drei Könige";"81835000";"100";"Weihnachtsferien";"81835000";"100"
"Deutschland";"3059";"DE";"";"2019-01-31";"81835000";"0";"0";"";"8528242";"10.421264740026";"Semesterferien";"8528242";"10.421264740026"
"Deutschland";"3059";"DE";"";"2019-02-01";"81835000";"0";"0";"";"10358673";"12.657998411438";"Semesterferien";"10358673";"12.657998411438"
"Deutschland";"3059";"DE";"";"2019-02-02";"81835000";"0";"0";"";"18064053";"22.073749618134";"Winterferien";"18064053";"22.073749618134"
"Deutschland";"3059";"DE";"";"2019-02-03";"81835000";"0";"0";"";"18064053";"22.073749618134";"Winterferien";"18064053";"22.073749618134"
"Deutschland";"3059";"DE";"";"2019-02-04";"81835000";"0";"0";"";"7705380";"9.4157512066964";"Winterferien";"7705380";"9.4157512066964"
"Deutschland";"3059";"DE";"";"2019-02-05";"81835000";"0";"0";"";"7705380";"9.4157512066964";"Winterferien";"7705380";"9.4157512066964"
"Deutschland";"3059";"DE";"";"2019-02-06";"81835000";"0";"0";"";"7705380";"9.4157512066964";"Winterferien";"7705380";"9.4157512066964"
"Deutschland";"3059";"DE";"";"2019-02-07";"81835000";"0";"0";"";"7705380";"9.4157512066964";"Winterferien";"7705380";"9.4157512066964"
"Deutschland";"3059";"DE";"";"2019-02-08";"81835000";"0";"0";"";"7705380";"9.4157512066964";"Winterferien";"7705380";"9.4157512066964"
"Deutschland";"3059";"DE";"";"2019-02-09";"81835000";"0";"0";"";"12099760";"14.785556302316";"Winterferien";"12099760";"14.785556302316"
"Deutschland";"3059";"DE";"";"2019-02-10";"81835000";"0";"0";"";"12099760";"14.785556302316";"Winterferien";"12099760";"14.785556302316"
"Deutschland";"3059";"DE";"";"2019-02-11";"81835000";"0";"0";"";"6003981";"7.3366909024256";"Winterferien";"6003981";"7.3366909024256"
"Deutschland";"3059";"DE";"";"2019-02-12";"81835000";"0";"0";"";"6003981";"7.3366909024256";"Winterferien";"6003981";"7.3366909024256"
"Deutschland";"3059";"DE";"";"2019-02-13";"81835000";"0";"0";"";"6003981";"7.3366909024256";"Winterferien";"6003981";"7.3366909024256"
"Deutschland";"3059";"DE";"";"2019-02-14";"81835000";"81835000";"100";"Valentinstag";"6003981";"7.3366909024256";"Winterferien";"81835000";"100"
...
                
Pages
Projets de partenaire
©2003 - 2021 psc Peter Schütz Informatik Dienstleistungen, CH-Bern