DEV Community

Cover image for How to Scrape Amazon Product Data in Python (2026 Guide)
Azzam
Azzam

Posted on

How to Scrape Amazon Product Data in Python (2026 Guide)

If you sell on Amazon, track competitors or research a niche, you probably want the same few numbers for a list of products: price, rating, Best Sellers Rank and some idea of how many units move each month. This guide gets you all of that in Python with one function call, from keywords, product links or ASINs, on 20 Amazon stores, with no Amazon account or API key.

Quick start

# pip install apify-client
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("automly/amazon-products-scraper---fast-efficient-with-sales-data").call(
    run_input={"keywords": ["garlic press"], "maxResultsPerKeyword": 20}
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    bsr = item["best_sellers_rank"][0]["rank"] if item.get("best_sellers_rank") else None
    print(item["asin"], item["price"], bsr, item.get("estimated_monthly_sales"))
Enter fullscreen mode Exit fullscreen mode

That prints the ASIN, price, main-category rank and estimated monthly sales for the top 20 garlic presses on amazon.com. The rest of this post covers the inputs, the output, cost and limits.

Why not the official Amazon API?

Amazon has two developer APIs, and both come with conditions. The Product Advertising API (PA-API 5.0) that most old tutorials use is gone: Amazon deprecated it, and calls to it now return 403 Forbidden. Its replacement is the Creators API.

Option Access needed Cost What you get
Creators API (replaces PA-API) Amazon Associates account with at least 10 qualifying sales in the past 30 days. Access is lost after 30 straight days without referred sales (source) No fee listed. Quota starts at 1 request/second and 8,640/day, then grows with the sales you refer (source) Search, item details, variations, categories, offers and sales rank. No reviews or ratings resource (resources)
Selling Partner API A Professional seller account (Individual accounts can't build private apps) plus developer registration Professional plan is $39.99/month. Amazon dropped the developer fees it had planned for 2026 Catalog details and sales ranks (Catalog Items API), but its use policy limits it to helping sellers run their Amazon business
This scraper Free Apify account $5.55 per 1,000 results Price, rating, reviews count, BSR per category, "bought in past month", monthly sales and revenue estimates

So the official route works if you're an active affiliate who links back to Amazon, or a seller managing your own business. For product research or price monitoring across any product, it's a poor fit. I also couldn't find Amazon's "bought in past month" figure or any sales estimate in either API's docs.

Step 1: Install the client and get a token

pip install apify-client
Enter fullscreen mode Exit fullscreen mode

Sign up at apify.com, then copy your API token from Settings > API & Integrations. Keep it in an environment variable rather than in your code.

Step 2: Scrape Amazon search results by keyword

keywords takes a list. Each keyword returns up to maxResultsPerKeyword products (default 50, max 500). marketplace picks the store and defaults to com.

import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
ACTOR = "automly/amazon-products-scraper---fast-efficient-with-sales-data"

run = client.actor(ACTOR).call(run_input={
    "keywords": ["garlic press", "yoga mat"],
    "maxResultsPerKeyword": 100,
    "marketplace": "com",
})
Enter fullscreen mode Exit fullscreen mode

Each row keeps search_keyword, search_position and a sponsored flag, so you can see where a product sits in the results as well as what it is.

Step 3: Scrape Amazon prices by ASIN

If you already have product IDs, pass them in asins. Product links go in startUrls. You can mix all three inputs in one run.

run = client.actor(ACTOR).call(run_input={
    "asins": ["B0DJ28XG7Z", "B00HEZ888K", "B098WNQ44M"],
    "startUrls": [{"url": "https://www.amazon.com/dp/B09QBDRCRK"}],
    "marketplace": "com",
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["asin"], item["price"], item["list_price"], item["discount_percent"])
Enter fullscreen mode Exit fullscreen mode

Run that on a schedule and you have a basic Amazon price tracker.

Step 4: Read the output

One row per product. Here's a real one, shortened:

{
  "asin": "B0DJ28XG7Z",
  "url": "https://www.amazon.com/dp/B0DJ28XG7Z",
  "title": "Kitchen Garlic Press, Rust Proof & Dishwasher Safe Garlic Mincer...",
  "brand": "SRISE",
  "price": "$6.99",
  "list_price": "$7.99",
  "discount_percent": 13,
  "rating": 4.6,
  "review_count": 1478,
  "best_sellers_rank": [
    {"rank": 886, "category": "Kitchen & Dining"},
    {"rank": 3, "category": "Garlic Presses"}
  ],
  "bought_in_past_month": "3K+",
  "estimated_monthly_sales": 3149,
  "estimated_monthly_revenue": "$22,011.51",
  "availability": "In Stock",
  "is_prime": true,
  "badges": ["Amazon's Choice"],
  "search_keyword": "garlic press",
  "search_position": 2
}
Enter fullscreen mode Exit fullscreen mode

The full row also has the star breakdown, category path, bullet points, description, specs, variants with their own ASINs, images, coupon, seller, related ASINs and a scraped_at timestamp.

Step 5: Save to CSV

import csv

fields = ["asin", "title", "price", "rating", "review_count",
          "bought_in_past_month", "estimated_monthly_sales", "estimated_monthly_revenue"]

with open("amazon_products.csv", "w", newline="", encoding="utf-8") as f:
    writer = csv.DictWriter(f, fieldnames=fields + ["bsr"], extrasaction="ignore")
    writer.writeheader()
    for item in client.dataset(run["defaultDatasetId"]).iterate_items():
        top = item["best_sellers_rank"][0] if item.get("best_sellers_rank") else {}
        writer.writerow({**item, "bsr": top.get("rank")})
Enter fullscreen mode Exit fullscreen mode

If you prefer pandas, pd.DataFrame(client.dataset(run["defaultDatasetId"]).list_items().items) does the same in one line.

How far to trust the sales estimate

The monthly sales number is derived from the product's Best Sellers Rank, and revenue is units times the current price. I use it to compare products against each other and to size a niche, and that's where it's good. For a single product, real sales can be about 55% above or below it, so don't treat it as an exact figure.

Estimates exist on amazon.com, .co.uk, .de, .fr, .it, .es, .ca, .com.mx and .in, for most main categories. On the other stores you get every other field, just not the estimate. Products with no BSR, like brand-new listings, have none either.

What else can you scrape?

The same code works on 20 Amazon stores: set marketplace to co.uk, de, fr, it, es, ca, com.mx, in, com.br, co.jp, com.au, ae, sa, nl, se, pl, com.tr, sg or eg. Prices and text come back in that store's language and currency.

For other jobs there are three related scrapers: Amazon Search Scraper for keyword rank tracking, Amazon Best Sellers Scraper for the top 100 of any category, and Amazon Reviews Scraper for review text. The first two give you ASINs you can feed straight into Step 3.

Scaling

  • Raise maxResultsPerKeyword up to 500 and add more keywords.
  • Set "fullDetails": false when you only need what the search list shows (ASIN, title, price, rating, image, sponsored flag). It's much faster, but you lose BSR and the sales estimates.
  • Want every variant priced? Each row lists its variants' ASINs; pass them back in through asins.
  • For daily tracking, save your input as a task in Apify and attach a schedule. Set a maximum cost per run if you want a hard budget.

No-code option: the Apify Console

You don't have to write Python at all. Open the actor page, click Try for free, type your keywords or ASINs, pick a marketplace and click Start. When it finishes, download the results as CSV, Excel or JSON, or send them to Google Sheets.

What it costs

You pay $5.55 per 1,000 results on every Apify plan, plus a start fee of $0.05 per GB of memory (that's $0.10 per run at the default 2 GB) and the run's platform usage. Every Apify account gets $5 of free usage each month, which covers several hundred products. That's enough to test a niche or two before paying anything.

Responsible use

Stick to public product data and follow Amazon's terms. Some fields, like seller names, can count as personal data under GDPR or CCPA, so have a legitimate reason to collect them and check with a lawyer if you're unsure.

Links

If you want Amazon prices, ranks and sales estimates without building and maintaining your own scraper, try Amazon Scraper - Product Prices, BSR & Sales Estimates on Apify. If a field you need is missing, request it on the actor's Issues tab.

Top comments (0)