Start free

How to scrape Amazon

Extract Amazon product titles, prices, ratings and reviews as clean JSON with a schema instead of selectors. Handles dynamic pricing and layout changes.

Site:
amazon.com
Difficulty:
Hard
Rendering:
JavaScript-rendered
Anti-bot:
Rate limiting, CAPTCHA, Bot detection

What you can extract from Amazon

These are the fields teams most often pull from amazon.com, and why a hand-written selector for each one tends to break over time.

Field Type Why selectors break
title string The product title element ID changes between the standard, mobile and A/B-test layouts, so a single CSS selector silently returns null on a meaningful share of pages.
price string Price is split across several spans (whole, fraction, symbol) and is often injected by JavaScript after load, so naive selectors grab an empty node or the wrong currency.
rating number The star rating lives in an aria-label string like "4.3 out of 5 stars", forcing brittle regex parsing that breaks the moment Amazon localizes the copy.
review_count number Review counts are formatted with locale-specific thousands separators and sometimes abbreviated, so the same selector returns "1,234", "1.234" or "1.2K" depending on the visitor.
availability string Availability text moves between several containers depending on whether the item ships from Amazon, a third party, or is out of stock, defeating a fixed selector.

The schema-first approach

Instead of maintaining selectors, you hand Extracto a JSON schema describing the shape you want. Here is a schema that works for Amazon:

{
  "title": "string",
  "price": "string",
  "currency": "string",
  "rating": "number",
  "review_count": "number",
  "availability": "string"
}
  1. 1

    Describe the Amazon fields you want

    Write a small JSON schema listing the fields to pull from amazon.com (for example title, price, rating). No CSS selectors or XPath needed.

  2. 2

    Send the URL and schema to Extracto

    POST the Amazon page URL and your schema to the Extracto API. Extracto renders the page in a real browser, handling JavaScript and dynamic content automatically.

  3. 3

    Get schema-validated JSON back

    Extracto returns JSON that matches your schema exactly, validated before it leaves the API, so your pipeline never receives broken or partial data.

Common pitfalls when scraping Amazon

Is it legal to scrape Amazon?

Amazon's Conditions of Use restrict automated access, and product pages are served differently by region, account state and A/B test bucket. Scraping publicly visible product data (price, title, rating) is generally lower risk than collecting personal data from reviews, but Amazon actively rate-limits and challenges automated traffic. Stay on public, non-authenticated pages, respect robots.txt, keep request volume modest, and never resell raw review text that contains personal information. When in doubt, the official Amazon Product Advertising API is the sanctioned path for catalog data.

Extracto follows robots.txt by default and rate-limits politely. You are responsible for compliance with Amazon's terms and applicable law (GDPR, CCPA) in your use case.

Scraping Amazon: FAQ

Can I scrape Amazon prices legally?
Publicly displayed prices are facts, and extracting them for personal price monitoring is generally lower risk than collecting personal data. However, Amazon's terms restrict automated access, so keep volume modest, avoid authenticated pages, and consult the official Product Advertising API for sanctioned, large-scale catalog access.
Why does my Amazon scraper return empty prices?
Amazon injects prices with JavaScript after the initial HTML loads, so a plain HTTP request sees an empty price node. You need a real browser that executes JavaScript before reading the DOM, which is what Extracto does automatically before applying your schema.
How do I avoid getting blocked while scraping Amazon?
Keep request rates low, vary timing, avoid scraping while logged in, and stop on the first CAPTCHA rather than retrying in a loop. Extracto handles rendering and polite request behaviour for you, but no tool can make unlimited high-frequency scraping invisible.
What is the most reliable way to extract Amazon review data?
Treat review text as potentially personal data and avoid storing reviewer identities. For aggregate signals like average rating and review count, a schema with a number type is far more robust than parsing star widgets, because Extracto reads the underlying value rather than the visual markup.
How often do Amazon product pages change layout?
Amazon runs continuous layout experiments, so the exact markup of a product page can differ between two visitors on the same day and shifts again over weeks. This is why selector-based scrapers need constant upkeep, while a schema describes the data you want and stays stable as the presentation changes underneath it.