How to Build an Amazon Deals Bot With Telegram Alerts

Build an Amazon deals bot that sends Telegram alerts with images, prices, and links. Python version + Google Sheets version.

I wasted an entire Saturday building an Amazon deals bot with Selenium. It worked for 36 hours. Then Amazon changed something, my selectors broke, and I got a CAPTCHA wall that basically said “we know what you’re doing, please stop.”

That frustration is literally why I built the infrastructure — proxies, rendering, rate limiting — all behind a single /deals endpoint on our Amazon Product Data API .

~20 min

Python setup time

~15 min

Google Sheets setup time

2,000

Free requests/month

22

Amazon marketplaces supported

Pick your path:

PythonGoogle Sheets
Setup time~20 minutes~15 minutes
Coding requiredYes (Python)No (copy-paste)
Server neededYes (VPS or local + cron)No (Google runs it)
Deal historyJSON fileSpreadsheet (sortable)
Custom filtersFull flexibilityAPI params only
Multi-marketplaceEasy (loop)Duplicate sheet
Best forDevelopers, power usersNon-technical users, quick setup

What you’ll need before starting

Regardless of which version you pick, you need two things set up first.

Get your Amazon deals API key

We’ll use the Amazon Product Data API to fetch deals. It has a dedicated /deals endpoint that returns live Amazon promotions with all the data we need: title, image, price, original price, discount percentage, product URL, and deal timing.

The FlyByAPIs Amazon data extraction API free tier gives you 2,000 requests per month. That’s enough to check for new deals every hour without paying a cent.

  1. Go to RapidApi and create a new account if you don’t have one
  2. Go to the Amazon Scraper API page on RapidAPI
  3. Click “Subscribe to Test”
  4. Pick the free plan
  5. Copy your API key from the header parameters. If you go to any endpoint , check the field X-RapidAPI-Key.

Create your Telegram bot

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the prompts (pick a name and username)
  3. BotFather gives you a bot token — save it somewhere safe
  4. Create a Telegram channel or group where the bot will post deals
  5. Add the bot as an admin to that channel
  6. To get your chat ID: send a message in the channel, then open https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates in your browser. Look for "chat":{"id": ...} — that number (e.g. -1001234567890) is your chat ID. Use the number directly, not the username@channel_name won’t work.

An Amazon deals bot fetches live deals from Amazon and sends Telegram alerts with product images, prices, and direct links — without scraping anything directly. With the FlyByAPIs Amazon Product Data API, you get 2,000 free requests/month and 22 marketplaces. Setup takes 15–20 minutes.


All the code from this tutorial — Python script and Google Sheets Apps Script — is available in the FlyByAPIs GitHub repo . Copy, fork, or use as a starting point.

Developer version (Python)

This version gives you full control. You’ll write a Python script that:

  1. Calls the Amazon deals API
  2. Filters deals by discount percentage
  3. Checks a local JSON file to skip deals already sent
  4. Sends a formatted message with image to your Telegram channel
  5. Logs everything so you can debug when needed

Step 1: Install dependencies

1
pip install requests

That’s it. We’re using requests for HTTP calls and the Telegram Bot API directly via HTTP. No extra libraries needed.

Step 2: The full script

Create a file called amazon_deals_bot.py and replace YOUR_RAPIDAPI_KEY, YOUR_TELEGRAM_BOT_TOKEN, YOUR_CHAT_ID:

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
import requests
import json
import os
from datetime import datetime

# === CONFIGURATION ===
RAPIDAPI_KEY = "YOUR_RAPIDAPI_KEY"
TELEGRAM_BOT_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN"
TELEGRAM_CHAT_ID = 123456789  # numeric ID from getUpdates — NOT "@channel_name"
SENT_DEALS_FILE = "sent_deals.json"

# === FILTERS (tweak these to your liking) ===
MARKETPLACE = "com"         # Amazon US. Change to "co.uk", "de", "es", "co.jp", etc.
LANGUAGE = "en"             # Results language
PAGE_SIZE = 30              # Deals per request (max 100)
MIN_PRICE = None            # Minimum price in USD (e.g. 20), or None to skip
MAX_PRICE = None            # Maximum price in USD (e.g. 50), or None to skip
CATEGORY = None             # Category ID number (get it from /category-list endpoint → category_node field), or None
MIN_RATING = None           # Minimum star rating (e.g. 4), or None to skip
MIN_DISCOUNT = 30           # Minimum discount % (e.g. 30)
IS_PRIME = True             # Prime-eligible deals only

# === LOAD SENT DEALS (deduplication) ===
def load_sent_deals():
    if os.path.exists(SENT_DEALS_FILE):
        with open(SENT_DEALS_FILE, "r") as f:
            return json.load(f)
    return []

def save_sent_deals(sent):
    with open(SENT_DEALS_FILE, "w") as f:
        json.dump(sent, f)

# === FETCH DEALS FROM API ===
def fetch_deals():
    url = "https://real-time-amazon-data-the-most-complete.p.rapidapi.com/deals"
    params = {
        "marketplace": MARKETPLACE,
        "language": LANGUAGE,
        "page_size": PAGE_SIZE,
        "min_discount": MIN_DISCOUNT,
        "is_prime": str(IS_PRIME).lower(),
    }
    # Optional filters — only add if set
    if MIN_PRICE is not None: params["min_price"] = MIN_PRICE
    if MAX_PRICE is not None: params["max_price"] = MAX_PRICE
    if CATEGORY is not None: params["category"] = CATEGORY
    if MIN_RATING is not None: params["min_rating"] = MIN_RATING

    headers = {
        "X-RapidAPI-Key": RAPIDAPI_KEY,
        "X-RapidAPI-Host": "real-time-amazon-data-the-most-complete.p.rapidapi.com"
    }
    response = requests.get(url, headers=headers, params=params)
    response.raise_for_status()
    return response.json()["data"]["deals"]

# === SEND TELEGRAM MESSAGE WITH IMAGE ===
def send_telegram_deal(deal):
    caption = (
        f"🔥 *{deal['title']}*\n\n"
        f"💰 Was {deal.get('original_price', 'N/A')} → "
        f"Now *{deal['price_symbol']}{deal['price']}* ({deal['discount_percentage']}% off)\n\n"
        f"🔗 [See deal on Amazon]({deal['product_url']})"
    )

    image_url = deal.get("image", "")
    if image_url:
        # Download image locally — Amazon CDN blocks Telegram's servers
        img_response = requests.get(image_url, timeout=10)
        if img_response.ok:
            tg_url = f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendPhoto"
            response = requests.post(tg_url, data={
                "chat_id": TELEGRAM_CHAT_ID,
                "caption": caption,
                "parse_mode": "Markdown"
            }, files={"photo": ("deal.jpg", img_response.content, "image/jpeg")})
            return response.ok

    # Fallback: text-only message if no image or download failed
    tg_url = f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage"
    response = requests.post(tg_url, data={
        "chat_id": TELEGRAM_CHAT_ID,
        "text": caption,
        "parse_mode": "Markdown"
    })
    return response.ok

# === MAIN ===
def main():
    print(f"[{datetime.now()}] Fetching Amazon deals...")
    deals = fetch_deals()
    sent_deals = load_sent_deals()

    new_count = 0
    for deal in deals:
        deal_id = deal.get("deal_id", deal.get("asin"))
        if deal_id in sent_deals:
            continue

        if send_telegram_deal(deal):
            sent_deals.append(deal_id)
            new_count += 1
            print(f"  Sent: {deal['title'][:60]}...")

    save_sent_deals(sent_deals)
    print(f"[{datetime.now()}] Done. Sent {new_count} new deals.")

if __name__ == "__main__":
    main()

Step 3: Run it

1
python3 amazon_deals_bot.py

You should see deals popping up in your Telegram channel within seconds. Each message includes the product image, the original price, the deal price with discount percentage, star rating, and a direct link to the Amazon product page.

Step 4: Automate it with cron

Run the bot every hour automatically:

1
crontab -e

Add this line:

1
0 * * * * cd /path/to/your/bot && python3 amazon_deals_bot.py >> bot.log 2>&1

Now your Amazon deals bot checks for new deals every hour and only sends the ones you haven’t seen before — all powered by the Amazon Product Data API . Set it and forget it.

One thing to keep in mind: the sent_deals.json file grows over time. If you plan to run this for months, add a cleanup step that keeps only the last 1,000 deal IDs — otherwise the file gets bloated for no reason.

Customizing the developer version

A few things you can tweak:

  • Change MIN_DISCOUNT to 20 for more deals or 70 for only the best discounts
  • Filter by category — set CATEGORY to a numeric ID (e.g. 15684181 for Automotive). To find the right ID, open the RapidAPI playground for /category-list , hit Test Endpoint, and copy the category_node value for the category you want
  • Multiple marketplaces — loop through ["com", "co.uk", "de"] to monitor deals across countries

No-code version (Google Sheets)

This version does the same thing but lives entirely inside a Google Sheet. No Python, no terminal, no server. Just a spreadsheet and Google Apps Script.

Here’s how it works: the Sheet has two tabs. One stores the deal history (so nothing gets sent twice). The other holds your settings. A script runs on a timer, fetches deals from the API, checks against the history, and sends new ones to Telegram.

Step 1: Create the spreadsheet

  1. Open Google Sheets and create a new spreadsheet
  2. Rename the first tab to Settings
  3. Add these rows:
AB
api_keyYOUR_RAPIDAPI_KEY
telegram_tokenYOUR_TELEGRAM_BOT_TOKEN
chat_idnumeric ID from getUpdates (e.g. -1001234567890) — not @username
marketplacecom
languageen
page_size30
min_discount30
min_price(leave blank to skip)
max_price(leave blank to skip)
category(leave blank to skip)
min_rating(leave blank to skip)
is_primetrue
  1. Create a second tab called Sent Deals
  2. In row 1 of “Sent Deals”, add these headers: deal_id, title, price, discount, sent_at

Your Settings tab should look like this:

Google Sheets Settings tab with API key, Telegram token, chat ID, minimum discount, and marketplace

Step 2: Add the Apps Script

Go to Extensions > Apps Script. Delete whatever is there and paste this:

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
function fetchAndSendDeals() {
  // Returns the cell value, or "" if blank / "(leave blank to skip)"
  function getOptional(sheet, cell) {
    if (!sheet) return "";
    var v = sheet.getRange(cell).getValue().toString().trim();
    return (v === "" || v.charAt(0) === "(") ? "" : v;
  }

  var ss = SpreadsheetApp.getActiveSpreadsheet();

  // Find or create history sheet
  var history = ss.getSheetByName("Sent Deals");
  if (!history) {
    history = ss.insertSheet("Sent Deals");
    history.appendRow(["deal_id", "title", "price", "discount", "sent_at"]);
  }

  // Find settings sheet — first sheet that isn't "Sent Deals"
  var settings = ss.getSheetByName("Settings") || ss.getSheetByName("Sheet1");
  if (!settings) {
    var sheets = ss.getSheets();
    for (var i = 0; i < sheets.length; i++) {
      if (sheets[i].getName() !== "Sent Deals") { settings = sheets[i]; break; }
    }
  }
  if (!settings) throw new Error("Settings sheet not found. Sheets available: " + ss.getSheets().map(function(s){ return s.getName(); }).join(", "));

  // Read settings
  var apiKey        = settings.getRange("B1").getValue();
  var telegramToken = settings.getRange("B2").getValue();
  var chatId        = settings.getRange("B3").getValue().toString();
  var marketplace   = settings.getRange("B4").getValue();
  var language      = settings.getRange("B5").getValue();
  var pageSize      = settings.getRange("B6").getValue();
  var minDiscount   = settings.getRange("B7").getValue();
  var minPrice      = getOptional(settings, "B8");
  var maxPrice      = getOptional(settings, "B9");
  var category      = getOptional(settings, "B10");
  var minRating     = getOptional(settings, "B11");
  var isPrime       = getOptional(settings, "B12");

  // Load sent deal IDs
  var sentData = history.getDataRange().getValues();
  var sentIds = sentData.slice(1).map(function(row) { return row[0]; });

  // Fetch deals from FlyByAPIs Amazon API
  var url = "https://real-time-amazon-data-the-most-complete.p.rapidapi.com/deals"
    + "?marketplace=" + marketplace
    + "&language=" + language
    + "&page_size=" + pageSize
    + "&min_discount=" + minDiscount
    + (isPrime ? "&is_prime=" + isPrime : "")
    + (minPrice ? "&min_price=" + minPrice : "")
    + (maxPrice ? "&max_price=" + maxPrice : "")
    + (category ? "&category=" + category : "")
    + (minRating ? "&min_rating=" + minRating : "");

  var response = UrlFetchApp.fetch(url, {
    headers: {
      "X-RapidAPI-Key": apiKey,
      "X-RapidAPI-Host": "real-time-amazon-data-the-most-complete.p.rapidapi.com"
    }
  });

  var deals = JSON.parse(response.getContentText()).data.deals;
  var newCount = 0;

  for (var i = 0; i < deals.length; i++) {
    var deal = deals[i];
    var dealId = deal.deal_id || deal.asin;

    if (sentIds.indexOf(dealId) !== -1) continue;

    // Send to Telegram with photo
    var caption = "🔥 *" + deal.title + "*\n\n"
      + "💰 Was " + (deal.original_price || "N/A") + " → "
      + "Now *" + deal.price_symbol + deal.price + "* (" + deal.discount_percentage + "% off)\n\n"
      + "🔗 [See deal on Amazon](" + deal.product_url + ")";

    var telegramUrl = "https://api.telegram.org/bot" + telegramToken + "/sendPhoto";

    // Fetch image from Amazon and send as binary — CDN blocks Telegram's servers
    var imgBlob = UrlFetchApp.fetch(deal.image || "").getBlob().setName("deal.jpg");
    UrlFetchApp.fetch(telegramUrl, {
      method: "post",
      payload: {
        chat_id: chatId,
        photo: imgBlob,
        caption: caption,
        parse_mode: "Markdown"
      }
    });

    // Log to Sent Deals sheet
    history.appendRow([
      dealId,
      deal.title,
      deal.price,
      deal.discount_percentage + "%",
      new Date()
    ]);

    newCount++;
  }

  console.log("Sent " + newCount + " new deals.");
}

Step 3: Test it

Click the Save button and the Run button (play icon) at the top. Google will ask for permissions the first time — approve them. Check your Telegram channel. You should see deals with images arriving within seconds.

Step 4: Set up automatic triggers

  1. In Apps Script, click the clock icon on the left sidebar (Triggers)
  2. Click Add Trigger at the bottom right of the page
  3. Set it to run fetchAndSendDeals every 1 hour (or whatever interval you want)
  4. Save

That’s it. Your Amazon deals bot is now running automatically. Every hour it checks for new deals, skips anything already sent, and pushes fresh alerts to your Telegram channel with the product image and all the details.

Why the Google Sheets version is surprisingly good

I was skeptical about this approach at first. But there are real advantages — ones that even experienced developers might prefer.

The deal history lives right in the spreadsheet. You can see every deal you’ve ever sent, sort by discount, filter by date. It doubles as a deals database without any extra work.

Pro tip

Want to run bots for multiple niches? Duplicate the Google Sheet once per niche — Electronics, Kitchen, Books — swap the category filter in Settings, and each sheet runs independently on its own trigger. Zero extra infrastructure.

There’s no server to maintain. Google runs the script for you — no cron, no VPS, no Docker. Want to share it? Duplicate the sheet, swap in a new Amazon scraper API key and Telegram token, and you have a second bot running for a different marketplace in two minutes.

And it’s free. Google Apps Script has generous quotas, and the free tier of the Amazon API (2,000 requests/month) is more than enough for hourly checks.


Try the Amazon Deals API free on RapidAPI →

2,000 requests/month free · 25 endpoints · 21 marketplaces


What the Telegram messages look like

Here’s what each message looks like in your channel:

Telegram deal alert message with product image, price, discount, and direct Amazon link

Product image at the top, bold title, original price vs. deal price with discount percentage, star rating, and a direct link. Clean, scannable, and gives your subscribers everything they need to decide if a deal is worth clicking.

"No affiliate links, no redirect spam — just a direct Amazon URL and all the data your subscribers need to buy in one tap."


Filtering tricks to get better deal alerts

The Amazon deals endpoint supports some useful filters you should take advantage of:

FilterWhat it doesExample
marketplaceAmazon country store (22 supported)com US · co.uk UK · de Germany · fr France · it Italy · es Spain · ca Canada · com.au Australia · co.jp Japan · in India · com.br Brazil · com.mx Mexico · nl Netherlands · se Sweden · pl Poland · com.tr Turkey · ae UAE · sa Saudi Arabia · eg Egypt · com.be Belgium · ie Ireland · sg Singapore
languageLanguage for resultsen, es, de
page_sizeNumber of deals returned (max 300)30
min_discountOnly deals above X% off50 for big discounts only
max_discountCap the discount percentage80 to exclude weird outliers
min_price / max_pricePrice range filter10 / 100 for mid-range deals
categorySpecific Amazon department (numeric ID)15684181 for Automotive
min_ratingMinimum star rating4 for well-reviewed products only
is_primePrime-eligible deals onlytrue

For a quality-focused deal alert channel, I’d recommend: min_discount=40, min_rating=4, is_prime=true. This gives you fewer deals but everything you send is genuinely worth buying.

300

live deals returned per single API request

What about Kindle daily deals?

If you’re specifically after Amazon Kindle daily deals, the same approach works with the Amazon product data extraction API . Filter by the Books or Kindle Store category and lower the minimum discount (Kindle deals tend to be 50-80% off but at lower price points). The API returns the same data structure regardless of category.


You’re live — now what?

You’ve got a working Amazon deals bot. Here are some ideas to take it further:

  • Add multiple categories — run the script once per category to send themed updates (tech deals, kitchen deals, book deals)
  • Build a deals website — save deals to a database and display them on a simple site. The data is already structured, you just need a frontend. Pair it with the Google Maps data API to show local store availability
  • Cross-post to Discord — the Telegram bot logic translates almost 1:1 to Discord webhooks. You could even combine it with our Google Search API to find coupon codes for each deal automatically
  • Price history tracking — combine the deals bot with the price tracking approach to identify deals that are actually at their lowest price ever

The FlyByAPIs Amazon Product Data API has 25 endpoints across 22 marketplaces. A single API request to the /deals endpoint can return up to 300 live Amazon promotions in structured JSON — no scraping, no proxies, no maintenance. The deals endpoint is just the start.

Get your API key — it's free →

Free tier available · Results in under 2 seconds

P.S. If you build something cool with this, I genuinely want to see it. The best deals channels I’ve found are the ones built by one person who actually cares about the niche. That could be you.

FAQ

Frequently Asked Questions

Q How do I build an Amazon deals bot for Telegram?

Use the FlyByAPIs Amazon Product Data API /deals endpoint to fetch live deals, then send them to Telegram via the Bot API. The free tier includes 2,000 requests/month — enough for hourly deal checks. Both Python and Google Sheets versions work.

Q Can I get Amazon deal alerts on Telegram without coding?

Yes. FlyByAPIs offers a no-code approach using Google Sheets and Apps Script. You paste a script into your spreadsheet, configure your API key and Telegram bot token, and set a 1-hour trigger. No terminal or Python needed.

Q How many Amazon deals can the free API plan return?

The FlyByAPIs free plan gives you 2,000 requests per month. Each request to the /deals endpoint returns up to 300 deals. At one request per hour, that's 720 requests/month — well within the free limit.

Q Will Amazon block my deals bot?

No. FlyByAPIs handles all interaction with Amazon server-side. Your bot makes requests to RapidAPI's infrastructure, not to Amazon directly. There's no scraping, no headless browser, and no risk of IP bans.

Q Can I track Amazon deals in countries outside the US?

Yes. The FlyByAPIs Amazon API supports 22 marketplaces: US (com), UK (co.uk), Germany (de), France (fr), Italy (it), Spain (es), Canada (ca), Australia (com.au), Japan (co.jp), India (in), Brazil (com.br), Mexico (com.mx), Netherlands (nl), Sweden (se), Poland (pl), Turkey (com.tr), UAE (ae), Saudi Arabia (sa), Egypt (eg), Belgium (com.be), Ireland (ie), and Singapore (sg). Change the marketplace parameter to the country code you want — both Python and Google Sheets versions support this.

Q What data does the Amazon deals API return for each deal?

The FlyByAPIs /deals endpoint returns: title, ASIN, product URL, deal URL, image URL, current price with currency symbol, original price, discount percentage, discount amount, deal badge label (e.g. '30% off'), deal type ('Limited time deal'), deal type code (BEST_DEAL / LIGHTNING_DEAL), deal ID, deal start and end times, deal state, brand ID, department IDs, and position in results. All data comes as structured JSON.
Share this article
Oriol Marti
Oriol Marti
Founder & CEO

Computer engineer and entrepreneur based in Andorra. Founder and CEO of FlyByAPIs, building reliable web data APIs for developers worldwide.

Free tier available

Ready to stop maintaining scrapers?

Production-ready APIs for web data extraction. Whatever you're building, up and running in minutes.

Start for free on RapidAPI