Web Scraping Amazon.com Overview

2024-04-08

Amazon is one of the biggest e-commerce retailers in the world and a popular web scraping target.

Amazon is using its own proprietary web scraping protection mechanisms that are constantly evolving. This makes it difficult to scrape Amazon data reliably and this is where web scraping APIs come in handy.

Overall, most web scraping APIs we've tested through our benchmarks perform well for Amazon at $2.69 per 1,000 scrape requests on average.

Amazon.com scraping API benchmarks

Scrapeway runs weekly benchmarks for Amazon Products for the most popular web scraping APIs. Here's the table for this week:

Service Success % Speed Cost $/1000
1
100%
=
3.9s
+0.8
$0.69
+0.54
2
100%
=
4.1s
+0.1
$2.45
=
3
100%
=
5.5s
-0.8
$2.76
=
4
96%
-3
3.9s
-0.5
$2.69
+=
5
94%
-5
6.8s
+0.1
$3.27
=
6
81%
-13
3.3s
-0.5
$2.2
+0.02
7
10%
-2
9.0s
-0.5
$4.75
=
Data range Dec 13 - Dec 20

How to scrape amazon.com?

Amazon is relatively easy to scrape as it's mostly static content with a few dynamic elements so headless browser use is not required.

That being said, Amazon has a lot of anti-scraping mechanisms in place, so it's recommended to use a reliable web scraping service that can bypass the constantly changing anti-scraping measures. See benchmarks for the most up-to-date results.

Here's an example Amazon web scraper using Python and each web scraping API service implementation:

Amazon.com scraper
from parsel import Selector
# install using `pip install scrapfly-sdk`
from scrapfly import ScrapflyClient, ScrapeConfig, ScrapeApiResponse

# create an API client instance
client = ScrapflyClient(key="YOUR API KEY")

# create scrape function that returns HTML parser for a given URL
def scrape(url: str, country: str="", render_js=False, headers: dict=None) -> Selector:
    api_result = client.scrape(ScrapeConfig(
        url=url, 
        asp=True,
        country='US',
        ))
    return api_result.selector

url = "https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/"
selector = scrape(url)
data = {
    "url": url,
    "name": selector.css("#productTitle::text").get("").strip(),
    "asin": selector.css("input[name=ASIN]::attr(value)").get("").strip(),
    "price": selector.css('span.a-price ::text').get(),
    # ...
}

from pprint import pprint
pprint(data)
{
  'asin': 'B0B92489PD',
  'name': 'Amazon Kindle – The lightest and most compact Kindle, with extended '
          'battery life, adjustable front light, and 16 GB storage – Without '
          'Lockscreen Ads – Black',
  'price': '$99.99',
  'url': 'https://www.amazon.com/kindle-the-lightest-and-most-compact-kindle/dp/B0B92489PD/'
}

As seen above, Amazon scraping in Python is relatively straight-forward using common Python tools for HTML parsing.

Join the Scrapeway newsletter!

Early benchmark reports and industry insights every week!

Why scrape Amazon Products?

Amazon is a popular target for web scraping because it has a large amount of e-commerce data that can be used for various purposes, such as price monitoring, market research, and competitive analysis.

With price monitoring scraping we can keep track the product historic pricing data and take advantage of market fluctuations to make better purchasing decisions.

Market research scraping, and especially review scraping, can help us understand customer preferences through sentiment analysis, identify trends through statistics, and make informed decisions about product development and marketing strategies.

Amazon is also often scraped by Amazon sellers themselves to monitor competition and adjust their pricing strategy.

Finally, Amazon contains so much data that it can be used in AI and machine learning models to predict trends and make better business decisions.