An automated tool designed to scrape, analyze, and summarize high-value opportunities (hackathons, competitions, quizzes) from Unstop. It uses Google Gemini AI to generate concise, readable summaries and instantly sends them to a Telegram Channel.
Stay updated with the latest opportunities! Join our demo Telegram channel where the bot posts live updates:
(Note: Updates are posted automatically based on the schedule)
- 🔍 Smart Discovery: Automatically finds top competitions sorted by the highest prize pool.
- 🧠 AI-Powered Summaries: Uses Google Gemini 2.5 Flash Lite to extract key details (dates, eligibility, rounds) and generate a clean, formatted summary.
- ⚡ Instant Alerts: Sends real-time notifications to Telegram with direct apply links.
- 🛡️ Duplicate Protection: Keeps track of processed opportunities to prevent spamming.
- 📉 Rate Limiting: Intelligent usage tracking to respect API limits.
- 🤖 Automation Ready: Designed to run on a schedule (e.g., via GitHub Actions).
The system operates in a streamlined pipeline to ensure you never miss a high-value opportunity:
-
Search & Filter:
- The script queries the Unstop API for the latest competitions, prioritizing those with the highest prizes.
- It cross-references these results with a local database (
db.txt) to identify new opportunities that haven't been processed yet.
-
Data Extraction:
- For every new competition, the system fetches comprehensive details, including eligibility criteria, round structures, and important dates.
-
AI Summarization:
- The raw data is sent to Google Gemini.
- The AI analyzes the content and generates a structured HTML message for Telegram, highlighting the most critical information (Title, Organizer, Prize, Deadline, etc.).
-
Notification:
- The generated summary is sent to your configured Telegram channel or chat.
-
State Management:
- Successfully processed competition IDs are saved to
db.txtto ensure they are not repeated in future runs.
- Successfully processed competition IDs are saved to
-
Clone the Repository
git clone https://github.com/yourusername/UnstopScrapper.git cd UnstopScrapper -
Install Dependencies
pip install -r requirements.txt # or if using uv uv sync -
Configure Environment Variables
Copy the
sample.envfile to a new file named.env:cp sample.env .env
Open
.envand fill in the required details:Variable Description How to Get It GEMINI_API_KEYAPI Key for Google Gemini AI Get it here TELEGRAM_BOT_TOKENToken for your Telegram Bot Create a bot with @BotFather TELEGRAM_CHAT_IDID of the Telegram Channel/Group Use @userinfobot or similar MAX_RPMMax requests per minute (Rate Limit) Default: 6(Adjust based on your quota)MAX_RPDMax requests per day (Rate Limit) Default: 15(Adjust based on your quota) -
Run the Scraper
python main.py
⚠️ IMPORTANT: Before running the code for the first time, make sure to deletedb.txtandgemini_usage.jsonif they exist. These files contain data from the repository's own usage (e.g., GitHub Actions). If you don't delete them, the script will assume many competitions have already been processed and will skip them.
Fetches the top 50 opportunities sorted by the highest prize pool.
- URL:
https://unstop.com/api/public/opportunity/search-result?opportunity=all&page=1&per_page=50&sortBy=&orderBy=&filter_condition=&undefined=true - Method:
GET - Sample Output: JSON
Fetches comprehensive details for a specific competition using its ID (e.g., 1582532).
- URL:
https://unstop.com/api/public/competition/{id} - Example:
https://unstop.com/api/public/competition/1582532 - Method:
GET - Sample Output: JSON
