Amazon Review Scraper is a simple and effective tool designed to extract user reviews from any Amazon product page. Built using Python and Jupyter Notebook, this project enables you to collect, analyze, and visualize customer feedback for research, sentiment analysis, market study, or personal reference.
- Scrape Reviews: Extract all available reviews from an Amazon product page.
- Easy to Use: Just provide the product URL and run the notebook.
- Customizable: Modify the number of reviews to scrape, or filter by review rating.
- Output Options: Save scraped reviews to CSV, Excel, or display them directly in the notebook.
- Suitable for Analysis: Use the collected data for sentiment analysis, word cloud generation, and other data science applications.
- Input: You provide the Amazon product URL in the notebook.
- Scraping: The notebook uses requests and BeautifulSoup (or Selenium if required) to collect reviews from the product page.
- Data Extraction: Information such as review title, rating, date, reviewer name, and review text is extracted.
- Export or Visualize: All reviews are saved to a DataFrame, which you can export or analyze further.
- Python 3.x
- Jupyter Notebook
- Required Python libraries:
- requests
- BeautifulSoup4
- pandas
- (Optional) selenium
To install dependencies, run:
pip install requests beautifulsoup4 pandas selenium
-
Clone the repository
git clone https://github.com/pranavrbm/Amazon-review-scraping.git cd Amazon-review-scraping
-
Open Jupyter Notebook
jupyter notebook
Open the provided notebook (e.g.,
amazon_review_scraper.ipynb
). -
Enter the Amazon Product URL
- Find the cell where you input the product URL.
- Paste the desired Amazon product link.
-
Run the Notebook
- Execute all cells to start scraping.
- Scraped reviews will be displayed in a table and optionally saved to a file.
product_url = "https://www.amazon.com/dp/B09G9F5C1T" # Example product
Run the notebook to extract reviews for this product.
- Ethical Use: Scraping Amazon must comply with their terms of service. This tool is for educational and personal research purposes only.
- Limitations: Amazon may block automated requests or change its HTML structure, which may require updates to the scraper.
- Captcha/Blocks: For large-scale scraping, you may encounter captchas or blocks. Using Selenium or rotating proxies can help.
- Localization: The script is designed for the .com domain but can be adapted for other Amazon country sites.
You can modify the notebook to:
- Scrape more pages of reviews.
- Filter reviews by star rating.
- Perform sentiment analysis or generate word clouds.
This project is released under the MIT License.
Amazon Review Scraper helps you quickly collect and analyze customer feedback for any Amazon product. Perfect for research, marketing, or personal insight!