PyPI - Python 3.9+
Python SDK
A small, one-dependency client for product, search and async batch requests, with clear errors and webhook verification. Drop-in for FastAPI, Airflow, or any data pipeline.
Quick start
1. Install
pip install amazonscraperapi-sdk 2. Scrape your first ASIN
from amazonscraperapi import AmazonScraperAPI
asa = AmazonScraperAPI(api_key="asa_live_...")
product = asa.product(query="B09HN3Q81F", domain="com")
print(product["title"], product["price"], product["rating"])
# LEGEND COOKWARE 5-Ply Stainless Steel Cookware Set... 549.99 4.5 3. Reuse one client
# The client keeps one HTTP connection pool. Use it as a context manager
# in scripts so connections are closed when you are done.
with AmazonScraperAPI(api_key="asa_live_...") as asa:
for asin in ["B09HN3Q81F", "B0DFBVB6DD"]:
p = asa.product(query=asin, domain="com")
print(asin, p["price"], p["currency"]) How-to
Search Amazon
results = asa.search(
query="wireless earbuds",
domain="com",
sort_by="best_match",
start_page=1,
)
for p in results["products"]:
# Sponsored cards carry sponsored_position instead of organic_position.
print(p["organic_position"], p["asin"], p["title"], p["price"]) Bulk-scrape via async batch
asins = ["B09HN3Q81F", "B0DFBVB6DD"] # up to 1,000
batch = asa.create_batch(
endpoint="amazon.product",
items=[{"query": a, "domain": "com"} for a in asins],
webhook_url="https://your.app/webhook", # optional
)
# Save this now: the webhook signing secret is returned only once.
secret = batch.get("webhook_signature_secret")
# Poll until done (or wait for the webhook)
status = asa.get_batch(batch["id"])
print(status["status"], status["processed_count"], "/", status["total_count"]) Scrape across marketplaces
for tld in ("com", "co.uk", "de", "co.jp"):
p = asa.product(query="B08N5KWBKK", domain=tld)
print(tld, p["price"], p["currency"]) All 20 marketplaces supported. See /features for the full list.
Handle errors and retries
import time
from amazonscraperapi import AmazonScraperAPI, AmazonScraperAPIError
asa = AmazonScraperAPI(api_key="asa_live_...")
def product_with_retry(asin, attempts=3):
for i in range(attempts):
try:
return asa.product(query=asin, domain="com")
except AmazonScraperAPIError as e:
if e.code == "target_unreachable" and i < attempts - 1:
time.sleep(60) # not charged; Amazon blocked every internal retry
elif e.code == "RATE_LIMITED" and i < attempts - 1:
time.sleep(e.body["error"].get("retry_after_ms", 1000) / 1000)
else:
raise # e.status_code, e.code and e.body describe the failure The SDK does not retry on its own, so you decide the policy. Failed requests are never charged. See error codes for the full list.
Why use the SDK over raw HTTP?
Plain dict responses
Every call returns the API's JSON as a dict, about 55 fields per product. Easy to load into pandas, a database, or a queue.
Clear errors
A failed call raises `AmazonScraperAPIError` with `status_code`, `code` and the response `body`, so you can branch on `e.code`. Failures are never billed.
Async batch
`create_batch` queues up to 1,000 products or searches in one call; poll with `get_batch` or receive a webhook when it completes.
Webhook signature verification
`verify_webhook_signature(header, raw_body, secret)` checks the HMAC on batch callbacks so you never trust a forged request.
Sensible defaults
Your key and parameters are set for you, with a 120s timeout that covers the slowest successful scrapes. Override it with `timeout=`.
One dependency
Built on `httpx` and nothing else. Python 3.9+, works in scripts, notebooks, FastAPI and Airflow.
Official resources
- PyPI package - install via pip
- GitHub repo - source + issues + changelog
- Product API reference - every field returned
- Search API reference
- Async batch API reference
- How to scrape Amazon Products (full guide)
Pricing
Same rate across every integration. Monthly plans from $19 or pay-as-you-go at $0.90 per 1,000 successful requests. 1,000 free on signup.
Free
Forever free on signup
- check_circle1,000 requests / month
- check_circle50 concurrent requests
- check_circleAll 20 marketplaces
- check_circleFull dashboard + analytics
- check_circleTop-up at $0.90 / 1k
- check_circleCommunity support
Vibe
$0.70 / 1k effective
- check_circle27,000 requests / month
- check_circle100 concurrent requests
- check_circleAll endpoints + content-language
- check_circleCountry-matched residential IPs
- check_circlePer-API-key usage tracking
- check_circleTop-up at $0.90 / 1k
- check_circleEmail support (1 business day)
Pro
$0.60 / 1k effective
- check_circle82,000 requests / month
- check_circle200 concurrent requests
- check_circlePriority routing queue
- check_circleCountry-matched residential IPs
- check_circleTeam seats (up to 5)
- check_circleTop-up at $0.90 / 1k
- check_circleEmail + chat support
Custom
Flat $0.50 / 1k effective at every level
- check_circle200k - 4M+ requests / month
- check_circle300-1000+ concurrent requests
- check_circlePriority queue (highest)
- check_circlePremium proxy pool + SLA on request
- check_circleUnlimited team seats
- check_circleWire / invoice / annual PO
- check_circleDedicated Slack channel
Pay-as-you-go top-up
$0.90 / 1,000 successful requests
Available on every plan including Free. Top up any time when included credits run out. Only 2xx responses charged. Balance never expires.
Ship with Python today
1,000 free requests on signup. No credit card required.