NAV Navbar
cURL JS

Introduction

An HTTP API serving structured information on COVID-19's march around the globe.

Version: 0.2.0

/daily

GET

Description: Get high-level daily data on Corona infections around the world or for a specific country.

# With shell, you can just pass the correct header with each request
curl "https://data.corona-api.org/v1/daily"

fetch('https://data.corona-api.org/v1/daily')
  .then(response => response.json())
  .then(data => console.log(data))

Sample Response:

{
  "rating": 0.21568627450980393,
  "stateId": "iso2:SI-101",
  "tz": [
    "Europe/Ljubljana"
  ],
  "population": 6183,
  "featureId": "iso2:SI-101",
  "sources": [
    {
      "name": "COVID-19 Sledilnik",
      "url": "https://covid-19.sledilnik.org/"
    }
  ],
  "url": "https://raw.githubusercontent.com/slo-covid-19/data/master/csv/stats.csv",
  "country": "Slovenia",
  "name": "Radlje ob Dravi, Slovenia",
  "state": "Radlje ob Dravi",
  "date": "2020-05-06",
  "updated": "2020-05-06 1:32",
  "level": "state",
  "maintainers": [
    {
      "name": "Quentin Golsteyn",
      "github": "qgolsteyn",
      "flag": "🇨🇦"
    }
  ],
  "cases": 1,
  "countryId": "iso1:SI",
  "ID": "9c2b87a9-759b-4e72-bb2d-5f061a05a659",
  "populationDensity": 66.21106755383377,
  "coordinates": [
    15.2475,
    46.591499999999996
  ]
}...

HTTP Request

***GET*** /daily

Parameters

Name Located in Description Required Type
country query Please enter the 3-digit ISO Country Code. For valid codes to use see ISO 3166-1 alpha-3 (e.g. DEU for Germany). No string
state query Please enter a state name No string
county query Please enter a county name No string
city query Please enter a valid city name. No string
rating query Please enter a minimum rating of the data quality based upon (@lazd/coronadatascraper data rating). The rating takes into account completeness, machine readability and best practices. No number
source query Enter a source URL. For available sources, please check /api/datasources endpoint. No string
countryLevelOnly query Enter 'true' or 'false' if you would like only country level data (no counties / cities / states). No boolean

Responses

Code Description
200 The available Corona Virus data per country as a JSON array. The array as well as the data for each country is filtered according to the request parameters.

/daily/confirmed

GET

Description: Get only confirmed daily case numbers

HTTP Request

***GET*** /daily/confirmed

Parameters

Name Located in Description Required Type
country query Please enter the 3-digit ISO Country Code. For valid codes to use see ISO 3166-1 alpha-3 (e.g. DEU for Germany). No string
state query Please enter a state name No string
county query Please enter a county name No string
city query Please enter a valid city name. No string
rating query Please enter a minimum rating of the data quality based upon (@lazd/coronadatascraper data rating). The rating takes into account completeness, machine readability and best practices. No number
source query Enter a source URL. For available sources, please check /api/datasources endpoint. No string

Responses

Code Description
200 The available Corona Virus confirmed cases data, including datasource URL

/daily/recovered

GET

Description: Get only daily recovered numbers

HTTP Request

***GET*** /daily/recovered

Parameters

Name Located in Description Required Type
country query Please enter the 3-digit ISO Country Code. For valid codes to use see ISO 3166-1 alpha-3 (e.g. DEU for Germany). No string
state query Please enter a state name No string
county query Please enter a county name No string
city query Please enter a valid city name. No string
rating query Please enter a minimum rating of the data quality based upon (@lazd/coronadatascraper data rating). The rating takes into account completeness, machine readability and best practices. No number
source query Enter a source URL. For available sources, please check /api/datasources endpoint. No string

Responses

Code Description
200 The available Corona Virus confirmed cases data, including datasource URL

/daily/deaths

GET

Description: Get only daily 'deaths' numbers

HTTP Request

***GET*** /daily/deaths

Parameters

Name Located in Description Required Type
country query Please enter the 3-digit ISO Country Code. For valid codes to use see ISO 3166-1 alpha-3 (e.g. DEU for Germany). No string
state query Please enter a state name No string
county query Please enter a county name No string
city query Please enter a valid city name. No string
rating query Please enter a minimum rating of the data quality based upon (@lazd/coronadatascraper data rating). The rating takes into account completeness, machine readability and best practices. No number
source query Enter a source URL. For available sources, please check /api/datasources endpoint. No string

Responses

Code Description
200 The available Corona Virus confirmed cases data, including datasource URL

/timespan

GET

Description: Get data over time for a specific country.

HTTP Request

***GET*** /timespan

Parameters

Name Located in Description Required Type
country query Please enter the 3-digit ISO Country Code. For valid codes to use see ISO 3166-1 alpha-3 (e.g. DEU for Germany). No string
time query Please choose a timespan, how far back you want data. Must be one of "week", "month", "year". Yes string

Responses

Code Description
200 The available COVID-19 data per country as a JSON array. The array of days for the time span requested for the country requested.

/countries

GET

Description: Get Corona data for each country from different data sources.

HTTP Request

***GET*** /countries

Parameters

Name Located in Description Required Type
country query Please enter the 3-digit ISO Country Code. For valid codes to use see ISO 3166-1 alpha-3 (e.g. DEU for Germany). No string

Responses

Code Description
200 The Corona data for each country from different data sources.

/datasources

GET

Description: Get a list of datasources available via this API.

HTTP Request

***GET*** /datasources

Responses

Code Description
200 The list of available sources of the API.

/datasources/details

GET

Description: Get a list of datasources and their maintainers and contact info.

HTTP Request

***GET*** /datasources/details

Responses

Code Description
200 The list of available sources of the API.

/total

GET

Description: Total world figures

HTTP Request

***GET*** /total

Responses

Code Description
200 Object of total numbers (cases, active, recovered, deaths)

/meta

GET

Description: Get metadata on the REST API under use. That includes information like where to find the code, where to create new tickets or when the underlying data has been updated the last time.

HTTP Request

***GET*** /meta

Responses

Code Description
200 The metadata on the REST API under use.

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.