Blog

Amazon price alert: how to set one, and how to build your own in Python

How to set a price alert on Amazon with Alexa for Shopping, what price trackers add, and a tested Python script that alerts you when products hit your price.

Published

An Amazon price alert is a message that tells you when a product on Amazon reaches a price you choose. You can set one inside Amazon itself, by asking Alexa for Shopping to watch an item at your price, or with a price tracker that checks the product for you. Either way, something checks the price again and again and compares it with your number.

This guide shows how to set a price alert on Amazon, what Amazon's own price history shows, and when a tracker or your own script is the better choice. It then gives a tested Python script of 123 lines that checks a watchlist of Amazon products, keeps every price in a CSV file and prints an alert when a product reaches your target or its lowest price so far. Every number below comes from real runs on 22 November 2026, five days before Black Friday.

How do you set a price alert on Amazon?

The direct way to set a price alert on Amazon is Alexa for Shopping, the shopping assistant in the Amazon app and on amazon.com. Amazon renamed its assistant Rufus to Alexa for Shopping on 13 May 2026 (About Amazon).

  1. Open the product in the Amazon app or on amazon.com.
  2. Ask Alexa for Shopping to watch it at your price. Engadget describes it as asking the assistant "to watch the item at a price you choose" (Engadget). For example: "Tell me when this drops to $110."
  3. Turn on notifications for the Amazon app. On an iPhone this is under Settings, Apps, Amazon, Notifications. Without it, the alert has nowhere to go.

Engadget reports a few more details. The feature is for US customers, in the Amazon app, on amazon.com and on Echo devices. It can also watch a kind of product rather than one listing, within limits you set such as a budget or a color. Setting an alert does not need Prime.

What is Amazon Auto Buy?

Auto Buy goes one step further: instead of telling you, Amazon places the order when the price reaches your number. Engadget's example request is "Buy these headphones when they are $75 or less." The order uses your default payment method, it needs Prime, and coupons and promotional discounts do not apply to it. Use it only for a product you are sure you want, at a price you are sure of.

Where do you see Amazon price history?

Amazon shows price history on eligible product pages, with a link next to the price, for the past 30, 90 or 365 days. You can also ask Alexa for Shopping "What's the price history?". Amazon lists this as available in the US, the UK, Canada, India, Japan, Germany, France, Italy and Spain (About Amazon).

Price history answers the question "is this a good price?" before you set an alert. If a product was $110 three times this year, $110 is a realistic target. If it never went below $125, a $110 alert may never fire.

When is Amazon's own alert not enough?

Amazon's alerts are built for a shopper watching a few things to buy. They are less useful when:

  • You watch many products, or the same list every week, and want to change it in one place.
  • You need the record, not only the message: a seller, a buyer or an analyst who wants every price with its date in a file, to chart, share or compare with other shops.
  • Several people share the list, or the alert has to reach a team channel, a spreadsheet or another program.
  • Your rule is not one number, such as "tell me about any new low" or "tell me when the discount is over 40%".

Price tracker websites and browser extensions cover part of this: they keep long price histories and send alerts by email. Engadget notes that tools such as CamelCamelCamel or Keepa "can't place orders for you, only monitor and report." Your own script also only monitors and reports, but it watches exactly your list, applies your rules and keeps the data in a file you own.

How do you build an Amazon price alert in Python?

The script reads every product on a watchlist, adds one row per product to amazon_prices.csv, and prints an alert for each product that is at or below its target, or below every price the file has recorded for it. It uses the standard library only and needs Python 3.9 or later.

Get access

Every account starts with 200 free credits, and sign-in is by email. The quickest way is to give your coding agent (Claude Code, Cursor or similar) this line:

set up https://mcp.datawebot.com/setup.md

The agent asks for your email and you approve the sign-in from the email datawebot sends. The key is saved to ~/.datawebot/credentials, readable only by you, and the script reads it from there. That key lasts 30 days. For a script that runs every day, create a key that lasts 90 or 365 days on the dashboard under API keys, and put it in an environment variable named DATAWEBOT_API_KEY from your secret store. Never commit it.

The script

"""Amazon price alerts: read every product on a watchlist, add one dated row
per product to a CSV file and say which ones reached your target price.
Run with --alerts-only to print only the alerts. Standard library only."""
import csv, json, os, sys, time, urllib.request
from concurrent.futures import ThreadPoolExecutor

API = "https://api.datawebot.com/v1/requests"
HISTORY = "amazon_prices.csv"
# ASIN (the 10 characters after /dp/ in an amazon.com link) and the price you
# want to pay, or None to record the price without an alert.
WATCHLIST = {
    "B0CFPJYX7P": 110,   # Kindle Paperwhite 16GB (2024)
    "B0C8RR4WN3": None,  # Kindle Paperwhite Signature Edition 32GB
    "B0GJTXVN9Z": 75,    # Apple AirTag (2nd generation), 4 pack
    "B01NBKTPTS": 60,    # Instant Pot Duo Plus 6 quart
    "B08PQ2KWHS": 90,    # Instant Pot Pro 6 quart
    "B09QV24FFZ": 150,   # Ninja CREAMi 7-in-1 ice cream maker
    "B0CP9Z56SW": 25,    # Stanley Quencher H2.0 40 oz
    "B0DRW8G3WK": 40,    # LEGO Botanicals Mini Bonsai Trees 10373
}
FIELDS = ["checked_at", "asin", "title", "price", "list_price", "seller",
          "availability", "url"]


def api_key():
    key = os.environ.get("DATAWEBOT_API_KEY")
    if key:
        return key
    # Written by the agent setup (https://mcp.datawebot.com/setup.md).
    with open(os.path.expanduser("~/.datawebot/credentials")) as f:
        return json.load(f)["profiles"]["https://mcp.datawebot.com"]["api_key"]


def call(method, url, body=None):
    req = urllib.request.Request(url, method=method,
        data=json.dumps(body).encode() if body else None,
        headers={"Authorization": "Bearer " + api_key(),
                 "Content-Type": "application/json",
                 "User-Agent": "amazon-price-alert-example/1.0"})
    with urllib.request.urlopen(req, timeout=180) as r:
        return json.loads(r.read())


def read(asin):
    """One amazon.com product page as a row, or None when the read failed."""
    try:
        res = call("POST", API, {"capability": "product", "country": "US",
                                 "url": "https://www.amazon.com/dp/" + asin})
        for _ in range(60):  # when the answer is "working", poll until it is done
            if res.get("status") != "working":
                break
            time.sleep(res.get("check_after_seconds") or 4)
            res = call("GET", f"{API}/{res['request_id']}")
    except (OSError, ValueError):  # a network or server error counts as a failed read
        return None
    p = res.get("product")
    details = (p or {}).get("details") or {}
    if not p or not details.get("delivery_location"):
        return None  # a full read names its delivery ZIP code; this one did not finish
    return {"checked_at": res["meta"]["as_of"], "asin": asin, "title": p["title"],
            "price": (p.get("price") or {}).get("amount"),
            "list_price": (p.get("original_price") or {}).get("amount"),
            "seller": (details.get("seller") or {}).get("name"),
            "availability": p.get("availability"), "url": p["url"]}


def lows():
    """The lowest price seen so far for each ASIN, from earlier rows in the CSV."""
    low = {}
    if os.path.exists(HISTORY):
        with open(HISTORY, newline="", encoding="utf-8") as f:
            for row in csv.DictReader(f):
                if row["price"]:
                    price = float(row["price"])
                    low[row["asin"]] = min(price, low.get(row["asin"], price))
    return low


def alerts(row, target, low):
    """The reasons this product deserves a message today."""
    price, why = row["price"], []
    if price and target and price <= target:
        why.append(f"at or below your ${target:,.2f}")
    if price and low and price < low:
        why.append(f"lowest so far, was ${low:,.2f}")
    return why


def main():
    quiet = "--alerts-only" in sys.argv
    low = lows()
    with ThreadPoolExecutor(max_workers=2) as pool:
        rows = dict(zip(WATCHLIST, pool.map(read, WATCHLIST)))
    missed = [a for a, row in rows.items() if not row]
    if missed:  # a read that did not come back is free, so it is tried once more
        time.sleep(130)
        rows.update((a, read(a)) for a in missed)
    done = [row for row in rows.values() if row]
    new_file = not os.path.exists(HISTORY)
    with open(HISTORY, "a", newline="", encoding="utf-8") as f:
        writer = csv.DictWriter(f, fieldnames=FIELDS)
        if new_file:
            writer.writeheader()
        writer.writerows(done)
    for row in done:
        price, was, target = row["price"], row["list_price"], WATCHLIST[row["asin"]]
        why = alerts(row, target, low.get(row["asin"]))
        if quiet and not why:
            continue
        shown = f"${price:,.2f}" if price else f"no price, {row['availability']}"
        off = f" (list ${was:,.2f}, {round(100 * (was - price) / was)}% off)" if price and was else ""
        goal = f"; target ${target:,.2f}" if target else ""
        print(f"{'ALERT' if why else '     '} {row['title'][:42]:42}  {shown}{off}{goal}")
        if why:
            print(f"      {'; '.join(why)}. {row['url']}")
    failed = [a for a, row in rows.items() if not row]
    if failed or not quiet:
        print(f"{len(done)} of {len(WATCHLIST)} products read and added to {HISTORY}"
              + (f"; not read: {', '.join(failed)}" if failed else ""))


if __name__ == "__main__":
    main()

How it works

  • The watchlist pairs each ASIN with the price you want to pay. The ASIN is the 10 characters after /dp/ in an amazon.com link; our ASIN lookup guide shows how to find it from a barcode or a keyword. A target of None records the price without an alert.
  • read sends one product read per ASIN, two at a time. The price is the one on the page, and the list price is the struck-through "List Price", when Amazon shows one.
  • An incomplete read is retried. A full read always says which delivery ZIP code it was read for. A read without one did not finish, so it is tried again after about two minutes, together with any read that failed outright. Failed reads are free.
  • lows finds the lowest price the CSV has for each ASIN, so the script knows a new low when it sees one. The more often it runs, the more that low means.
  • alerts gives the reasons for an alert: the target was reached, or the price is the lowest recorded so far.
  • --alerts-only prints only the alerts, plus a line when a read failed. With nothing to report, it prints nothing, which is what a scheduler needs to send a message only when something happened.

What it printed

The first run started at 10:55 UTC on 22 November 2026 and took 4 minutes 6 seconds. One read came back incomplete and was read again after the wait, and all 8 products were read:

      Amazon Kindle Paperwhite 16GB (2024 model)  $129.99 (list $199.99, 35% off); target $110.00
      Amazon Kindle Paperwhite Signature Edition  $179.99 (list $249.99, 28% off)
      Apple AirTag (2nd Generation) - 4 Pack: Tr  $79.00 (list $99.00, 20% off); target $75.00
ALERT Instant Pot Duo Plus 6 Qt 9-in-1 Electric   $59.99 (list $139.99, 57% off); target $60.00
      at or below your $60.00. https://www.amazon.com/dp/B01NBKTPTS
      Instant Pot Pro 6 Qt 10-in-1 Electric Pres  $99.99 (list $169.99, 41% off); target $90.00
      Ninja® CREAMi® 7-in-1 Ice Cream Maker,  Ic  $184.99 (list $219.99, 16% off); target $150.00
ALERT STANLEY Quencher H2.0 Flow State Tumbler,   $22.50 (list $45.00, 50% off); target $25.00
      at or below your $25.00. https://www.amazon.com/dp/B0CP9Z56SW
      LEGO Botanicals Mini Bonsai Trees 10373     $44.99 (list $64.99, 31% off); target $40.00
8 of 8 products read and added to amazon_prices.csv

Two of the eight products had already reached their targets: the Instant Pot Duo Plus at $59.99 against a target of $60, and the Stanley Quencher at $22.50 against $25. The other six were above their targets, by $4 for the AirTag 4 pack and by $34.99 for the Ninja CREAMi.

The second run, with --alerts-only, started at 11:00 UTC and took 1 minute 52 seconds. All 8 reads came back the first time, nothing had moved, and it printed only the two alerts:

ALERT Instant Pot Duo Plus 6 Qt 9-in-1 Electric   $59.99 (list $139.99, 57% off); target $60.00
      at or below your $60.00. https://www.amazon.com/dp/B01NBKTPTS
ALERT STANLEY Quencher H2.0 Flow State Tumbler,   $22.50 (list $45.00, 50% off); target $25.00
      at or below your $25.00. https://www.amazon.com/dp/B0CP9Z56SW

To check a row against the page, we opened the Stanley Quencher in a browser right after the runs. The page showed a Black Friday deal at $22.50, 50% off a list price of $45.00, in stock, the same as the row.

How do you get the alert as an email?

Run the script on a schedule and let the scheduler send its output. On macOS or Linux, cron mails a job's output to the address in MAILTO, so a job that prints nothing sends no mail (crontab manual). This line checks the watchlist every day at 7:00 and mails you only when there is an alert:

MAILTO=you@example.com
0 7 * * * cd /path/to/folder && python3 amazon_price_alert.py --alerts-only

Cron hands the mail to the machine's own mail system, so the machine must be able to send email. If it cannot, pipe the output into any tool you already use to send messages. Once a day suits most watchlists. Around Black Friday and Prime Day, when prices change within hours, run it every few hours.

How do you get an alert from an AI agent?

If you work in Claude, ChatGPT, Cursor or another agent that supports MCP, you can check a list without the script. After the setup line above, ask in plain language:

Use datawebot to read these amazon.com products: B0CFPJYX7P, B0GJTXVN9Z,
B09QV24FFZ. For each one, give the price, the list price and whether it is at
or below my target: $110, $75 and $150.

The agent calls get_product for each ASIN and answers from the same JSON the script reads. An agent answers when you ask; it does not watch prices while you are away. For alerts that arrive on their own, use the script and a schedule. The Amazon product data API page lists every field and the Amazon countries, and the MCP server page shows how to connect each client.

How do you pick a good target price?

  1. Look at the price history first. Amazon's own 30, 90 and 365 day history, or your CSV once it has a few weeks of rows, shows what the product really sells for. Set the target near a price it has actually reached.
  2. Do not trust the list price alone. In our run, all eight products showed a list price, and the discounts against it ran from 16% to 57%. A big percentage off a list price is not the same as a low price; compare with the history.
  3. Use "lowest so far" for products you do not know well. The script alerts on a new low even without a target, once it has a few rows to compare with.
  4. Check the seller before you buy. All eight of our products were sold by Amazon.com. When another seller has the lowest price, the delivery time and return terms can differ; our Amazon buy box tracker records who holds the buy box on each check.
  5. Mind the variant. Colors and sizes often have their own ASINs and their own prices. The Stanley Quencher in our list is the 40 oz Rose Quartz; another color can cost more or less.

What does it cost?

A product read costs 1 credit, and failed reads are free. A run of this 8-product watchlist therefore costs 8 credits. The 200 free credits every account starts with cover 25 runs: a daily check for more than three weeks, through Black Friday and Cyber Monday. More credits are one-time packs with no subscription, listed on the pricing page.

To read other fields from the same product pages, such as the seller, the rating and every variant, see our Amazon scraper API guide. To keep a fuller price history with a change report for each product, see our Python price tracker guide and our Walmart price tracker, which works the same way for walmart.com.

Need this at volume?

If you need prices for thousands of ASINs every day, send a volume request and we will size it in credits. Our published samples show the result format.

Frequently asked questions

Can you set a price alert on Amazon?

Yes. In the US, open the product in the Amazon app or on amazon.com and ask Alexa for Shopping to watch it at the price you want, with notifications turned on for the Amazon app. Price tracker websites and your own script are the alternatives when you watch many products or need the price record.

Does Amazon notify you when a price drops?

It does when you have asked it to: an alert set through Alexa for Shopping sends a notification to the Amazon app when the product reaches your price. To be told about every change, or about a new low, use a price tracker or the script in this guide.

Do Amazon price alerts need Prime?

According to Engadget, setting up price alerts does not need a Prime membership, but Auto Buy, where Amazon places the order for you at your price, does.

How far back does Amazon price history go?

Amazon shows 30, 90 and 365 days of price history on eligible product pages, in the US, the UK, Canada, India, Japan, Germany, France, Italy and Spain.

How often should a price alert check the price?

Once a day is enough for most products. Around sale events such as Black Friday, Cyber Monday and Prime Day, prices can change within hours, so check every few hours then. Each check of this script costs 1 credit per product.

Can I track Amazon prices in other countries?

The script reads amazon.com. datawebot also reads other Amazon countries; the Amazon product data API page lists them. Change the link in read and the country to match, and keep the targets in that country's currency.

Why did my price alert not fire?

The most common reasons are a target below any price the product has reached, a different variant from the one on sale, or a deal that started and ended between two checks. Check the price history, the ASIN of the exact variant, and how often the script runs.

Sources

  1. https://www.aboutamazon.com/news/retail/how-to-check-amazon-price-history
  2. https://www.engadget.com/2268766/how-to-set-up-amazon-alexa-price-drop-alerts-auto-buy-feature/
  3. https://www.datawebot.com/llms.txt
  4. https://mcp.datawebot.com/setup.md
  5. https://www.datawebot.com/solutions/amazon-product-data-api
  6. https://docs.python.org/3/library/csv.html
  7. https://docs.python.org/3/library/concurrent.futures.html
  8. https://man7.org/linux/man-pages/man5/crontab.5.html

Read Amazon search results and product pages as JSON.

Every account starts with 200 free credits, with no subscription: a search costs 5 credits and a product read 1. Failed requests are free.

← All articles