Skip to main content
All CollectionsAPIs
Tutorial: How to scrape Amazon reviews?
Tutorial: How to scrape Amazon reviews?

A tutorial to hep you get started with scraping Amazon reviews

Raunaq Singh avatar
Written by Raunaq Singh
Updated over 2 weeks ago

Unwrangle's Amazon Reviews API offers a couple of ways in which you can scrape reviews from Amazon.

⚠️ In November 2024, Amazon blocked access to the reviews page for users who are not logged-in.

πŸ†• This rendered our Amazon Reviews Scraper non-operational but we've updated our Amazon Reviews API to work around this restriction in a couple of ways so that you can continue extracting customer reviews from Amazon

We have 3 options to scrape customers reviews from Amazon using Unwrangle:

⚑️ Get the 8 Most Recent Reviews

This is the simplest option of the 3 and is the right choice if you're only looking to keep track of the most recent reviews on a regular basis.

To get the 8 most recent reviews for any product on Amazon, simply make a GET request to our Amazon Reviews API with the value of its URL assigned to the query parameter url and you will get a response within a few seconds.

To illustrate this here's how the request would look, were you to scrape the most recent reviews for this product.

https://data.unwrangle.com/api/getter/?platform=amazon_reviews&url=https%3A%2F%2Fwww.amazon.de%2F-%2Fen%2FWH-1000XM4-Bluetooth-Cancelling-Headphones-Microphone-black%2Fdp%2FB08C7KG5LP&api_key=<your_api_key_goes_here>

A simple GET request to the above URL will give you the 8 most recent reviews in a structured JSON format with all fields visible on the page, including variant information, review images and videos (if present).

πŸ” Get All (As Many as Possible) Reviews

If your aim is to get the maximum number of reviews for your products on Amazon then here's how you can do it with our Amazon Reviews API:

How many reviews can we get? Well, let's see. While Amazon does not restrict logged-in users from viewing the reviews pages, we can only navigate up to page 10 of the customer reviews pages. This means we can get up to 100 reviews if we loop over each page (each page has up to 10 reviews). Now, if we do this for every filter and sorting option we can aim to gather approx. 500 or so reviews for a product β€” a few more or less depending on the number of duplicates we get when we loop 10 pages for each filter and sort option.

To work around Amazon's restriction β€” blocking access to the reviews page for visitors who are not logged β€” we have added support for authenticated requests.

A few things you need to know:

Using your cookie

You can use the cookie string for your own Amazon account as a query parameter named cookie with the Amazon Reviews API to scrape reviews from the reviews pages.

Here's a guide you can use to copy the cookie string for your Amazon account.

Looping over filters & sort options

Our API has support for sorting and filter options in sync with the options Amazon offers shoppers to navigate and read the reviews.

So it's possible for us to filter reviews by:

  1. Their star value using the query parameter filter_by_star (one_star to all_stars), their sentiment (positive or negative).

  2. Their media type i.e. whether they are text-only reviews or if they have images and / or videos using the query parameter media_type (all_content or media_reviews_only).

And we can sort them as well using the query parameter sort_by which has 2 possible values recent or helpful.

The docs page has detailed info on the supported query params and possible values and defaults.

Here's how we can use the filter and sort option to make a request to get the most recent reviews "with media" i.e. images or videos posted by users:

https://data.unwrangle.com/api/getter/?platform=amazon_reviews&url=https%3A%2F%2Fwww.amazon.de%2F-%2Fen%2FWH-1000XM4-Bluetooth-Cancelling-Headphones-Microphone-black%2Fdp%2FB08C7KG5LP&page=1&sort_by=recent&media_type=media_reviews_only&filter_by_star=negative&cookie=<your_cookie_goes_here>&api_key=<your_api_key_goes_here>

So if we were to loop over each filter and sort type and concatenate the reviews in each response and get rid of the duplicates, we will then have all the unique reviews we can possible get given the limitations Amazon has on their site.

πŸ§‘πŸ»β€πŸ« We've written a script that uses the Amazon Reviews API to fetch all the reviews for a product as described above. Follow this link to get started.

πŸ” Get 8 Top Reviews

Lastly, there's 1 other place where Amazon display's reviews that we've missed. If you'd like to collect the top reviews for your product that are visible on the product listing page, you can get them as well using the Amazon Product Data API β€” the response includes the top reviews as well as the review aspects and their sentiments.

Here's what a simple request with the Amazon Product Data API looks like:

https://data.unwrangle.com/api/getter/?platform=amazon_detail&url=https%3A%2F%2Fwww.amazon.de%2F-%2Fen%2FWH-1000XM4-Bluetooth-Cancelling-Headphones-Microphone-black%2Fdp%2FB08C7KG5LP&api_key=<your_api_key_goes_here>

The response has the top reviews in field top_reviews.

πŸͺ™ How many credits do you need?

Okay, that was all good! Now we know how we can scrape customer reviews from Amazon β€” the most recent, all or only the top reviews.

It's pretty straightforward huh? That's our goal!

Currently, each request to the Amazon Reviews API costs 1 credit.

So with the $99 plan you get 100k requests which translates to approximately 1 million reviews.

This makes Unwrangle the most effective and easiest way to scrape reviews from Amazon.

Please note that we recently dropped the credit cost for this API from 10 credits per request to 1 credit per request. Th reduction in credit cost for this API is an experiment and is subject to change in future.

Did this answer your question?