A powerful Chrome extension that automatically scrapes Amazon product reviews and analyzes customer sentiment using AI. Perfect for market research, competitor analysis, and understanding customer feedback at scale.
- Multi-page Scraping: Automatically collects up to 25+ reviews across multiple pages
- Complete Product Data: Captures product name, price, ASIN, rating, and link
- Smart Navigation: Auto-detects and navigates to "See all reviews" pages
- AI-Powered Analysis: Sends reviews to your custom sentiment analysis API
- Review Details: Extracts rating, title, body, author, date, verified status, and helpful votes
- Persistent Storage: Saves product info before navigation to preserve pricing data
- Clean Data Extraction: Removes JavaScript, CSS, and formatting artifacts
- Beautiful UI: Modern, gradient-styled popup interface with loading states
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- Platform: Chrome Extension Manifest V3
- Storage: Chrome Storage API
- API Integration: RESTful API calls for sentiment analysis
-
Clone this repository:
git clone https://github.com/yourusername/amazon-review-sentiment-analyzer.git
-
Open Chrome and navigate to
chrome://extensions/ -
Enable "Developer mode" (toggle in top-right corner)
-
Click "Load unpacked" and select the extension directory
-
The extension icon should appear in your Chrome toolbar
Update the API endpoint in popup.js:
const API_ENDPOINT = 'http://localhost:3000/api/analyze-sentiment';Change this to your actual API URL when ready.
- Market Research: Analyze customer sentiment for products in your niche
- Competitor Analysis: Understand what customers love/hate about competitor products
- Product Development: Identify common pain points and feature requests
- E-commerce Strategy: Make data-driven decisions based on customer feedback
- Brand Monitoring: Track sentiment trends for your products over time
- Navigate to any Amazon product page
- Click the extension icon in your toolbar
- Click "Collect Reviews" button
- If on product page with limited reviews, click "Go to All Reviews Page"
- Wait for the extension to scrape reviews (5-10 seconds)
- Click "Analyze Sentiment" to send data to your API
- View the API response with sentiment analysis results
The extension sends the following JSON structure to your API:
{
"productName": "Product Name Here",
"productPrice": "$32.99",
"productLink": "https://www.amazon.com/dp/ASIN",
"productASIN": "B0CG6QBNSR",
"productRating": "4.5 out of 5 stars",
"reviews": [
{
"id": 1,
"rating": 5,
"title": "Great product!",
"body": "Review text here...",
"author": "John Doe",
"date": "December 20, 2025",
"isVerified": true,
"helpfulVotes": 10
}
],
"timestamp": "2024-12-20T10:30:00.000Z",
"totalReviews": 25
}amazon-review-sentiment-analyzer/
│
├── manifest.json # Extension configuration
├── content.js # Content script (scraping logic)
├── popup.html # Extension popup UI
├── popup.js # Popup logic and API calls
├── icon.png # Extension icon
├── README.md # Documentation
│
└── screenshots/ # UI screenshots
├── main-interface.png
└── reviews-collected.png
The extension automatically clicks through Amazon's pagination to collect exactly 25 reviews, handling:
- "Next page" button detection
- Page load waiting (3 seconds between pages)
- Safety limits (max 5 pages)
When navigating from product page to reviews page:
- Extension captures complete product info (including price)
- Saves to Chrome storage
- Retrieves on reviews page
- Ensures no data loss during navigation
Removes common Amazon artifacts:
- JavaScript code snippets
- CSS style blocks
- "Read more" / "Read less" text
- Extra whitespace and newlines
- amazon.com (United States)
- amazon.co.uk (United Kingdom)
- amazon.in (India)
- amazon.ca (Canada)
- Refresh the Amazon page after installing
- Check that you're on a product page with reviews
- Open Chrome DevTools (F12) and check Console for errors
- Make sure you're on the "See all reviews" page
- Some products may have fewer than 25 reviews available
- Check that pagination buttons are visible on the page
- Some Amazon pages hide prices (sign-in required, out of stock)
- Try refreshing the product page
- Check if you need to be logged into Amazon
Your backend API should:
- Accept POST requests at
/api/analyze-sentiment - Parse the JSON payload
- Perform sentiment analysis on review bodies
- Return structured JSON response
Example API response format:
{
"success": true,
"sentiment": {
"positive": 20,
"negative": 3,
"neutral": 2
},
"summary": "Overall positive sentiment"
}