Author: Leo, Technical Lead at Pangolinfo
Tags:amazonpythonapimcpweb-scrapingdata-analysis
Reading time: ~12 minutes
TL;DR
This tutorial walks through building a complete Amazon competitor research system using Python and the Pangolinfo API. You'll learn the 5-step IBADM framework (Identify → Baseline → Analyze → Differentiate → Monitor) and get production-ready code you can run today. We'll also cover how to use the Amazon Data MCP for no-code competitor analysis.
- Amazon Scraper API:
Why This Matters
If you've ever done Amazon competitor research manually, you know the pain:
3-4 hours per competitor to do a thorough analysis
Estimated data with 20-50% error from third-party tools
No continuous monitoring — you get a snapshot, not a stream
Poor SP ad coverage — manual browsing catches maybe 50-70% of sponsored placements
I've spent five years at Pangolinfo building data infrastructure for Amazon sellers. This article is the system I wish I had when I started. Everything here is battle-tested in production.
The IBADM Framework
Before we write code, let's define the framework. Good competitor research follows five steps:
Identify → Baseline → Analyze → Differentiate → Monitor
Identify: Find all ASINs competing for your keywords (organic + sponsored)
Baseline: Capture current state of all competitors simultaneously
Analyze: Break down listing structure, keyword strategy, review patterns
Differentiate: Find gaps — competitor weaknesses are your opportunities
Monitor: Track changes continuously, get alerted on significant shifts
Each step maps to specific API calls. Let's build it.
Setup
pip install requests pandas schedule
import requests
import pandas as pd
import json
import time
from datetime import datetime
from typing import List, Dict
from concurrent.futures import ThreadPoolExecutor
Step 0: API Client
First, let's build a clean API client. Get your API key from .
What is MCP?
MCP (Model Context Protocol) is a protocol that lets AI models call external tools. Our Amazon Data MCP exposes 19 tools covering every competitor research operation — accessible through natural language.
Setup
Add this to your AI assistant's config (e.g., claude_desktop_config.json):
{
"mcpServers": {
"amazon-data": {
"url": "https://mcp.pangolinfo.com/amazon-data-mcp",
"transport": "http"
}
}
}
Remote HTTP. Zero installation. No Python, no dependencies.
Usage
Just type natural language:
"Pull the price and BSR for these 5 ASINs: B0xxx, B0yyy, B0zzz,
B0aaa, B0bbb. Compare them in a table and highlight which one
has the best price-to-rating ratio."
The AI calls the right MCP tools, pulls the data, and returns a formatted analysis. The 19 tools cover:
| Category | Tools |
|---|---|
| Identify | search_products, get_sponsored_ads, get_category_bestsellers |
| Baseline | get_product_detail, get_variants, get_bsr_history, get_listing_content |
| Analyze | get_keyword_ranking, get_reviews, get_qa, analyze_review_sentiment, get_price_history |
| Differentiate | compare_products, find_keyword_gap, analyze_competitor_weakness |
| Monitor | create_monitor_task, get_monitor_alerts, list_monitor_tasks, get_change_history |
Performance Comparison
Here's the real-world difference between approaches:
| Metric | Manual | Traditional Tools | API + MCP |
|---|---|---|---|
| Time per competitor | 3-4 hours | 20-30 min | ~3 seconds |
| Data accuracy | 50-80% | 70-90% | 99% |
| SP ad coverage | Low | 50-70% | 98% |
| Continuous monitoring | None | Limited | Full control |
| Batch capacity | 1 at a time | Tool-limited | 30M+/day |
| Non-technical usage | N/A | Limited (UI only) | Full (via MCP) |
Production Tips
Tip 1: Store historical data
The monitor_log.csv file is your most valuable asset. After a month, you'll see pricing patterns, promotion cycles, and BSR trends that are invisible in single snapshots. Don't just log — analyze the time series.
Tip 2: Focus on negative reviews
Most sellers only look at positive reviews for competitor insights. But negative reviews reveal weaknesses — and weaknesses are differentiation opportunities. Always pull review_type="critical".
Tip 3: Set meaningful alert thresholds
A 5% price change might be noise. A 15% change is a strategy shift. Tune your alert_threshold_pct based on your category's typical price volatility.
Tip 4: Use MCP for exploration, API for automation
MCP is great for ad-hoc analysis and exploration. But for scheduled, automated monitoring, the Python API gives you more control. Use both.
Complete Script
Here's the full runnable script combining everything:
#!/usr/bin/env python3
"""Amazon Competitor Research System — IBADM Framework
Author: Leo, Pangolinfo Technical Lead
"""
import requests
import pandas as pd
import time
from datetime import datetime
from concurrent.futures import ThreadPoolExecutor
# ... (all the code from above, combined into one runnable file)
# Full version available at: https://www.pangolinfo.com/amazon-scraper-api/?referrer=devto_amz
if __name__ == "__main__":
client = AmazonAPIClient(api_key="YOUR_API_KEY")
keywords = ["your", "core", "keywords"]
# Step 1: Identify
print("Step 1: Identifying competitors...")
competitors = identify_competitors(client, keywords)
# Step 2: Baseline
print("Step 2: Building baseline...")
baseline = build_baseline(client, competitors)
baseline.to_csv("baseline.csv", index=False)
# Step 3: Analyze (top 5 by BSR)
print("Step 3: Analyzing top competitors...")
top5 = baseline.nsmallest(5, "bsr")["asin"].tolist()
# Step 4: Differentiate
print("Step 4: Finding differentiation opportunities...")
opportunities = find_differentiation_opportunities(
client, "B0YOURASIN", top5, keywords
)
# Step 5: Monitor
print("Step 5: Starting monitoring...")
start_monitoring(client, competitors)
Conclusion
Competitor research doesn't have to be slow, inaccurate, and manual. The IBADM framework gives you structure. The Pangolinfo API gives you real-time data (3s latency, 99% success, 98% SP coverage). The MCP gives your non-technical team natural language access.
Resources:
- Amazon Scraper API:
The code in this article is production-ready. Grab your API key and start building. Questions? Drop them in the comments — I'll answer technical questions.
Author: Leo — Technical Lead at Pangolinfo. Building real-time data infrastructure for Amazon sellers. All code in this article has been tested in production environments.
SOCIAL SHARE CARD GENERATOR