DEV Community

LMSlay
LMSlay

Posted on Edited 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.

Choose listing cards or SKU-level stock details

For a single-product request and a short Python snapshot-diff example, start with the earlier TikTok Shop JSON quickstart. For the mixed product/store request above, choose the detail level before budgeting:

  • Need SKU stock, specifications, shipping and shop stats? Keep includeDetails: true (the default) for store/category products. Full-detail results cost $0.004 per product on the Free plan. The 8-product example has $0.032 in product-detail fees; 1,000 such results have $4 in product-detail fees.
  • Only need title, price, sold count and rating from a store/category listing? Set includeDetails: false. Listing cards cost $0.0015 each on the Free plan. Do not use listing-card mode when your workflow needs the SKU stock shown above. This setting applies to store/category products, not direct product URLs.

These are result-event prices, not a promise of the total run cost. Unavailable products and errors do not incur the product-detail fee; a row's charged flag is not an itemized run bill. Actor Start is separate, currently $0.00005 per event, with the event count based on memory (one per GB, minimum one). Check the current Pricing tab and itemized run charges; a run containing only failures is not guaranteed to cost zero.

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)