In this article, we’ll learn how to scrape Amazon prices and import Amazon data to Google Sheets. We can scrape product details such as titles, images, prices, ratings, and reviews, find deals, and a bunch of other things. We can then easily compare products, keep track of market pricing trends, and keep an eye on competitors.
All these can be easily done with Amigo, a data integration and automation tool. We’ll use the Amigo add-on to scrape Amazon prices and automatically update the data.
Read on to learn how to import Amazon data to Google Sheets. But first, let us get familiar with the steps to scrape Amazon data.
- Install the Amigo extension in Google Sheets
- Get the API endpoint URL
- Pull the data to Google Sheets
How to import Amazon data to Google Sheets
Install the Amigo extension in Google Sheets
Install the Amigo Data Google Sheets add-on from the Google Workspace Marketplace to scrape Amazon prices and reviews and pull the data to Google Sheets.
Alternatively, you can get it from Google Sheets.
- Open Google Sheets
- Go to Extensions→Add-ons→Get add-ons
- Search for Amigo and install it.
Get the API endpoint
We’ll use a third-party Amazon API on RapidAPI to scrape data from Amazon such as prices and product reviews.
Go to the Amazon API documentation in RapidAPI. Or simply search for Amazon API in the RapidAPI Hub and click the top result.
Click on the Subscribe to Test button and subscribe to a plan of your choice, after which you’ll be able to use the API to scrape Amazon data and import Amazon data to Google Sheets.
Click Endpoints to go back to the API Playground. On the left is the list of the type of Amazon data we can scrape.
Click on any one of the headings. For example, Product to fetch Amazon product details such as price and deals.
We’ll use the /api/product/[productId] as an example to scrape Amazon prices along with other data such as the product URL, images, and discounts among other things.
Under Required Parameters, we need to fill in the Amazon product ID of the product whose details we want to scrape and pull the data to Google Sheets.
Note: The product ID in Amazon can be found in the URL of the product listing. The alphanumeric characters following /dp/ is the product ID.
The Optional parameters can be left blank. We can also use the productURL parameter in the Optional Parameters instead of using the productId in the Required Parameters to scrape the product data.
Paste the product listing URL in Amazon in the productURL field and set the productId to 0.
To view the Amazon data you want to scrape, click the Test Endpoint button. The result will be displayed in JSON format under the Results section on the right, if the parameters are valid.
The API endpoint URL along with the headers–which will be required to import Amazon data to Google Sheets–can be found in the Code Snippets section.
Change the language from Node.js (Axios) to Shell→cURL. Copy the URL and note also the headers.
Pull the data to Google Sheets
Open Google Sheets and launch Amigo to pull the data from Amazon to Google Sheets. To connect to Amigo, go to Extensions→Amigo: Data Exports and Reports→Connect.
We’ll be presented with a list of sources to connect and import data. Select Custom API.
Enter the endpoint URL (without the apostrophes) in the API URL field.
Then expand the Details tab and enter the headers. The headers can be found in the Code Snippets. The characters to the left of the colon are the header names and those to the right are the header values. Enter these as separate headers.
Header 1 Name: X-RapidAPI-Host, Value: amazon24.p.rapidapi.com Header 2 Name: X-RapidAPI-Key, Value: YOUR_API_KEY
Click the PREVIEW button. Flatten and expand the nested datasets and delete the columns that are not required. Then click IMPORT.
The data from Amazon will be imported into Google Sheets in a moment. Below is a snippet of the imported data.
Similarly, we can pull list of competitiors for a particular product, get reviews for a product, deals and so on.
Automatically scrape Amazon data
If you want to constantly keep watch of the products and the prices on Amazon but have no time or eyes to do it, you can simply set an automatic refresh schedule and Amigo Data will retrieve the latest data, update them to your Google Sheets and alert you via email. Learn how to set a refresh schedule.
Visit our blog to find out about the kinds of data that you can import to Google Sheets and many other useful–and also cool–things you can do with Amigo Data.
Some recommended articles:
Connect Amazon Marketplace to Google Sheets
How to Connect Shopify to Google Sheets