Skip to content

poghdev/Amazon-Price-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazon Price Tracker Bot 📉

A Telegram bot that tracks Amazon product prices and notifies users when prices change. Built with Python, FastAPI, Aiogram, and MongoDB.

Features

  • Track Products: Send an Amazon product link to the bot to start tracking.
  • Real-time Data: Fetches product details (price, title, rating, image) using RapidAPI.
  • Automatic Monitoring: Checks prices every 30 minutes in the background.
  • Smart Notifications: Sends alerts only when the price drops or increases.
  • Manage List: View all tracked products and delete items you no longer want to watch.
  • Multi-user Support: Handles multiple users and their individual tracking lists.

Tech Stack

Prerequisites

Before running the project, ensure you have:

  1. Python 3.9 or higher installed.
  2. A MongoDB database (local or cloud like MongoDB Atlas).
  3. A Telegram Bot Token from @BotFather.
  4. A RapidAPI Key for the Real-Time Amazon Data API.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/amazon-price-tracker.git
    cd amazon-price-tracker
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install fastapi uvicorn aiogram motor httpx python-dotenv
  4. Configuration:

    Create a .env file in the root directory and add the following variables:

    # Telegram Bot
    BOT_TOKEN=your_telegram_bot_token
    
    # MongoDB
    MONGO_DB=mongodb://localhost:27017
    DB_NAME=AmazonTracker
    
    # RapidAPI (Amazon Data)
    AMAZON_KEY=your_rapidapi_key
    AMAZON_URL=https://real-time-amazon-data.p.rapidapi.com/product-details
    
    # API Configuration
    API_URL=http://127.0.0.1:8000

Usage

You need to run the API backend and the Telegram bot separately.

  1. Start the API Server:

    uvicorn api.main:app --reload
  2. Start the Telegram Bot:

    python bot/bot.py

About

A Telegram bot that tracks Amazon product prices and notifies users when prices change. Built with Python, FastAPI, Aiogram, and MongoDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages