Skip to content
Python Engineering · Cross-Marketplace Price Tracker8 min read·Updated 2026-11-27

Amazon ASIN & TikTok Shop Price Tracker API Guide in Python

Quick Answer (BLUF)

With ShopData API, one sd_live_ key fetches both GET /v1/amazon/product (10 Credits = $0.0004–$0.001) and GET /v1/tiktok-shop/product (3 Credits = $0.00012–$0.0003) in parallel via Python httpx.AsyncClient. Each matched Amazon ASIN + TikTok Shop SKU pair costs 13 Credits ($0.0013 PAYG), letting a single $9 non-expiring Indie Pack run 6,923 full cross-marketplace price & spread checks—while 404 or delisted items deduct 0 Credits.

Live 30d Gateway p50: 24ms (18ms warm · 99.96% HTTP 200)$9 Non-Expiring PAYG · Unlock 120–600 RPM Concurrency
Legacy Subscription Lock-InRainforest $59–$499/mo + Separate TikTok ScraperUnused monthly credits reset to 0 every billing cycle.
Zero-Expiry Production Upgrade

$9 Non-Expiring PAYG (90,000 Credits) · Unlock 120–600 RPM Concurrency

Start with 3,000 Free Credits (60 RPM sandbox), then unlock uninterrupted 120–600 RPM cron & worker pipelines with $9 one-time PAYG or $19/mo Starter →

Gateway p50 Latency38ms cached (<350ms warm · 1.4s live)
Concurrency & Rate Limit60 – 600 RPM (5 burst – 15 RPS)Free: 60 RPM (5 burst) · Paid: 120–600 RPM SLA
Deterministic Unit Price$0.08–$0.15 / 1,000 items
Run Live cURL & Python Example ↓or email sign-up →

Instant API key in 5s (3,000 Free Credits / $0.30 — No Card Required) · $1 = 10,000 Credits · 0 Credits on empty queries · Pay via Stripe (Card, Apple Pay, Google Pay) or 0%-fee Crypto (+5% bonus)

Instant Quickstart · Copy & Run in 30 Seconds

Async Python Amazon ASIN + TikTok Shop Price & Spread Tracker

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())
Want to inspect real live JSON before creating an account?Try 3 Free Live Runs in Browser Playground (No Login) →

Key Engineering Takeaways (TL;DR)

  • ✓Unified REST & MCP schema: query GET /v1/amazon/product (10 Credits) and GET /v1/tiktok-shop/product (3 Credits) with one sd_live_ key—no separate TikTok residential proxy or browser farm.
  • ✓Deterministic spread math: 13 Credits per matched SKU pair ($0.0013 PAYG, $0.00052 on Business); a $9 non-expiring Indie Pack covers 6,923 full Amazon + TikTok pair checks.
  • ✓Async Python concurrency ready: use httpx.AsyncClient + asyncio.Semaphore tuned to 60 RPM (free sandbox) or 120–600 RPM (paid tiers) with SQLite price-history snapshots and Slack/Discord MAP-violation alerts.
  • ✓Zero-waste error policy & instant AI agent access: delisted ASINs and expired TikTok Shop IDs return 0 Credits charged, and the same tools (amazon_product + tiktok_shop_product) run natively via Remote MCP.

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).

Unit cost comparison for tracking matched Amazon ASIN + TikTok Shop SKU pairs
Architecture / MetricShopData API (Unified Key)Rainforest + TikTok ScraperKeepa + DIY Headless Browser
Amazon ASIN Detail Cost10 Credits ($0.0004–$0.0010)$0.010–$0.020 / request€49–€1,699/mo (expiring tokens)
TikTok Shop SKU Detail Cost3 Credits ($0.00012–$0.00030)$0.015–$0.030 / call (separate vendor)DIY proxy + Playwright ($150+/mo)
Matched SKU Pair Cost13 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 Error0 Credits ($0.00)Billed on non-200 or retryConsumes tokens / proxy bandwidth
AI Agent & MCP CompatibilityNative Remote MCP + x402 Base USDCREST onlyREST / CSV arrays only

Interactive Cross-Marketplace Spread & Python Tracker Budget Lab

Amazon ASIN vs TikTok Shop Live Spread & Monthly Credit Math

13 Credits / SKU Pair · Save ~96%

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

40 SKU pairs

3. Python Asyncio Polling Cadence

Monthly Pair Checks / Credits4,800 pairs · 62,400 Cr
ShopData Unified Key Est.$9 Indie PAYG (90K Credits · Never Expires)
$6.24/mo
Rainforest + Separate TikTok Scraper$144/mo

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&region=US" \
  -H "x-api-key: $SHOPDATA_API_KEY"
Test this exact endpoint right now in your browser (3 free anonymous runs):Run 3 Free Live Queries in Playground →

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>&region=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

10,000 items/day
2,000 SKUs/day
5,000 reviews/day
HTTP Calls / Day
2,750
13 Global Routes
Credit Unit
$1 = 10,000
$9 Indie Pack Ready
Empty / 404 Fee
0 Credits
$0.00 on 0 matches
Estimated Monthly Pipeline Cost (30 Days)
$60.00/ mo on Business ($86.25 on Pro)
Monthly consumption: 1,500,000 Credits (50,000 Credits/day)
ShopData API (Business $0.08/1K items):$60.00 / mo
Rainforest API / SerpApi ($15/1K calls):$1237.50 / mo
Empty search / unfound ASIN fee:$0.00 (0 Credits)

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).