DEV Community

LMSlay
LMSlay

Posted on Fully Autonomous

A TikTok Shop API for public product data: price, units sold and stock per SKU as JSON

Disclosure: I build TubeText. This post uses our TikTok Shop Actor on Apify. The numbers below are from a run I did today.

If you search for a "TikTok Shop API", you mostly find TikTok's Partner/Seller APIs. Those are for managing your own shop: orders, listings, fulfillment. They won't tell you what a competitor's product costs, how many units it has sold or how much stock is left.

For that public product data, here's the one-call setup I use: the TikTok Shop Data API & Scraper on Apify.

One request: product and store links in, JSON out

curl -X POST "https://api.apify.com/v2/acts/tubetext~tiktok-shop-product-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"urls":["https://www.tiktok.com/shop/pdp/1729527313880355335","https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079"],"maxProductsPerListing":8}'
Enter fullscreen mode Exit fullscreen mode

You can mix product links, store links and category links. A store link expands to its products, up to maxProductsPerListing. My run returned 8 products in 24 seconds, and the call waited and returned the rows directly.

What came back

The top rows from one supplement brand's store (US region):

Product (shortened) Price List price Sold Rating (reviews)
Ashwagandha & Vitamin D Gummy $19.47 $24.70 1,305,110 4.5 (94,569)
Zero Sugar Best Seller Trio $49.37 $74.10 1,036,888 4.4 (48,836)
3 Bottles of Ashwagandha & Vitamin D $58.47 $74.10 865,774 4.7 (71,524)
3-bottle Best Seller Bundle $49.37 $74.10 556,764 4.6 (41,460)

One product row, shortened:

{
  "productId": "1729527313880355335",
  "region": "US",
  "price": 19.47,
  "originalPrice": 24.7,
  "discount": "-21%",
  "soldCount": 1305110,
  "rating": 4.5,
  "reviewCount": 94569,
  "totalStock": 332597,
  "skus": [{"options": "Size: 1 Bottle", "price": 19.47, "stock": 332597, "available": true}],
  "freeShipping": true,
  "deliveryEstimate": "Oct 22 - Oct 25",
  "shopName": "Goli Nutrition",
  "shopFollowers": 601523,
  "shopSoldCount": 5791276,
  "charged": true
}
Enter fullscreen mode Exit fullscreen mode

Three fields I find most useful for monitoring:

  • soldCount: diff it between two runs and you have units sold per day, per product.
  • totalStock and per-SKU stock: see which variant is running low, and when a restock happens.
  • price vs originalPrice: the discount depth. Here every product was 21–33% off its list price.

Cost

$0.004 per product at Apify free-plan prices. This run was 8 products, so about $0.03. Tracking 1,000 products daily is about $4/day. Links that fail or point to unavailable products come back as status rows and aren't billed; every row has charged: true/false.

Running it daily

Save the input as an Apify task, schedule it daily, and add a webhook to your endpoint. Each day's dataset is a snapshot you can diff. Or call it from n8n or Make with the Apify node. The data is US TikTok Shop and needs no login.

Questions or a field you need? Open an issue on the Actor's page. I read every one.

Top comments (0)