Beginner4 steps

How to Scrape Amazon Product Data

Amazon product pages render dynamically and include compatibility layers that block most simple scrapers. Extracting prices, ratings, and availability requires a reliable browser-rendering pipeline that handles these compatibility requirements automatically.

Step-by-Step Guide

1

Get your AlterLab API key

Sign up at alterlab.io and copy your API key from the dashboard. No credit card required to start.

2

Send the product URL to the API

POST the Amazon product URL to the /api/v1/scrape endpoint. AlterLab handles browser rendering and data extraction automatically.

3

Parse the returned HTML

Use a library like BeautifulSoup (Python) or Cheerio (Node.js) to parse the clean HTML response. Target CSS selectors for price, title, and rating elements.

4

Store and schedule recurring requests

Save the extracted data to your database and schedule repeat requests to track price changes over time.

Code Example

import requests

API_KEY = "YOUR_API_KEY"

response = requests.post(
    "https://alterlab.io/api/v1/scrape",
    headers={"X-API-Key": API_KEY, "Content-Type": "application/json"},
    json={
        "url": "https://www.amazon.com/dp/B09G3HRMVB",
        "render_js": True,
    },
)

html = response.json()["html"]
print(f"Status: {response.json()['status_code']}")

Replace YOUR_API_KEY with your key from the dashboard. No credit card required.

Ready to try it?

Run this tutorial on live websites with AlterLab's API. Start free — no credit card required.

Frequently Asked Questions

Responsible Use

AlterLab is designed for extracting publicly available data. Always review the terms of service for any website you access, respect robots.txt directives, and ensure your use case complies with applicable laws in your jurisdiction.

More tutorials

Browse all how-to guides for web scraping — from beginner extractions to advanced multi-page pipelines.

Your first scrape.
Sixty seconds.

$1 free balance. No credit card. No SDK.Just a POST request.

terminal
curl -X POST https://api.alterlab.io/v1/scrape \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "formats": ["markdown"]}'

No credit card required · Up to 5,000 free scrapes · Balance never expire

    How to Scrape Amazon Product Data | AlterLab | AlterLab