Official Python client for Amazon Scraper API (https://amazonscraperapi.com)
Project description
amazonscraperapi — Python SDK
Official Python client for Amazon Scraper API.
pip install amazonscraperapi
Usage
from amazonscraperapi import AmazonScraperAPI
client = AmazonScraperAPI(api_key="asa_live_...")
# Single product
product = client.product(query="B09HN3Q81F", domain="com")
print(product["title"], product["price"])
# Search
results = client.search(query="wireless headphones", domain="co.uk", sort_by="avg_customer_review")
# Async batch with webhook
batch = client.create_batch(
endpoint="amazon.product",
items=[
{"query": "B09HN3Q81F", "domain": "com"},
{"query": "B000ALVUM6", "domain": "de", "language": "de_DE"},
],
webhook_url="https://your.server/webhooks/asa",
)
print("batch id:", batch["id"])
# Save this — only returned once:
print("webhook secret:", batch["webhook_signature_secret"])
Verifying webhooks
from amazonscraperapi import verify_webhook_signature
from flask import request
@app.route("/webhooks/asa", methods=["POST"])
def webhook():
sig = request.headers.get("X-ASA-Signature")
if not verify_webhook_signature(sig, request.get_data(), WEBHOOK_SECRET):
return "invalid signature", 401
payload = request.get_json()
# ... process payload
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amazonscraperapi_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: amazonscraperapi_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65f4a522c093ca899557ed476025f8131fe87f8e146973bd343eff95bd73ff36
|
|
| MD5 |
b12ba7026438fbaf3230b46f81d7543e
|
|
| BLAKE2b-256 |
1524c3609785e1d16fa985a1f63db3cde3d4900e11423b68cc0d1d6a87883fab
|