Covid-19 API
The Covid-19 API provides current and historical Covid-19 data for every country in the world. Available data includes confirmed case counts and deaths, and is updated everyday.
From 3,620 users
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 399ms | 422ms | 439ms | 896ms | 1091ms |
Didn't find what you were looking for? Suggest an improvement
/v1/covid19 GET
https://api.api-ninjas.com/v1/covid19
Returns either a time series of Covid-19 case counts/deaths for a country/region or a single-day snapshot of every country in the world (see parameters).
Parameters
Either date or country must be set.
dateoptionalDate to retrieve single-day snapshot. Must be in the form of
YYYY-MM-DD(e.g.2022-01-01).countryoptionalCountry name (case insensitive).
regionoptionalAdministrative region (also known as state or province in many countries) name (case insensitive). Must be used in conjunction with
country. If not set, countries with data broken down by administrative regions will return separate data for each region.countyoptionalCounty name for US states (case insensitive). For United States data only. Must be used in conjunction with
country(United States) andregion(e.g.California).typeoptionalType of data to retrieve. Must be either
casesordeaths. If not set,caseswill be used by default.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Sample Request Live Demo!
Try this API endpoint with all available parameters in our API playground
https://api.api-ninjas.com/v1/covid19?country=canadaHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
[
{
"country": "Canada",
"region": "Alberta",
"cases": {
"2020-01-22": {
"total": 0,
"new": 0
},
"2020-01-23": {
"total": 0,
"new": 0
},
"2020-01-24": {
"total": 0,
"new": 0
},
"2020-01-25": {
"total": 0,
"new": 0
},
"2020-01-26": {
"total": 0,
"new": 0
},
...
}
},
{
"country": "Canada",
"region": "British Columbia",
"cases": {
"2020-01-22": {
"total": 0,
"new": 0
},
"2020-01-23": {
"total": 0,
"new": 0
},
"2020-01-24": {
"total": 0,
"new": 0
},
"2020-01-25": {
"total": 0,
"new": 0
},
"2020-01-26": {
"total": 0,
"new": 0
},
...
}
},
...
]Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/covid19?country=United%20States" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.