Made An open source COVID-19 Data Tracker API

For those Data freaks ... or i must say tinker boomers, made a simple rest API to fetch data about Covid-19 by country. You can do whatever with it, but don't be a naughty boy with the requests, yo IP may get blacklisted and i don't really care. 

I made this to use it myself while learning some stuff that needed a bunch of data. This is probably gonna be probably an on-going experiment / project so take it as it is.

Don't expect number/data changes,but JSON structure and data availability changes may happen.

Update Jan 10th, 2021: I made a page to document changes, i won't be updating here anymore. ALSO SOME MORE DETAILS IN THERE, Like sources and such!

Endpoint location

https://covid-tracker.danielmg.org/api/location/{iso_code}

List of ISO 3166-1 (alpha-3) country codes (Three letters)

Example Request:

https://covid-tracker.danielmg.org/api/location/USA

Example Response (updated)

{
    "date": "2021-04-17T00:00:00.000000Z",
    "name": "United States",
    "iso": "USA",
    "region": "North America",
    "cases": {
        "new": 52373,
        "new_per_million": 158.225,
        "total": 31628013
    },
    "deaths": {
        "new": 680,
        "new_per_million": 2.054,
        "total": 566904
    },
    "vaccines": {
        "total_dosis": 205871913,
        "people_vaccinated": 129494179,
        "people_fully_vaccinated": 82471151,
        "people_vaccinated_per_hundred": 38.72,
        "people_fully_vaccinated_per_hundred": 24.66
    },
    "last_update": "2021-04-19T02:57:50.000000Z"
}

Also, yes.. there is some more data (and an ugly VUE frontend at https://covid-tracker.danielmg.org/) .

i'll probably add some more endpoints. I just don't need em at the moment, so that's why.

Notes

  • Data gets updated about 2 times per day, when? depends on country and source.
  • Consume this Rest API using some sort of backend technology.
  • Sending too many requests may result on IP blacklist.
  • For now, CORS disabled to avoid hotlink (running on a potato instance).
  • In theory calling this endpoint once per hour should be more than enough to keep you updated with the most recent data.

Have fun with it, and be safe out-there <3

About
Related Posts
  • Laravel: working with Components

    One of the features present in the last few versions of Laravel is Blade components. For some reason (at least on the projects i had to to work) the adoption isn't great. They come to fill a void within the MVC pattern and organize our projects nicely.

Comments
The comments are closed on this section.
Hire me!

I'm currently open for new projects or join pretty much any project i may fit in, let me know!

Read about what I do, or contact me for details.