CORONAVIRUS API

Get Started With Our API

Introduction

We have built the Coronavirus API to help developers and web publishers to use the complex data related to coronavirus cases around the world in the simplest way possible, while enabling them to deploy web applications within minutes after signing up with our service.

That's why we have created ready-made code in PHP and JavaScript that is integrating our API endpoints right out-of-the-box. Simply copy/paste the code made available in our documentation, change the API key to the one we provide to you with after you sign up, and you are ready to go, with minimal coding requirements.

Our data sources

We take our data from hundreds of the most trusted and most up-to-date sources from around the globe, with a team working 24/7 to filter, moderate and curate the coronavirus cases and deaths data.

Our hundreds of robots and web crawlers are put to work harder than ever to accurately compile the freshest data available, mostly from official government publications.

We posses powerful data collection technologies that we have developed within the past few years, and now we are using these capabilities to organise the coronavirus data coming from hundreds of data points, into one single API, and make it available to you.

Here are a few examples of data sources:

API end-points

You can currently perform the following queries with our coronavirus API:


COUNTRIES


All countries data

API endpoint
https://api.coronavirusapi.dev/countries/?key=API_KEY
See results (demo)

Get the latest cases, deaths, active cases, critical cases, and recovered patients numbers, for all countries, in one single query.

Response from our server:

[
   {
      "ID":"16272",
      "country_name":"Total:",
      "cases":"559165",
      "new_cases":"27355",
      "deaths":"25278",
      "new_deaths":"1210",
      "active_cases":"405106",
      "total_recovered":"128781",
      "critical_cases":"21088",
      "datetime_added":"2020-03-27 15:36:20",
      "simple_date":"2020-03-27"
   },
   {
      "ID":"16072",
      "country_name":"USA",
      "cases":"86548",
      "new_cases":"1113",
      "deaths":"1321",
      "new_deaths":"26",
      "active_cases":"83338",
      "total_recovered":"1889",
      "critical_cases":"2139",
      "datetime_added":"2020-03-27 15:36:15",
      "simple_date":"2020-03-27"
   },
   ... 190+ more
]

            

This is ideal for creating an HTML table similar to the one seen here:
ovulation-calculators.com/coronavirus/


Latest numbers per country

API endpoint
https://api.coronavirusapi.dev/countries/gb/?key=API_KEY
See results (demo)

Get the latest cases, deaths, active cases, critical cases, and recovered patients numbers, for a specific country (United Kingdom, in the example above).

Simply pass in the country short name as a parameter, and our API will return a JSON object with the latest data about that country.

Full list of countries and the countries short name also available here.

Response from our server:

{
   "ID":"16080",
   "country_name":"UK",
   "cases":"14579",
   "new_cases":"2921",
   "deaths":"759",
   "new_deaths":"181",
   "active_cases":"13685",
   "total_recovered":"135",
   "critical_cases":"163",
   "datetime_added":"2020-03-27 15:36:15",
   "simple_date":"2020-03-27"
}

            

Cases per country for the past n days

API endpoint
https://api.coronavirusapi.dev/countries/gb/30/?key=API_KEY
See results (demo)

Get the latest cases, deaths, active cases, critical cases, and recovered patients numbers, for a specific country (United Kingdom, in the example above), for a specified number of days (30 days, in our example url above).

Simply pass in a number after the country short name, any you'll receive the data in a JSON object for the specified number of days.

This is ideal for creating charts and timelines of coronavirus cases and deaths, for example.


Countries available

API endpoint
https://api.coronavirusapi.dev/available/countries?key=API_KEY
See results (demo)

Check what countries are present in our data sources. This will give you a ful list of country names, along with their short name and population, that we hold coronavirus data about.


CITIES / LOCATIONS


Apart from country-wide case numbers, we also provide city/regional and locations based data for certain countries.

Here is a list of countries that we have comprehensive data on a city or regional level:

  • Italy
  • United Kingdom
  • Spain
  • Netherlands
  • United States (state level)
  • More to come...

Latest numbers per location

API endpoint
https://api.coronavirusapi.dev/cities/gb/oxfordshire?key=API_KEY
See results (demo)

API endpoint
https://api.coronavirusapi.dev/cities/de/hamburg?key=API_KEY
See results (demo)

API endpoint
https://api.coronavirusapi.dev/cities/us/california?key=API_KEY
See results (demo)

This API endpoint will get you the latest data that we hold about a specific location, such as case numbers and deaths (where death data available).

Please note: We don't cover all locations in any specific country, as official data might not always be available on a location/city level. It is advised to use the below API endpoint to check which locations are available for any given country.


Locations/cities available

API endpoint
https://api.coronavirusapi.dev/available/cities/gb?key=API_KEY
See results (demo)

This endpoint will get you data for all cities/locations that we have in our database for a specific country, in one single query (United Kingdom, in our example URL above).


API key

You need a valid API key to use the API service in your applications, and to be able to retrieve data from our server. The API key will be provided within minutes after you have signed up for a plan.

Simply pass in your API key as a url parameter (?key=API_KEY - where the API_KEY is the API key that we provide when you sign up), and you are ready to use our data in your applications.


Request limits

On request, we can provide almost unlimited usage of our API.

The number of requests that you can make within 24 hours is based on which plan you have signed up for.

PRO PLAN: You can make up to 500,000 requests in 24 hours.

PRO++ PLAN: You can make up to 1,000,000 requests in 24 hours.

ENTERPRISE PLAN: You can make up to 20,000,000 requests in 24 hours.

Need more? Get in touch at info@coronavirusapi.dev and we can provide almost unlimited quota for our API service.


By choosing a plan below, you confirm that you have read, understood and accepted our terms and conditions.