Documentazione API

Dati annuali

Leggi i dati annuali aggregati

Set di dati con le percentuali di giorni festivi/festività scolastiche per ogni giorno dell'anno.

API: Data/Aggreg

Capitoli:

API: Data/Aggreg

Funzione

Consente di interrogare i dati annuali aggregati per codice paese ISO o codice regione ISO-3166-2.

URL per le richieste

Per recuperare i dati, utilizzare il seguente URL. Si prega di prestare attenzione alle maiuscole e alle minuscole.

Parametri per le richieste

Con le seguenti variabili è possibile completare la query e controllare i risultati delle API.

Parametro Spiegazione Esempi
api_key
richiesto

La vostra chiave API

?api_key=abc-123-def-456
iso
richiesto
Codice ISO del paese, 2 cifre, o
Codice regione secondo ISO 3166-2
&iso=DE-BW
year
o
jahr

Anno delle date richieste

senza specificazione: anno civile corrente (= standard)

&year= 2023
class
o
klasse

Portata dei dati

Varianti:
0 = solo vacanze scolastiche
3 = 0 + giorni festivi riconosciuti dalla legge
4 = 0 + 3 + festività pubbliche e non (religiose, culturali) (= Standard)
5 = 0 + 3 + 4 + giorni di evento (ad es. San Valentino, Festa della mamma, Avvento)

&klasse=5
charset

La codifica desiderata della risposta

Varianti:
UTF-8 (= Standard)
ISO-8859-1

&charset=iso-8859-1
format

Il formato di uscita desiderato

Varianti:
JSON (= Standard)
XML
CSV

&format=xml
date_format

Il formato di data desiderato
Il formato corrisponde alla formattazione della data dell'istruzione PHP date()

Varianti:
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

Lingua desiderata dell'uscita

Varianti:
de = Tedesco (= Standard)
fr = Francese
it = Italiano
en = Inglese

&hl=en
compact

Flag per l'uscita dati compatta

Varianti:
0 = L'output include tutti i giorni dell'anno, anche se non si verifica alcun evento.
1 = L'output include solo i giorni in cui si verificano le vacanze scolastiche e/o un giorno festivo. (= Standard)

&compact=0
filter Impostazione del filtro per le vacanze in percentuale

Varianti:
0 = l'output contiene tutti i giorni festivi registrati
5 = L'output contiene solo festività la cui quota è > 5% (= Standard)
Il filtraggio funziona con numeri interi da 0 a 100.
&filter=0

Valori di ritorno dell'API

Il contenuto delle risposte API deriva da:
- i dati che hai sottoscritto (paesi, vacanze, vacanze scolastiche, anni solari)
- i dati ufficialmente noti dei legislatori
- la disponibilità in base alle nostre ricerche (situazione effettiva del nostro database)

Si prega di notare che l'output in formato CSV è diverso.

Array         Spiegazione Esempio
interface         Versione dell'API  
source: href       URL della fonte dei dati (sito web)  
  description       Nome della fonte dei dati  
copyright href       URL al titolare del copyright (sito web)  
  description       Designazione del titolare del diritto d'autore  
apiName         Identificazione dell'API Data/Aggreg
apiStatus description       Designazione dello stato API. Per le varianti, vedere i Messaggi di errore active
date         Data di esportazione dei dati 06.07.2022
request: iso       Codice ISO del paese, 2 cifre DE
  year       Anno dei dati nell'output 2015
  charset       Codifica dei caratteri di output utf-8
  format       Formato dei dati di uscita json
  date_format       Formato data dell'output d.m.Y
  hl       Lingua di emissione, secondo la richiesta it
  compact       Flag für kompakte Ausgabe, gemäss Anfrage 1
  filter       Filterwert für Unterdrückung der Ausgabe von Feiertagen 0
results status description     Stato dell'output. Per le varianti, vedere i Messaggi di errore ok
  location description     Nome dell'unità geografica Deutschland
    type     Designazione del tipo di unità geografica Land
    geoId     Geo-ID dell'unità geografica. 3059
    iso     Codice ISO del paese, 2 cifre DE
    iso-3166-2     Codice regione secondo 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   Designazione Vacanze scolastiche 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

Messaggi di errore

Posizione di uscita Messaggio di errore Spiegazione
results: status:
results: status: description not subscribed Non avete sottoscritto i dati desiderati.
Si prega di contattare il nostro supporto.
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'uso di questa API non è sbloccato per voi.
Si prega di contattare il nostro supporto.
apiStatus: description invalid key Chiave API non valida.
Si prega di controllare la chiave API.
apiStatus: description invalid referer Accesso non valido. Non sono ammessi link da pagine web (front-end).
Impostate la vostra richiesta in modo che provenga da un back-end protetto.
Se necessario, contattare il nostro supporto.
apiStatus: description inactive L'API non è ancora stata abilitata all'uso.
Si prega di riprovare in un secondo momento.
apiStatus: description expired Il periodo di utilizzo secondo il contratto è scaduto.
Contattate la nostra amministrazione per un prolungamento del contratto.

Esempi

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":"2022-07-06",
   "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

Risposta delle 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>2022-07-06</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"
...
                
Pagine
Progetti partner
©2003 - 2022 psc Peter Schütz Informatik Dienstleistungen, CH-Bern