{"repo":"oxylabs/how-to-scrape-amazon-product-data","free":true,"listed":false,"github":"https://github.com/oxylabs/how-to-scrape-amazon-product-data","clone":"git clone https://github.com/oxylabs/how-to-scrape-amazon-product-data.git","description":"The process of extracting product data from Amazon using Python, including titles, ratings, prices, images, and descriptions.","language":null,"stars":3171,"topics":["amazon","amazon-scraper","python","web-scraper","web-scraping","web-scraping-python"],"license":null,"category":"scrapers-browser-automation","readme_excerpt":"Scraping Amazon Product Data With Python You can find an extended version of this guide on our blog. This guide uses Python to scrape the following data points from Amazon: - Product name - Product rating - Product price - Product images - Product description Contents - Setting up + Installing packages - Scraping product data + 1. Sending a GET request with custom headers + 2. Locating and scraping product name + 3. Locating and scraping product rating + 4. Locating and scraping product price + 5. Locating and scraping product image + 6. Locating and scraping product description + 7. Handling product listing + 8. Exporting scraped product data to a CSV file - Reviewing the final script - An easier solution to extract Amazon data + Scraping products from search results + Extracting product details + Scraping products by ASIN Setting up Create a folder to save your code files. Also, creating a virtual environment is generally a good practice. The following commands work on macOS and Linux. The commands will create a virtual environment and activate it: If you are on Windows, these commands will vary a little: Installing packages For Windows, use Python instead of Python3: To try the Requests library, create a new file with the name amazon.py and enter the following: Save the file and run it from the terminal: In most cases, you cannot view the desired HTML. Amazon will block this request, and you will see the following text in the response: If you print the response.status code","default_branch":null,"files":null,"tree":[],"storefront":"/r/oxylabs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/oxylabs/how-to-scrape-amazon-product-data/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}