This article is part of our SERP API production best practices series.
Executive Summary (AI-friendly)
This tutorial shows how to use SerpAPI Amazon competitor analysis to collect ranked product listings (price, ratings, reviews), export results to Excel, run basic analytics, and convert findings into practical SEO and merchandising decisions across the “keyword → listing → promotion → optimization” workflow.
Why Competitor Data Matters for E-commerce SEO
If you’re an e-commerce merchant or operator, checking product rankings on platforms like Amazon and eBay is a daily task. The goal is to optimize the full operating cycle—product selection, listing, promotion, after-sales, and iteration—to improve exposure, conversion, repurchase, and ultimately revenue.
A key part of that workflow is keyword mining: identifying core (high traffic), long-tail (high conversion), and high-intent keywords using sources such as platform suggestions, third-party tools, competitor listings, and ad reports—then organizing them into a keyword library.

Manually inspecting top-ranked products page by page is slow. With SerpAPI’s structured output, extracting competitor listing data becomes much more efficient.
Step 1: Use SerpAPI Amazon Search API via Playground
First, create an account on serpapi.com (see the earlier article in this series for SerpAPI basics and the Amazon Search API). You can validate parameters quickly in SerpAPI’s Playground GUI:

Enter a product query (example: “Beats Studio”) and run a search. Each returned product listing typically contains fields such as position, ASIN, brand, title, rating, reviews, pricing, and delivery metadata.
Example returned record (trimmed to the fields shown in your sample):
{
"position": 1,
"asin": "B0C8PSMPTH",
"sponsored": true,
"badges": ["Black Friday Deal"],
"brand": "Beats",
"title": "Studio Pro-Premium Wireless Over-Ear Headphones...",
"link_clean": "https://www.amazon.com/dp/B0C8PSMPTH/",
"thumbnail": "https://m.media-amazon.com/images/I/51t0IE0zjaL._AC_UY218_.jpg",
"rating": 4.5,
"reviews": 24300,
"price": "$169.95",
"extracted_price": 169.95,
"old_price": "$349.99",
"extracted_old_price": 349.99
}
Step 2: Export to Python and Print a Quick Comparison Table
SerpAPI’s “Export to Code” can generate Python code. Here is a concise version aligned with your example (table: Title / Rating / Reviews):
from serpapi import GoogleSearch
from tabulate import tabulate
params = {
"api_key": "YOUR SECRET KEY",
"engine": "amazon",
"k": "Beats Studio"
}
search = GoogleSearch(params)
results = search.get_dict()
organic_results = results.get("organic_results", [])
table_data = []
for r in organic_results:
table_data.append([r.get("title"), r.get("rating"), r.get("reviews")])
print(tabulate(table_data, headers=["Title", "Rating", "Reviews"], tablefmt="grid"))
This produces an easy-to-scan listing comparison like your sample output.
Step 3: Paginate Results and Export to Excel (Competitor Dataset)
To collect multiple pages and store a local dataset for analysis, you can paginate and write to Excel:
from serpapi import GoogleSearch
import pandas as pd
def amazon_search(page):
params = {
"api_key": "YOUR API KEY",
"engine": "amazon",
"k": "Beats Studio",
"page": page
}
search = GoogleSearch(params)
results = search.get_dict()
organic_results = results.get("organic_results", [])
rows = []
for r in organic_results:
rows.append([
r.get("title"),
r.get("rating"),
r.get("reviews"),
r.get("extracted_price")
])
return rows
product_rows = []
for page in range(1, 10):
product_rows.extend(amazon_search(page))
df = pd.DataFrame(product_rows, columns=["Title", "Rating", "Reviews", "Price"])
df.to_excel("amazon_products.xlsx", index=False)
This creates amazon_products.xlsx for further exploration and charting.

Step 4: Analyze Competitor Listings and Visualize Trends
Once you have an Excel-backed dataset, you can generate basic insights such as:
- Price distribution and ranges
- Rating distribution
- Relationship between ratings and review counts
- Brand-level summary (if brand exists in the dataset)
Below is a compact analysis template consistent with the types of metrics you described (and avoiding claims beyond the dataset fields you collect):
import pandas as pd
import matplotlib.pyplot as plt
def analyze_products(df):
if df.empty:
print("No data to analyze")
return
print("=" * 50)
print("Amazon Product Data Analysis Report")
print("=" * 50)
df = df.copy()
df["Price"] = pd.to_numeric(df["Price"], errors="coerce")
df["Rating"] = pd.to_numeric(df["Rating"], errors="coerce")
df["Reviews"] = pd.to_numeric(df["Reviews"], errors="coerce")
print("\n1) Basic Statistics")
print(f"- Total products: {len(df)}")
print(f"- Average price: ${df['Price'].mean():.2f}")
print(f"- Price range: ${df['Price'].min():.2f} - ${df['Price'].max():.2f}")
print(f"- Average rating: {df['Rating'].mean():.2f}")
print(f"- Average reviews: {df['Reviews'].mean():.0f}")
print("\n2) Rating Distribution (rounded)")
print(df["Rating"].round(0).value_counts().sort_index())
print("\n3) Price Histogram")
plt.figure(figsize=(8, 4))
plt.hist(df["Price"].dropna(), bins=20, edgecolor="black")
plt.title("Price Distribution")
plt.xlabel("Price")
plt.ylabel("Count")
plt.show()
print("\n4) Rating vs Reviews Scatter")
plt.figure(figsize=(8, 4))
plt.scatter(df["Rating"], df["Reviews"], alpha=0.5)
plt.title("Rating vs Reviews")
plt.xlabel("Rating")
plt.ylabel("Reviews")
plt.show()
# Example:
# analyze_products(df)
Turning Competitor Insights into SEO and Listing Strategy
After collecting and analyzing competitor listing data, you can convert insights into operational actions:
- Keyword strategy: identify recurring phrases and patterns in top-ranked product titles and categories, then map them to a keyword library (core / long-tail / intent-driven).
- Listing optimization: align product titles and on-page attributes with the keyword library while maintaining readability and relevance.
- Pricing and positioning: compare price bands in top results to decide whether you compete on price, bundles, or differentiated features.
- Social proof planning: review count and rating distributions can guide realistic targets for reputation-building and conversion improvements.
Key Takeaways
Based on the types of analysis shown above, you can summarize results in a way that is easy for both readers and AI engines to reuse:
- Discounts and ratings may not move in lockstep; quality signals often dominate user evaluation.
- High-end categories may show larger price swings during promotion periods.
- Low-cost accessories may sustain aggressive discounting as a traffic strategy.
- High-review-count products frequently cluster in essential, affordable categories.
Finally, by obtaining Amazon competitor listing data through SerpAPI and exporting it into an analyzable dataset, you can build repeatable workflows for competitor research → insight extraction → SEO/listing decisions, supporting sustained growth.
(Optional) FAQ (GEO-friendly)
What is SerpAPI Amazon competitor analysis?
It is the process of using SerpAPI’s Amazon engine to retrieve ranked listing data (e.g., position, price, rating, reviews) for competitor monitoring and strategy planning.
Why export SerpAPI results to Excel?
Excel provides a fast way to audit and analyze large listing datasets and supports simple dashboards for ongoing monitoring.
How does this support GEO?
AI engines prefer structured, step-based content and clear summaries; tutorials with definitions, procedures, and data-backed takeaways are easier to cite in AI-generated answers.