Automate Your COVID-19 Vaccine Slot Alerts with Cowin Slot Alert
📌 Introduction
The COVID-19 pandemic brought a surge in demand for vaccinations, making the availability of slots a critical concern. Cowin Slot Alert is a Python project that automates the process of searching for open vaccination slots and notifies users through a Telegram group. This post covers how the project works, the technology behind it, and how you can use or extend it for your own needs.
❓ What Problem Does It Solve?
Booking a vaccination slot on India’s CoWIN platform was often a race—slots could vanish within seconds. Constantly refreshing the site was inefficient and stressful. Cowin Slot Alert solves this by:
- Monitoring the CoWIN API for slot availability in specific areas
- Automatically alerting a Telegram group when slots are open
- Helping users secure bookings faster and with less effort
⚙️ How Does Cowin Slot Alert Work?
🔄 Core Workflow
- Check CoWIN API: Regularly fetches data using the public CoWIN API.
- Parse Slot Availability: Filters based on age group and dose availability.
- Send Telegram Alerts: Uses Telegram Bot API to notify users.
- Repeat: Runs in a continuous loop at set intervals.
🔧 Key Components
- API Integration: Requests data using the
calendarByPin
endpoint with pincode and date. - Filtering Logic: Only alerts when minimum age, dose, and capacity conditions are met.
- Telegram Messaging: Formats and sends data using Telegram bot token and group ID.
🧰 Tech Stack
- Python 3.9.5
requests
– API callsdatetime
– date handling- Heroku Compatible – Includes
Procfile
andruntime.txt
📬 Example Message Sent to Telegram
Name: [Center Name]
Address: [Center Address]
Pin: [Pin Code]
Minimum Age: [18 or 45]
Vaccine: [Covishield, Covaxin, etc.]
Slots: [List of available slots]
Total [N] slots are available on [Date]
Dose 1 Available: [Number]
Dose 2 Available: [Number]
COWIN: https://selfregistration.cowin.gov.in/
🚀 How To Deploy and Run
-
Clone the Repository
-
Install Requirements
pip install -r requirements.txt
-
Configure Settings
- Edit
group_id
andapi_url_telegram
- Set
pincode_near
to your desired locations
- Edit
-
Run the Script
python final.py
Or deploy to Heroku with the provided setup.
👥 Who Can Use This?
- Individuals hunting for vaccination slots
- Community leaders or Telegram group admins
- Developers interested in API automation projects
⚠️ Potential Improvements
- Configurable polling intervals
- Support for district-based searches
- Web dashboard for easier setup
- Improved rate-limiting and error handling
✅ Conclusion
Cowin Slot Alert is a practical tool that helped many during a critical moment in the pandemic. It’s a great example of how simple automation can have a real-world impact.
Feel free to explore, contribute, or extend this project to suit your needs.