Pradeep CE

Indie maker, solopreneur, travel enthusiast, and aspiring writer :)

StopCorona API: Unofficial API of StopCoronaTN Resources

May 08, 2021

StopCorona API is an unofficial, open, public API for the info on https://stopcorona.tn.gov.in/.

The motivation behind this API is to provide a free, accessible, available API of COVID-19 facilities to enable others to build useful things that might help people. Right now, this is just a couple of hours of hacking together something basic, but I think it has the scope to do / be much more.

While this API is open to the public and free to use, I’m running it out of pocket, on a measly budget. Please use it for something meaningful, and please be mindful of how many automated queries you send my way. 🙏

I’ll keep updating this page as I add more resources, but for now, you can see a list of private hospital beds and their availabilities.

Authentication

The API is currently open, and no authentication or signup is required. Just hit the endpoints and get the data you seek.

Usage

Request:

GET https://stopcorona.pradeepcep.com/api/v1/beds/

Response - 200 OK - application/json:

{
    "count": 567,
    "next": "https://stopcorona.pradeepcep.com/api/v1/beds/?page=2",
    "previous": null,
    "results": [
        {
            "identifier": "example-hospital",
            "district": "Chennai",
            "institution": "Example Hospital",
            "covid_beds_total": 31,
            "covid_beds_occupied": 26,
            "covid_beds_vacant": 5,
            "os_beds_total": 23,
            "os_beds_occupied": 21,
            "os_beds_vacant": 2,
            "nos_beds_total": 3,
            "nos_beds_occupied": 0,
            "nos_beds_vacant": 3,
            "icu_beds_total": 5,
            "icu_beds_occupied": 5,
            "icu_beds_vacant": 0,
            "ventilators_total": 5,
            "ventilators_occupied": 5,
            "ventilators_vacant": 0,
            "last_updated": "2021-05-07T18:04:23",
            "contact_number": "1234567890",
            "remarks": "Report on 07.05.2021\r\n"
        },
        {
            ...
        }
    ]
}

Contributing

  • Development happens on Github. You are welcome to contribute code or report issues.
  • Share and let others know. It’s good karma, and it will help someone.
  • Tag @pradeepcep on Twitter: I’d love to hear from you, and you can tweet at me about bugs or feature requests too!
  • Build something useful / meaningful. This is probably the biggest validation you can give this little experiment — you rock!

The views and opinions expressed on this site are my own. They do not reflect the views or policies of any employer or client, past or present.

Pradeep CE | Copyright © 2023 | pradeepcep@gmail.com | v2.0