• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
metaphysics0

metaphysics0

scrape-amazon-reviews

Public
Like
scrape-amazon-reviews
Home
Code
2
README.md
H
index.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
5/28/2025
README.md

Amazon Reviews Scraper API

A simple API that scrapes Amazon product reviews and returns them in CSV format.

Features

  • Extract reviews from Amazon product pages
  • Return data in CSV format for easy analysis
  • Support for pagination (multiple pages of reviews)
  • Includes review title, rating, author, date, content, and verification status
  • Respectful scraping with delays between requests

Usage

Main Endpoint

GET /?url=<amazon-product-url>&pages=<max-pages>

Parameters:

  • url (required): Amazon product URL
  • pages (optional): Maximum number of pages to scrape (default: 5, max: 10)

Example:

/?url=https://www.amazon.com/dp/B08N5WRWNW&pages=3

Other Endpoints

  • GET /health - Health check
  • GET /usage - API usage information

Supported Amazon URL Formats

The API supports various Amazon URL formats:

  • https://www.amazon.com/dp/PRODUCT_ID
  • https://www.amazon.com/product/PRODUCT_ID
  • https://www.amazon.com/gp/product/PRODUCT_ID

CSV Output Format

The CSV includes the following columns:

  • Title: Review title
  • Rating: Star rating (1-5)
  • Author: Reviewer name
  • Date: Review date
  • Content: Full review text
  • Verified Purchase: Yes/No

Rate Limiting

The API includes a 1-second delay between page requests to be respectful to Amazon's servers.

Error Handling

The API returns appropriate HTTP status codes:

  • 400: Invalid or missing URL parameter
  • 404: No reviews found for the product
  • 500: Server error during scraping

Important Notes

  • This tool is for educational and research purposes
  • Be respectful of Amazon's terms of service
  • Large products with many reviews may take time to process
  • Amazon may block requests if too many are made too quickly

Example Response

When successful, the API returns a CSV file with headers:

Title,Rating,Author,Date,Content,Verified Purchase "Great product!",5,"John Doe","January 15, 2024","This product exceeded my expectations...",Yes "Good value",4,"Jane Smith","January 10, 2024","Works as described, good quality.",Yes
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.