#ZeigDi Public API
The following endpoints allow you to fetch the raw data and run your own reports and analysis on the data.
API Endpoints
Reports (all)
GET https://api.zeigdi.ch/reports/all
This endpoint provides all submitted reports of verified users. Users are verified with a confirmation link sent by eMail after first submission.
Besides the verification, no restrictions on the data selection is applied.
The reports are ordered by submission date and paginated with a page size of 200.
Last reports status
This endpoints allow you to get the totals of all the participants last reported health status.
If there are less than 15 participants within the requested scope (zipcode, canton), no data is returned.
By zipcodes (all)
GET https://api.zeigdi.ch/status/by-zipcode
By single zipcode
GET https://api.zeigdi.ch/status/by-zipcode/<zipcode>
The zipcode must be provided as 4 digits (i.e. 8048, 5400, ...).
By canton
GET https://api.zeigdi.ch/status/by-canton/<canton>
Please provide a valid 2 char abbreviation of the canton (i.e. ZH, AG, ...)
For all of switzerland
GET https://api.zeigdi.ch/status/all
Changes of health status
This allows you to get the summarized transitions of the health status for all the participants.
If there are less than 15 participants within the requested scope (zipcode, canton), no data is returned.
By zipcode
GET https://api.zeigdi.ch/transition/by-zipcode/<zipcode>
The zipcode must be provided as 4 digits (i.e. 8048, 5400, ...).
By canton
GET https://api.zeigdi.ch/transition/by-canton/<canton>
Please provide a valid 2 char abbreviation of the canton (i.e. ZH, AG, ...)
For all of switzerland
GET https://api.zeigdi.ch/transition/all
Additional parameters
By default, the transitions are evaluated for the last 3 days.
The size of this range as well as the start date can be defined in additional query parameters:
days- A number (integer) of days to evaluate the transitions (default
3) date- The last day to evaluate the transitions (default
now).
Example
https://api.zeigdi.ch/transition/by-zipcode/8048?days=5&date=2020-04-20
This would define the range for status transitions to be evaluated from 2020-04-15 to 2020-04-20
Explanation of fields
Reports
A report consists of the following fields:
date_of_report- Submission date (Y-m-d H:i:s) of the report
reference- A unique reference to the user (anonymized value) to consolidate the submitted reports
gender-
The persons gender:
-
ffemale -
mmale -
oother
-
age- The age of the person
precondition_count- Number of preconditions the persons suffers
status-
can be one of the following:
-
healthyperson does not show any symptoms -
symptomsperson has symptoms -
covid-19person is infected with covid-19 -
recoveredperson has recovered from covid-19
-
fever-
A boolean value indicating whether the person has fever:
-
nullno symptoms have been submitted (status=healthy or status=recovered) -
0no fever -
1fever above 38°C (100°F)
-
cough-
Does the person suffer from cough:
-
nullno symptoms have been submitted (status=healthy or status=recovered) -
0no -
1occasional cough -
2severe cough
-
sore_throat-
Does the person suffer from a sore throat:
-
nullno symptoms have been submitted (status=healthy or status=recovered) -
0no -
1yes
-
body_aches-
Does the person suffer from body aches:
-
nullno symptoms have been submitted (status=healthy or status=recovered) -
0no -
1yes
-
lost_senses-
Did the person lose their sense of smell:
-
nullno symptoms have been submitted (status=healthy or status=recovered) -
0no -
1limited -
2severe
-
breath_shortness-
How much is the person experiencing a shortness of breath:
-
nullno symptoms have been submitted (status=healthy or status=recovered) -
0no shortness -
1limited -
2severe limitations
-
sniff-
Does the person suffer from a cold:
-
nullno symptoms have been submitted (status=healthy or status=recovered) -
0no -
1yes
-
nausea-
Does the person suffer from nausea:
-
nullno symptoms have been submitted (status=healthy or status=recovered) -
0no -
1yes
-
fatigue-
Does the person experience fatigue:
-
nullno symptoms have been submitted (status=healthy or status=recovered) -
0no -
1yes
-
location_of_covid_test-
Specifies where a test has been performed:
-
nullno data has been submitted (status=healthy or status=symptoms) -
doctorFamily doctor -
hospitalHospital -
covid-centerDedicated COVID-19 testing center -
retirement-homeRetirement home -
otherOther
-
date_of_covid_test-
Date of the test (Y-m-d) or
nullif no data available severity_of_covid-
Severity of the illness:
-
nullno data has been submitted (status=healthy or status=symptoms) -
0mild symptoms (ambulant) -
1hospital (hospitalized) -
2intensive care
-
date_without_symptoms-
Last day (Y-m-d) the person had symptoms or
nullif no data available
Status Totals
scope_type-
Defines the scope of the provided data and depends on the queried endpoing.
-
zipcodeThe provided data is specific to the given zipcode. -
cantonThe provided data is specific to the given canton. -
switzerlandThe provided data is for all of Switzerland.
-
scope- The actuals scope applied (zipcode, canton or CH in case of all of switzerland)
total_participants- The number of participants in the scope. If this value is less than 15, 0 is displayed
total_healthy- The total number of participants whose last report stated they are healthy.
total_symptoms- The total number of participants whose last report stated they have symptoms.
total_infected- The total number of participants whose last report stated they are diagnosed with COVID-19.
total_recovered- The total number of participants whose last report stated they have recovered from COVID-19.
Transitions (Health status changes)
scope_type-
Defines the scope of the provided data and depends on the queried endpoing.
-
zipcodeThe provided data is specific to the given zipcode. -
cantonThe provided data is specific to the given canton. -
switzerlandThe provided data is for all of Switzerland.
-
scope- The actuals scope applied (zipcode, canton or CH in case of all of switzerland)
total_participants- The number of participants in the scope. If this value is less than 15, 0 is displayed
valuationDate- The date of the last report evaluated for the transition calculation.
valuationPeriod- The number of days until
valuationDatethat where considered. got_symptoms- The number of participants who changed their overall status from
healthytosymptoms infected- The number of participants who changed their overall status from
symptomsorhealthytocovid-19 recovered- The number of participants who changed their overall status from
covid-19orsymptomstorecovered