Prompt

How do I scrape Amazon product listings?

Latest observation

Jul 15, 2026 · OpenAI APIWeb search: off

Scraping Amazon product listings is generally not a good idea unless you’re very careful about legality, terms of service, and rate limits. Amazon actively blocks scraping and may ban IPs/accounts.

That said, here are the safer, legitimate options:

1) Use Amazon’s official APIs

If you need product data, this is the best route.

  • Amazon Product Advertising API (PA API)
    For affiliates and product information like title, images, price, availability, etc.
  • Amazon Selling Partner API (SP-API)
    For sellers with authorized access, inventory/order/catalog-related data.

These are more reliable and compliant than scraping.

2) If you still need to collect public page data

Make sure you:

  • Review Amazon’s Terms of Service and robots.txt
  • Only access pages you’re permitted to access
  • Use low request rates
  • Avoid bypassing CAPTCHAs, login walls, or anti-bot protections
  • Identify yourself appropriately in requests if allowed

3) General web-scraping approach for public listings

At a high level:

  1. Fetch the HTML of a search/results/product page
  2. Parse the page DOM
  3. Extract fields like:
    • product title
    • price
    • rating
    • review count
    • ASIN
    • image URL
  4. Store results in CSV/JSON

Example with Python requests + BeautifulSoup

This is a generic example for a public product page structure, not Amazon-specific selectors:

import requests
from bs4 import BeautifulSoup

url = "https://example.com/product-page"
headers = {
    "User-Agent": "Mozilla/5.0"
}

response = requests.get(url, headers=headers, timeout=20)
response.raise_for_status()

soup = BeautifulSoup(response.text, "html.parser")

title = soup.select_one(".product-title")
price = soup.select_one(".price")
rating = soup.select_one(".rating")

print({
    "title": title.get_text(strip=True) if title else None,
    "price": price.get_text(strip=True) if price else None,
    "rating": rating.get_text(strip=True) if rating else None,
})

4) If the site is JS-rendered

Use a browser automation tool like:

  • Playwright
  • Selenium

Again, only where permitted.

5) Best practices

  • Cache pages
  • Respect robots.txt
  • Add delays
  • Retry gently
  • Store only what you need
  • Monitor for layout changes

If you want, I can help with one of these:

  1. Using Amazon’s official Product Advertising API
  2. Writing a generic scraper for a public ecommerce site
  3. Parsing Amazon HTML you already have, without bypassing protections

Observation history

Unlock observation history

Create a free Obsurfable account to unlock historical responses, model comparisons, and deeper brand intelligence.

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, and Meta AI.