Born out of necessity, this project helps you book your COVID-19 vaccination slot (if you live in India). Get pinged when a new vaccination slot becomes available in your area through sound alerts and browser notifications.
This program cannot book a vaccination slot for you, instead it uses the Co-WIN APIs to alert you when a new slot becomes available.
Checkout a live version of CoWatch here.
CoWatch makes use of the Indian Government's Co-WIN API, to fetch vaccination slot data. These APIs are publicly available for use by third party applications. However, they do limit the number of API calls to 100 per 5 minutes per IP. Consider this if you're planning to build something awesome on top of this project.
This project is written in vanilla Javascript and can be ran out of the box, without any dependencies.
Usage is pretty straight forward. The tool only works with Indian IP addresses so disconnect your VPN if needed.
- Select your state and district.
- Here you can browse through the available health centres and vaccination slots.
- Press on
Start Watching
. Script will start to continuously query and refresh the data once at every specified interval. (15 seconds by default). - When a new slot becomes available, you'll be alerted by sounds and browser notifications.
- Do not close the tab while watching.
The URL can be configured to point to a specific district and display its slots. This can be done by providing corresponding districtId
as a query parameter: /?districtId=xx
Example: https://divinsmathew.github.io/cowatch/?districtId=140
Refer districts.json
for a list of valid district IDs. Invalid districtId
s are ignored.
To modify CoWatch:
- Clone the repository. using
! Git Clone https://github.com/divinsmathew/cowatch.git
- To modify the watching time interval, edit the
refreshInterval
variable here and set the value in milliseconds. Remember not to modify intervals to below3000ms
to remain compliant with the Co-WIN Public API regulations. - By default, CoWatch uses a cached version of state and district data for better load times. Now, this works fine, but if the back-end were to modify the district-id mappings, use
buildAllDistrictIdMap
method indistricts.js
to re-generate the updated district-id mappings. Or you can also uncomment this line instead, to prevent using cached data.
Contributions are always welcome! Feel free to clone and improve the project.