Get the updated statistics of Coronavirus or COVID-19 by using GraphQL API.
- Worldwide Coronavirus Reports
- Updated Daily
- Get Statistics about total and new cases, deaths, recovered, active and critical coronavirus counts.
- Know whether the cases, deaths, recovered etc. are increasing are decresing based on previous reports.
- Get historical data of any country about Coronavirus.
- Use the power of GraphQL and make your own dashboard to analyze the reports.
Note: The GraphQL API is developed using NovelCOVID API
You can use the hosted GraphQL API from here: https://corona-graphql.herokuapp.com/.
Following are the examples your queries you can use while making request to GraphQL API:
query {
all {
cases
deaths
recovered
active
affectedCountries
updated
todayCases
todayDeaths
casesPerOneMillion
}
}
# Get reports of all countries without sorting
query {
countries {
country
countryInfo {
lat
long
flag
iso3
}
cases
todayCases
deaths
todayDeaths
recovered
active
critical
casesPerOneMillion
deathsPerOneMillion
analysis {
cases
recovered
}
updated
}
}
Sorting: You can use cases, todayCases, deaths, todayDeaths, recovered, active, critical, casesPerOneMillion and deathsPerOneMillion as sorting string.
query {
countries(sort: "deaths") {
country
countryInfo {
lat
long
flag
iso3
}
cases
todayCases
deaths
todayDeaths
recovered
active
critical
casesPerOneMillion
deathsPerOneMillion
analysis {
cases
recovered
}
updated
}
}
Get Historical Data of All Countries
query {
historical {
country
province
timeline {
cases
deaths
}
}
}
query {
worldwideHistoricalData {
cases {
date
count
}
deaths {
date
count
}
recovered {
date
count
}
}
}
# Change the name with your desired country.
query {
country(name: "Italy") {
deaths
cases
todayCases
analysis {
cases,
todayCases,
recovered
}
}
}
Get Historical Data of a Country
query {
historicalByCountry(name: "pakistan") {
country
province
timeline {
cases
deaths
}
}
}
query {
states {
state
cases
todayCases
deaths
todayDeaths
active
}
}
query {
jhucsse {
country
province
updatedAt
stats {
confirmed
deaths
recovered
}
coordinates {
longitude
latitude
}
}
}
GraphQL Playground is enabled so you can access that from here. The docs from playground will help you know more about the queries arguments and their return types.
- NovelCOVID API based on the data of Worldometer.