DEV Community

Cover image for How to Get Exact Unrounded Sold Counts & Live Bags from Shopee Across 8 Markets (Python, Node.js & n8n)
Ji Studio
Ji Studio

Posted on

How to Get Exact Unrounded Sold Counts & Live Bags from Shopee Across 8 Markets (Python, Node.js & n8n)

If you have ever built a price or competitor tracker for Shopee across Southeast Asia, Taiwan, or Brazil (VN, ID, TH, PH, MY, SG, TW, BR), you quickly hit two annoying problems:

  1. Rounded vanity counts: Standard HTML/web renders display "10k+ sold" or "1M+ sold", which makes it impossible to calculate true daily or monthly sales velocity.
  2. Headless browser overhead: Maintaining Playwright/Puppeteer pools, localized proxies, and cookies across 8 different Shopee country domains burns memory and breaks every few weeks.

Below is a clean, zero-dependency setup in Python, Node.js 18+, and n8n that returns exact unrounded sold counts, monthly sales velocity, live stock, vouchers, and Shopee Live bag data in a single structured JSON call.

Full disclosure: I maintain the MIT-licensed SDKs and MCP servers at github.com/jistudio-dev as well as the hosted Shopee Global API on RapidAPI and Apify Store.


1. What Real Production Output Looks Like

Querying a live Shopee Vietnam SKU (https://shopee.vn/product/37251933/41412722725) returns exact unrounded numbers instead of "1M+ sold":

{
  "ok": true,
  "country": "vn",
  "currency": "VND",
  "product": {
    "shop_id": 37251933,
    "item_id": 41412722725,
    "name": "[CHÍNH HÃNG ĐỘC QUYỀN] Tẩy Tế Bào Chết Body Dove Chăm Da Sáng Mịn 280G",
    "price": 122000,
    "stock": 4820,
    "historical_sold_exact": 1096832,
    "monthly_sold_exact": 27202
  }
}
Enter fullscreen mode Exit fullscreen mode

When you poll that SKU every 4–6 hours, historical_sold_exact ticks in real time (1096829 → 1096831 → 1096832), allowing you to estimate real SKU revenue (delta_sold * live_price) with zero guesswork.


2. Quickstart in Python (pip install shopee-global-api)

Install the zero-dependency MIT package from PyPI (or clone the repo):

pip install shopee-global-api
Enter fullscreen mode Exit fullscreen mode
from shopee_global_api import ShopeeClient

client = ShopeeClient(rapidapi_key="YOUR_RAPIDAPI_KEY")

# 1. Exact unrounded sold count & price across 8 markets (vn, id, th, ph, my, sg, tw, br)
res = client.get_product_detail(
    country="vn",
    url="https://shopee.vn/product/37251933/41412722725",
)
item = res["product"]
print(f"{item['name']} | Price: {item['price']} {res['currency']} | Exact Sold: {item['historical_sold_exact']}")

# 2. Batch up to 20 SKUs in 1 HTTP call
batch = client.batch_products(
    country="id",
    urls=[
        "https://shopee.co.id/product/123456/7890123",
        "https://shopee.co.id/product/123456/7890124",
    ],
)
print("Fetched SKUs:", batch["count"])
Enter fullscreen mode Exit fullscreen mode

3. Quickstart in Node.js 18+ (npm i shopee-global-sdk)

npm install shopee-global-sdk
Enter fullscreen mode Exit fullscreen mode
import { ShopeeClient } from "shopee-global-sdk";

const client = new ShopeeClient(process.env.RAPIDAPI_KEY);
const res = await client.getProductDetail({
  country: "vn",
  url: "https://shopee.vn/product/37251933/41412722725",
});

console.log(res.product.name, "| Exact Sold:", res.product.historical_sold_exact);
Enter fullscreen mode Exit fullscreen mode

4. Plug-and-Play n8n Price & Velocity Tracker

If you run automated competitor alerts in n8n, you do not need to write any polling loop:

  1. Download 01-shopee-price-and-exact-sold-tracker.json from our free templates repo.
  2. Import into n8n (Workflows → Import from File).
  3. Set RAPIDAPI_KEY and ALERT_WEBHOOK_URL (Slack, Discord, or Telegram).

Want to query Shopee directly inside Claude Desktop or Cursor? We also open-sourced a zero-dependency stdio MCP server at jistudio-dev/shopee-mcp-server.


Resources & 1-Click Testing

Top comments (0)