Scrape product data from Amazon.com using Google Chrome

This tutorial will show you how to extract basic product details and pricing offered by different brands from Amazon.com using Web Scraper Chrome Extension. 

What data are we extracting from Amazon.com?

  1. Product Name
  2. Brand
  3. Category
  4. Category Breadcrumbs
  5. Rating
  6. Number of Reviews
  7. List Price
  8. Sales Price
  9. Product Description
  10. Product Specification

The annotated screenshot below shows the data fields we will be scraping:

how-to-scrape-amazon

how-to-scrape-amazon-product-data

how-to-scrape-product-details

Prerequisites

  • Google Chrome Browser – You will need to download the Chrome browser. The extension requires Chrome 49+.
  • Web Scraper Chrome Extension – The Web Scraper extension can be downloaded from the Chrome Web Store.  After downloading the extension you will see a spider icon in your browser toolbar.

If you don't like or want to code, the ScrapeHero Cloud is just right for you!

Skip the hassle of installing software, programming and maintaining the code. Run this scraper in the ScrapeHero Cloud within seconds

Run this in the Cloud for FREE
Deploy to ScrapeHero Cloud

Import the Amazon Scraper

After installation, right-click anywhere on a page, go to ‘Inspect’ and the developer tools console will pop up. Click on the tab Web Scraper and go on to the ‘Create new sitemap’ button and click on the ‘Import sitemap’ option. Then paste the JSON given below in the Sitemap JSON box. 

import-amazon-scraper

Here is the JSON below:

{  
   "_id":"amazon_products",
   "startUrl":[  
      "https://www.amazon.com/s?k=womens+watch&i=fashion-womens-watches&bbn=6358544011&rh=n%3A7147440011%2Cn%3A6358544011%2Cp_89%3AMichael+Kors%2Cp_72%3A2661618011%2Cp_36%3A2661614011&dc&qid=1559111542&rnid=2661611011&ref=sr_nr_p_36_2"
   ],
   "selectors":[  
      {  
         "id":"listing",
         "type":"SelectorLink",
         "parentSelectors":[  
            "_root",
            "pagination"
         ],
         "selector":".a-size-mini a",
         "multiple":true,
         "delay":0
      },
      {  
         "id":"pagination",
         "type":"SelectorLink",
         "parentSelectors":[  
            "_root",
            "pagination"
         ],
         "selector":".a-last a",
         "multiple":false,
         "delay":0
      },
      {  
         "id":"name",
         "type":"SelectorText",
         "parentSelectors":[  
            "listing"
         ],
         "selector":"span.a-size-large",
         "multiple":false,
         "regex":"",
         "delay":0
      },
      {  
         "id":"brand",
         "type":"SelectorText",
         "parentSelectors":[  
            "listing"
         ],
         "selector":"a#bylineInfo",
         "multiple":false,
         "regex":"",
         "delay":0
      },
      {  
         "id":"category",
         "type":"SelectorText",
         "parentSelectors":[  
            "listing"
         ],
         "selector":".a-horizontal li:nth-of-type(1) a",
         "multiple":false,
         "regex":"",
         "delay":0
      },
      {  
         "id":"category_breadcrumbs",
         "type":"SelectorGroup",
         "parentSelectors":[  
            "listing"
         ],
         "selector":".a-size-small a.a-link-normal",
         "delay":0,
         "extractAttribute":""
      },
      {  
         "id":"rating",
         "type":"SelectorText",
         "parentSelectors":[  
            "listing"
         ],
         "selector":"span.arp-rating-out-of-text",
         "multiple":false,
         "regex":"",
         "delay":0
      },
      {  
         "id":"review_count",
         "type":"SelectorText",
         "parentSelectors":[  
            "listing"
         ],
         "selector":"#averageCustomerReviews span.a-size-base",
         "multiple":false,
         "regex":"",
         "delay":0
      },
      {  
         "id":"list_price",
         "type":"SelectorText",
         "parentSelectors":[  
            "listing"
         ],
         "selector":"span.priceBlockStrikePriceString",
         "multiple":false,
         "regex":"",
         "delay":0
      },
      {  
         "id":"sales_price",
         "type":"SelectorText",
         "parentSelectors":[  
            "listing"
         ],
         "selector":"span.priceBlockBuyingPriceString",
         "multiple":false,
         "regex":"",
         "delay":0
      },
      {  
         "id":"product_description",
         "type":"SelectorText",
         "parentSelectors":[  
            "listing"
         ],
         "selector":"div#descriptionAndDetails",
         "multiple":false,
         "regex":"",
         "delay":0
      },
      {  
         "id":"product_specification",
         "type":"SelectorText",
         "parentSelectors":[  
            "listing"
         ],
         "selector":".a-keyvalue tbody",
         "multiple":false,
         "regex":"",
         "delay":0
      }
   ]
}

Obtaining the URL from Amazon.com

Amazon allows you to search for products that you can filter based on parameters like department, brand, and price. This scraper allows you to scrape data from Amazon based on your requirements, you can select the filters for which you need the data scraped and copy the corresponding URL. Here is how to obtain the URL:

  1. Go to the link to search for Amazon products – https://www.amazon.com
  2. Search for any product

Add this URL to the metadata by clicking on the sitemap drop-down and pasting the URL. In the Web Scraper toolbar, click on the Sitemap button and select the “Edit metadata’ option and paste the new URL (based on your filter) as the Start URL.

obtain-URL-for-amazon-scraper

This scraper will also work for URLs based on filters.

Run the Scraper

Go to the Sitemap and click ‘Scrape’ from the drop down. A new instance of Chrome will launch, enabling the extension to scroll and grab the data. Once the scrape is complete, the browser will close automatically and send a notification.

run-amazon-scraper

Download the Data

To download the scraped data as a CSV file that you can open in Microsoft Excel or Google Sheets, go to the Sitemap drop down > Export as CSV > Download Now.

We can help with your data or automation needs

Turn the Internet into meaningful, structured and usable data


Please DO NOT contact us for any help with our Tutorials and Code using this form or by calling us, instead please add a comment to the bottom of the tutorial page for help

Disclaimer: Any code provided in our tutorials is for illustration and learning purposes only. We are not responsible for how it is used and assume no liability for any detrimental usage of the source code. The mere presence of this code on our site does not imply that we encourage scraping or scrape the websites referenced in the code and accompanying tutorial. The tutorials only help illustrate the technique of programming web scrapers for popular internet websites. We are not obligated to provide any support for the code, however, if you add your questions in the comments section, we may periodically address them.

Posted in:   eCommerce Data Gathering Tutorials, Web Scraping Tutorials

Comments or Questions?

Turn the Internet into meaningful, structured and usable data   

Enjoying our Tutorials?

Subscribe to our weekly updates on the latest tutorials in Web Scraping and Data Extraction