Amazon's product API is closed to most developers. PA-API 5 is deprecated, and its successor, the Creators API, signs up only Amazon Associates who have already referred qualified sales. If you want prices, ratings and ranks without an affiliate business, you read Amazon's public search and product pages. Our API does that and returns JSON.
What Amazon's API is for
Amazon's product APIs exist to let Associates advertise Amazon products. The Creators API sign-up page says you need final acceptance into the Associates Program and referred qualified sales first, and only the account's primary owner can register. The PA-API docs now redirect to a deprecation notice. If you run an affiliate site with sales, that is the route; for price research or a catalog tool, it isn't.
Amazon data with ToolzerHub
We make ToolzerHub. Our Amazon API has five routes, each 1 credit a call with the x-api-key header:
/v1/amazon/search: one page of results, withmin_price,max_priceandsort/v1/amazon/product: a product page by ASIN/v1/amazon/best-sellersand/v1/amazon/new-releases: by category/v1/amazon/categories: the Best Sellers category tree
Routes take market, a country code such as US for amazon.com, GB, DE or JP.
export TOOLZERHUB_API_KEY=your_key
curl -H "x-api-key: $TOOLZERHUB_API_KEY" \
"https://api.toolzerhub.com/v1/amazon/product?asin=B0DHCLP5JK&market=US"
Part of data for a single-serve coffee maker, with features, images and reviews cut:
{
"asin": "B0DHCLP5JK",
"title": "Tastyle Mini Single Serve Coffee Maker for K Cups and Grounds with Handle",
"price_value": 49.99,
"list_price_value": 49.99,
"availability": "In Stock",
"rating": 4.1,
"ratings_count": 3493,
"rating_distribution": { "1": 12, "2": 3, "3": 8, "4": 13, "5": 64 },
"bought_past_month": "3K+ bought in past month",
"sales_ranks": [
{ "rank": 7395, "category": "Home & Kitchen" },
{ "rank": 15, "category": "Single-Serve Brewers" }
],
"seller": { "sold_by": "Tastyle Flagship Store", "ships_from": "Amazon" }
}
rating_distribution is percent of ratings per star. bought_past_month is Amazon's own rounded label, not a count.
Research a product keyword
The script searches each keyword, writes every result with price, list price, rating, rating count, monthly-bought label and sponsored flag, and opens the product page of the top three organic results for the seller and Best Sellers rank. Install requests (pip install requests) and save it as amazon_research.py.
import csv
import os
import statistics
import sys
import time
import requests
API = "https://api.toolzerhub.com/v1/amazon"
HEADERS = {"x-api-key": os.environ.get("TOOLZERHUB_API_KEY", "")}
FIELDS = ["query", "position", "asin", "title", "price", "list_price", "rating", "ratings_count",
"bought_past_month", "sponsored", "sold_by", "ships_from", "best_sellers_rank", "url"]
def get(op, params, tries=3):
# Retry rate limits, server errors and dropped connections.
for attempt in range(tries):
last = attempt == tries - 1
try:
r = requests.get(f"{API}/{op}", headers=HEADERS, params=params, timeout=90)
except requests.RequestException:
if last:
raise
time.sleep(5 * (attempt + 1))
continue
if r.status_code in (429, 500, 502, 503, 504) and not last:
time.sleep(5 * (attempt + 1))
continue
r.raise_for_status()
return r.json()["data"]
def main(queries, market="US", details="3", out="amazon_research.csv"):
with open(out, "w", newline="", encoding="utf-8-sig") as f:
writer = csv.DictWriter(f, fieldnames=FIELDS)
writer.writeheader()
for query in filter(None, (q.strip() for q in queries.split(","))):
search = get("search", {"query": query, "market": market}) or {"products": []}
organic = 0
for p in search["products"]:
row = {k: p.get(k) for k in ("position", "asin", "title", "rating", "ratings_count",
"bought_past_month", "sponsored", "url")}
row.update(query=query, price=p.get("price_value"), list_price=p.get("list_price_value"))
if not p["sponsored"] and organic < int(details):
# The product page adds the seller and the Best Sellers rank.
organic += 1
page = get("product", {"asin": p["asin"], "market": market}) or {}
seller = page.get("seller") or {}
ranks = page.get("sales_ranks") or []
row.update(sold_by=seller.get("sold_by"), ships_from=seller.get("ships_from"),
best_sellers_rank="; ".join(f"#{r['rank']} in {r['category']}" for r in ranks))
writer.writerow(row)
products = search["products"]
sponsored = sum(p["sponsored"] for p in products)
prices = [p["price_value"] for p in products if p.get("price_value")]
median = statistics.median(prices) if prices else None
print(f"{query}: {len(products)} results, {sponsored} sponsored, median price {median}")
if __name__ == "__main__":
if len(sys.argv) < 2:
sys.exit('usage: python amazon_research.py "coffee maker,air fryer" [market] [details per query] [out.csv]')
if not HEADERS["x-api-key"]:
sys.exit("set TOOLZERHUB_API_KEY first")
main(*sys.argv[1:])
What 5 keywords showed
python amazon_research.py "coffee maker,standing desk,protein powder,running shoes,dog food" US 3 made 20 calls in 81 seconds and wrote 300 rows: 5 searches and 15 product pages.
Every page had 60 results, and on every page the same 12 slots were sponsored: positions 1 to 4, 11 to 14 and 19 to 22. The first organic result was fifth. Page size varies between calls, so count sponsored per page rather than assume the layout.
| Keyword | Results | Sponsored | Median price | Shown below list price |
|---|---|---|---|---|
| Coffee maker | 60 | 12 | $89.99 | 26 |
| Standing desk | 60 | 12 | $162.40 | 38 |
| Running shoes | 60 | 12 | $63.95 | 42 |
| Protein powder | 60 | 12 | $57.16 | 0 |
| Dog food | 60 | 12 | $42.19 | 2 |
Amazon itself sold 11 of the 15 top organic products. All three standing desks came from third-party sellers shipping through Amazon. The three protein powders were Optimum Nutrition Gold Standard Whey, two sizes of the chocolate flavour and one vanilla, and all showed the same Best Sellers ranks; the two chocolate sizes also shared 100,971 ratings. Variations of one listing share ranks and ratings, so group them before you compare products.
What it costs
A keyword with three product pages is 4 credits, so tracking 25 keywords weekly is about 430 credits a month. The 100 free credits a month cover a first pass on 25 keywords; $19 buys 10,000 credits that never expire, and plans for higher volume cover daily tracking. Set your key and your first keyword is a CSV in under a minute.
For other marketplaces, see the Shopify products.json guide and the Ozon price parser.
We are not affiliated with Amazon.