API for COVID-19 Data

This free API exposes all available regional data housed on Wikipedia. This set of APIs drills down to states, provinces, and other regions depending on the geography.


Terms of use


This API uses data from the Wikipedia article, Template:COVID-19 pandemic data (and other related articles) which is released under the Creative Commons Attribution-Share-Alike License 3.0. The author of this API (cyberpurge.com) hereby disclaims any and all representations and warranties with respect to this API, including accuracy, fitness for use, and merchant-ability. Reliance on this website or API for medical guidance or use of this website or API in commerce is strictly prohibited.


APIs


Below is the list of APIs I have written & exposed that you an access with a free assigned key. Each API has a simple use-case of returning the right level of data.


Start off by generating a key by providing a valid email address in the space below. Your key is valid for the entire set of data, however your identifier is required to associate API calls to debug issues, monitor the usage, and expand their usability.


This data is completely sourced from Wikipedia and is subject to Wikipedia terms of usage. That also means the accuracy of the data is dependent on user edits on Wikipedia, and therefore require adjustments from time to time.



All Operations:


# Get the list of countries with Name & ISO Alpha-2
GET /api/covid/countries

# Get country name for its equivalent ISO Alpha-2 code
GET /api/covid/countryNameByCode/:code

# Get global case counts categorized under Total, Recovered, 
# and Deceased
GET /api/covid/dailyTotals/global

# Get case counts categorized under Total, Recovered, 
# and Deceased for a country by its ISO Alpha-2 Code
GET /api/covid/dailyTotals/:code

# Get global case counts only
GET /api/covid/globalCases

# Get global case counts categorized under Total, Recovered, and Deceased
GET /api/covid/globalData

# Get Total case counts for the last 7 days for a country by its ISO Alpha-2 Code
GET /api/covid/weeklyRegionalTotalCases/:code

# Get Recovered case counts for the last 7 days for a country by its ISO Alpha-2 Code
GET /api/covid/weeklyRegionalRecoverdCases/:code

# Get Deceased case counts for the last 7 days for a country by its ISO Alpha-2 Code
GET /api/covid/weeklyRegionalDeceasedCases/:code

# Get regional case counts categorized under Total, Recovered, 
# and Deceased for a country its ISO Alpha-2 Code
GET /api/covid/regionalDataByCountry/:code

Being a RESTful API, these operations can be handled by any programming language - here is a curl example to access regionalDataByCountry for the United States.



API Usage by Example:


curl --location --request GET 'https://www.cyberpurge.com/api/covid/regionalDataByCountry/US' \
--header 'X-Authorization: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx'
featured covid covid-19 API

Nitin Pathak

I write about life's intersections with techology and life as it happens.

Get Free API Key

Provide a valid email address, this will be your identity for your unique API key