1. Cross-Marketplace Unit Economics: One Unified Key vs Split Scrapers
Tracking Amazon ASIN BuyBox parity against TikTok Shop creator discounts historically forced Python teams to stitch together an Amazon API (Rainforest or Keepa) plus a fragile headless TikTok Shop scraper. Combining both endpoints on one credit ledger cuts per-SKU monitoring spend by 85%–95%.
Because Amazon MAP enforcement and TikTok Shop flash vouchers move fast, paying $0.03+ per cross-platform pair forces teams to throttle checks down to once per day. At 13 Credits ($0.0013 PAYG) per matched pair, you can track 40 core hero SKUs every 6 hours all month for $6.24—leaving room inside a single $9 non-expiring Indie Pack (payable via Cards, Apple/Google Pay, Alipay, WeChat Pay, or 0%-fee USDT with +5% bonus credits).
| Architecture / Metric | ShopData API (Unified Key) | Rainforest + TikTok Scraper | Keepa + DIY Headless Browser |
|---|---|---|---|
| Amazon ASIN Detail Cost | 10 Credits ($0.0004–$0.0010) | $0.010–$0.020 / request | €49–€1,699/mo (expiring tokens) |
| TikTok Shop SKU Detail Cost | 3 Credits ($0.00012–$0.00030) | $0.015–$0.030 / call (separate vendor) | DIY proxy + Playwright ($150+/mo) |
| Matched SKU Pair Cost | 13 Credits ($0.00052–$0.0013) | $0.025–$0.050 / pair | $200–$450+/mo fixed overhead |
| 40 SKU Pairs × 4×/Day (4,800 pairs/mo) | $6.24 PAYG (inside $9 Indie Pack) | $120 – $240 / month | $250+ / month + proxy maintenance |
| 404 / Delisted / Out-of-Stock Error | 0 Credits ($0.00) | Billed on non-200 or retry | Consumes tokens / proxy bandwidth |
| AI Agent & MCP Compatibility | Native Remote MCP + x402 Base USDC | REST only | REST / CSV arrays only |
Interactive Cross-Marketplace Spread & Python Tracker Budget Lab
Amazon ASIN vs TikTok Shop Live Spread & Monthly Credit Math
1. Inspect Matched Product Pair (Amazon ASIN + TikTok Shop Product ID)
Amazon US BuyBox (10 Cr)
$44.95 $54.99
ASIN: B0CRMP3RQT · 4.6 ★ (1,840)
TikTok Shop US (3 Cr)
$29.90 $49.99
18,420 sold · ThermoBrew Official US
Cross-Channel Spread Alert
−$15.05 (33%)
TikTok undercuts Amazon BuyBox
3. Python Asyncio Polling Cadence
A single $9 Non-Expiring Indie Pack runs 6,923 full Amazon + TikTok SKU pair lookups (Cards · Apple/Google Pay · WeChat Pay · USDT). 404 & out-of-catalog checks cost 0 Credits.
Zero-Friction Sandbox · Instant API Key in 5 Seconds
Skip monthly lock-in—claim 3,000 Free Credits ($0.30) or unlock 120–600 RPM from $9 PAYG.
2. Runnable Python Asyncio Tracker: Amazon ASIN + TikTok Shop Spread & SQLite History
Drop this self-contained Python 3.10+ script into a cron job, Docker container, or GitHub Action. It queries both endpoints concurrently via httpx.AsyncClient, persists timestamped snapshots in SQLite, detects price drops or TikTok-vs-Amazon undercuts exceeding your threshold, and dispatches a webhook alert.
Async Python Amazon ASIN + TikTok Shop Price & Spread Tracker
Install httpx (pip install httpx), export SHOPDATA_API_KEY, and run python tracker.py. Switch tabs for Node.js, cURL, and real sanitized 200 OK JSON receipts from both endpoints.
# 1) Amazon US ASIN BuyBox & SKU Detail (10 Credits = $0.001 PAYG)
curl -sS "https://api.shopdataapi.com/v1/amazon/product?asin=B0CRMP3RQT&country=US" \
-H "x-api-key: $SHOPDATA_API_KEY"
# 2) TikTok Shop US Product, SKU Variants & Top Reviews (3 Credits = $0.0003 PAYG)
curl -sS "https://api.shopdataapi.com/v1/tiktok-shop/product?product_id=1730073687428142070®ion=US" \
-H "x-api-key: $SHOPDATA_API_KEY"import asyncio
import os
import sqlite3
from datetime import datetime, timezone
import httpx
API_BASE = "https://api.shopdataapi.com"
API_KEY = os.environ["SHOPDATA_API_KEY"] # sd_live_... (3,000 Free Credits)
WEBHOOK_URL = os.environ.get("ALERT_WEBHOOK_URL", "") # Optional Slack/Discord URL
# Map each internal SKU to its Amazon ASIN + TikTok Shop product_id
WATCHLIST = [
{
"sku": "MUG-HEATED-12OZ",
"asin": "B0CRMP3RQT",
"amazon_country": "US",
"tiktok_product_id": "1730073687428142070",
"tiktok_region": "US",
"alert_spread_pct": 12.0, # Alert when TikTok undercuts Amazon by >= 12%
},
]
def init_db(path: str = "price_history.db") -> sqlite3.Connection:
conn = sqlite3.connect(path)
conn.execute("""
CREATE TABLE IF NOT EXISTS price_snapshots (
id INTEGER PRIMARY KEY AUTOINCREMENT,
ts TEXT NOT NULL,
sku TEXT NOT NULL,
amazon_price REAL,
tiktok_price REAL,
tiktok_sold INTEGER,
spread_pct REAL
)
""")
conn.commit()
return conn
async def fetch_pair(client: httpx.AsyncClient, sem: asyncio.Semaphore, item: dict) -> dict:
headers = {"x-api-key": API_KEY}
async with sem:
amz_req = client.get(
f"{API_BASE}/v1/amazon/product",
params={"asin": item["asin"], "country": item["amazon_country"]},
headers=headers,
)
tt_req = client.get(
f"{API_BASE}/v1/tiktok-shop/product",
params={"product_id": item["tiktok_product_id"], "region": item["tiktok_region"]},
headers=headers,
)
amz_res, tt_res = await asyncio.gather(amz_req, tt_req)
amz = amz_res.json().get("data") or {} if amz_res.status_code == 200 else {}
tt = tt_res.json().get("data") or {} if tt_res.status_code == 200 else {}
amz_price = amz.get("price")
tt_price = tt.get("price")
spread_pct = (
round(((amz_price - tt_price) / amz_price) * 100.0, 2)
if amz_price and tt_price
else None
)
return {
"sku": item["sku"],
"asin": item["asin"],
"amazon_price": amz_price,
"amazon_in_stock": amz.get("in_stock"),
"tiktok_price": tt_price,
"tiktok_sold": tt.get("sold_count"),
"tiktok_stock": tt.get("stock"),
"spread_pct": spread_pct,
"threshold": item["alert_spread_pct"],
}
async def main() -> None:
conn = init_db()
sem = asyncio.Semaphore(5) # Tune up to 10-15 on Paid 120-600 RPM plans
async with httpx.AsyncClient(timeout=20.0) as client:
rows = await asyncio.gather(*(fetch_pair(client, sem, item) for item in WATCHLIST))
now_iso = datetime.now(timezone.utc).isoformat()
for r in rows:
conn.execute(
"INSERT INTO price_snapshots (ts, sku, amazon_price, tiktok_price, tiktok_sold, spread_pct) VALUES (?, ?, ?, ?, ?, ?)",
(now_iso, r["sku"], r["amazon_price"], r["tiktok_price"], r["tiktok_sold"], r["spread_pct"]),
)
print(f"[{r['sku']}] Amazon={r['amazon_price']} | TikTok={r['tiktok_price']} (sold={r['tiktok_sold']}) | spread={r['spread_pct']}%")
if WEBHOOK_URL and r["spread_pct"] is not None and r["spread_pct"] >= r["threshold"]:
await client.post(WEBHOOK_URL, json={
"text": f"Price Spread Alert {r['sku']}: Amazon ${r['amazon_price']} vs TikTok Shop ${r['tiktok_price']} (-{r['spread_pct']}%)"
})
conn.commit()
conn.close()
if __name__ == "__main__":
asyncio.run(main())const API_BASE = "https://api.shopdataapi.com";
const headers = { "x-api-key": process.env.SHOPDATA_API_KEY };
async function checkPair(asin, tiktokProductId) {
const [amzRes, ttRes] = await Promise.all([
fetch(`${API_BASE}/v1/amazon/product?asin=${asin}&country=US`, { headers }),
fetch(`${API_BASE}/v1/tiktok-shop/product?product_id=${tiktokProductId}®ion=US`, { headers }),
]);
const amz = amzRes.ok ? (await amzRes.json()).data : null;
const tt = ttRes.ok ? (await ttRes.json()).data : null;
const spreadPct =
amz?.price && tt?.price ? Number((((amz.price - tt.price) / amz.price) * 100).toFixed(2)) : null;
console.log({ asin, amazonPrice: amz?.price, tiktokPrice: tt?.price, tiktokSold: tt?.sold_count, spreadPct });
}
checkPair("B0CRMP3RQT", "1730073687428142070");{
"amazon_product_receipt": {
"code": 0,
"status": "ok",
"credits_charged": 10,
"data": {
"asin": "B0CRMP3RQT",
"title": "Smart Self-Heating Ceramic Coffee Mug 12oz with Charging Coaster",
"brand": "ThermoBrew",
"price": 44.95,
"list_price": 54.99,
"currency": "USD",
"in_stock": true,
"is_prime": true,
"rating": 4.6,
"reviews_count": 1840,
"seller_name": "ThermoBrew Direct",
"variations": [
{ "asin": "B0CRMP3RQT", "color": "Matte Black", "price": 44.95 },
{ "asin": "B0CRMP8K2W", "color": "Warm Ivory", "price": 46.95 }
]
}
},
"tiktok_shop_product_receipt": {
"code": 0,
"status": "ok",
"credits_charged": 3,
"data": {
"product_id": "1730073687428142070",
"title": "Self-Heating Ceramic Smart Mug 12oz App-Controlled Temperature",
"price": 29.90,
"list_price": 49.99,
"currency": "USD",
"stock": 418,
"sold_count": 18420,
"rating": 4.8,
"rating_count": 1124,
"shop": {
"id": "749510293847102",
"name": "ThermoBrew Official US",
"rating": 4.9
},
"skus": [
{ "sku_id": "1730073687428142071", "title": "Matte Black 12oz", "price": 29.90, "stock": 265 },
{ "sku_id": "1730073687428142072", "title": "Warm Ivory 12oz", "price": 31.90, "stock": 153 }
]
}
}
}3. Automating SKU Discovery & Connecting Claude / Cursor via Remote MCP
If you start with an Amazon ASIN catalog and do not yet have the corresponding TikTok Shop product_id values, bootstrap the mapping automatically with GET /v1/tiktok-shop/search (2 Credits / item returned) or let an AI agent run both lookups interactively via our Remote MCP server.
- Bootstrap Amazon -> TikTok Shop Mapping in Python: Extract the brand + core product title from GET /v1/amazon/product, call GET /v1/tiktok-shop/search?keyword=<brand+model>®ion=US, and score candidate matches by brand string similarity and variant specs before saving the matched product_id in SQLite.
- Guard Against Flash-Sale False Positives with Stock & Variant Checks: TikTok Shop sellers frequently attach a low-price accessory SKU (e.g., a $9 replacement lid) to a main product listing. Always inspect data.skus[] in the /v1/tiktok-shop/product JSON receipt and compare the exact matching capacity/color SKU against the Amazon child ASIN.
- Zero-Glue AI Agent Workflows via Remote MCP (Grade A Discovery): Connect https://mcp.shopdataapi.com/v1/mcp in Claude Web, ChatGPT, or Cursor to invoke amazon_product, tiktok_shop_search, and tiktok_shop_product directly with typed outputSchema definitions—or pay per call with zero signup via x402 Base Mainnet USDC ($0.0015 standard, $0.003 on /v1/tiktok-shop/product).
- Scale Smoothly from Sandbox to 600 RPM Production: Every new account includes 3,000 Free Credits (60 RPM, 5 burst)—enough for 230 full Amazon + TikTok SKU pair checks before paying a cent. Upgrade anytime with $9 / $25 / $89 never-expiring PAYG packs or $19–$199/mo plans (120–600 RPM) via Cards, Apple/Google Pay, Alipay, WeChat Pay, or 0%-fee USDT (+5% bonus).
Interactive Commerce Terminal · API Docs Hub
Verify real-time latency, SKU credit math & JSON schema
Frequently Asked Questions
- How many credits does one combined Amazon ASIN + TikTok Shop price check cost?
- GET /v1/amazon/product costs 10 Credits ($0.001 at PAYG, $0.0004 on Business) and GET /v1/tiktok-shop/product costs 3 Credits ($0.0003 at PAYG, $0.00012 on Business), totaling 13 Credits per matched SKU pair. Empty responses and HTTP 404 lookups cost 0 Credits.
- Can I use one Python httpx client and one API key for both Amazon and TikTok Shop?
- Yes. Both /v1/amazon/product and /v1/tiktok-shop/product share the same https://api.shopdataapi.com host, x-api-key: sd_live_... header, and unified credit ledger—eliminating separate vendor contracts, proxy rotation, and browser farms.
- How do I prevent TikTok Shop accessory SKUs from skewing my Amazon price comparison?
- Inspect the data.skus array returned by GET /v1/tiktok-shop/product instead of relying solely on the top-level minimum price. Match the variant title (e.g., 'Matte Black 12oz') and confirm sku.stock > 0 before triggering a MAP-violation or arbitrage alert.
- Can AI coding assistants like Cursor or Claude run this cross-platform price check via MCP?
- Yes. Connect our Remote Streamable HTTP MCP server at https://mcp.shopdataapi.com/v1/mcp (public anonymous initialize and tools/list with full outputSchema; OAuth 2.1 or sd_live_ Bearer token on tools/call) to run amazon_product and tiktok_shop_product side by side.
Zero Monthly Lock-In · 1-Click Google OAuth Sandbox
Run your first live query in 10 seconds with 3,000 Free Credits ($0.30).
Test Amazon, Walmart, Etsy, 1688 Wholesale, Taobao, Shopee, and TikTok Shop endpoints in our browser Playground or claim an instant sd_live_... key—backed by a $9.00 non-expiring Indie Starter Pack ($0.08–$0.20 per 1,000 items).