#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:
  • f female
  • m male
  • o other
age
The age of the person
precondition_count
Number of preconditions the persons suffers
status
can be one of the following:
  • healthy person does not show any symptoms
  • symptoms person has symptoms
  • covid-19 person is infected with covid-19
  • recovered person has recovered from covid-19
fever
A boolean value indicating whether the person has fever:
  • null no symptoms have been submitted (status=healthy or status=recovered)
  • 0 no fever
  • 1 fever above 38°C (100°F)
cough
Does the person suffer from cough:
  • null no symptoms have been submitted (status=healthy or status=recovered)
  • 0 no
  • 1 occasional cough
  • 2 severe cough
sore_throat
Does the person suffer from a sore throat:
  • null no symptoms have been submitted (status=healthy or status=recovered)
  • 0 no
  • 1 yes
body_aches
Does the person suffer from body aches:
  • null no symptoms have been submitted (status=healthy or status=recovered)
  • 0 no
  • 1 yes
lost_senses
Did the person lose their sense of smell:
  • null no symptoms have been submitted (status=healthy or status=recovered)
  • 0 no
  • 1 limited
  • 2 severe
breath_shortness
How much is the person experiencing a shortness of breath:
  • null no symptoms have been submitted (status=healthy or status=recovered)
  • 0 no shortness
  • 1 limited
  • 2 severe limitations
sniff
Does the person suffer from a cold:
  • null no symptoms have been submitted (status=healthy or status=recovered)
  • 0 no
  • 1 yes
nausea
Does the person suffer from nausea:
  • null no symptoms have been submitted (status=healthy or status=recovered)
  • 0 no
  • 1 yes
fatigue
Does the person experience fatigue:
  • null no symptoms have been submitted (status=healthy or status=recovered)
  • 0 no
  • 1 yes
location_of_covid_test
Specifies where a test has been performed:
  • null no data has been submitted (status=healthy or status=symptoms)
  • doctor Family doctor
  • hospital Hospital
  • covid-center Dedicated COVID-19 testing center
  • retirement-home Retirement home
  • other Other
date_of_covid_test
Date of the test (Y-m-d) or null if no data available
severity_of_covid
Severity of the illness:
  • null no data has been submitted (status=healthy or status=symptoms)
  • 0 mild symptoms (ambulant)
  • 1 hospital (hospitalized)
  • 2 intensive care
date_without_symptoms
Last day (Y-m-d) the person had symptoms or null if no data available

Status Totals

scope_type
Defines the scope of the provided data and depends on the queried endpoing.
  • zipcode The provided data is specific to the given zipcode.
  • canton The provided data is specific to the given canton.
  • switzerland The 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.
  • zipcode The provided data is specific to the given zipcode.
  • canton The provided data is specific to the given canton.
  • switzerland The 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 valuationDate that where considered.
got_symptoms
The number of participants who changed their overall status from healthy to symptoms
infected
The number of participants who changed their overall status from symptoms or healthy to covid-19
recovered
The number of participants who changed their overall status from covid-19 or symptoms to recovered