TikTok Shop API: How to Scrape Products & Sales Data (Build a Kalodata Clone)
Tools like Kalodata, FastMoss, and Shoplus are making millions of dollars by selling one thing: Data.
They tell dropshippers and brands:
- "This shadow lamp is selling 5,000 units a day."
- "This shop made $50k revenue yesterday."
- "This creator video drove 10k sales."
How do they know this? They scrape TikTok Shop.
TikTok Shop is incredibly transparent. It displays "10.5k sold" right on the product page. By tracking this number over time, you can calculate daily sales velocity and revenue with high accuracy.
But TikTok doesn't have a public API for this. If you want to build your own product research tool—or just find winning products for your own store—you need to scrape it.
In this guide, we'll show you how to use SociaVault's TikTok Shop API to extract this valuable data. SociaVault specializes in social media data extraction for e-commerce research.
Evaluating TikTok data providers? Check our TikTok API alternatives comparison guide.
Need the best TikTok API? See our best TikTok scraping APIs comparison.
The Data Goldmine
Here is what you can extract from a TikTok Shop product page:
- Sales Count: "15.2k sold" (The most important metric).
- Price: Current price and original price.
- Stock: Inventory levels (sometimes visible).
- Reviews: Rating and review count.
- Shop Info: Name, total sales, and verification status.
Strategy: The "Snapshot" Method
To calculate Daily Revenue, you can't just scrape once. You need to take snapshots.
- Day 1 (10:00 AM): Product X has 10,000 sales. Price $20.
- Day 2 (10:00 AM): Product X has 10,500 sales. Price $20.
Calculation:
- Units Sold: 500
- Revenue: 500 * $20 = $10,000
This is exactly how the big tools do it.
Step 1: Searching for Products
First, we need to find products to track. We can search by keyword (e.g., "home decor", "beauty") using SociaVault.
const API_KEY = 'YOUR_SOCIAVAULT_API_KEY';
async function searchShopProducts(keyword) {
const url = `https://api.sociavault.com/v1/scrape/tiktok/shop/search?keyword=${keyword}`;
const response = await fetch(url, {
headers: { 'Authorization': `Bearer ${API_KEY}` }
});
const data = await response.json();
return data.products; // Returns list of products with IDs
}
Step 2: Extracting Product Details
Once we have a list of Product IDs (or URLs), we fetch the details to get the current sales count.
async function getProductData(productId) {
const url = `https://api.sociavault.com/v1/scrape/tiktok/shop/product?productId=${productId}`;
const response = await fetch(url, {
headers: { 'Authorization': `Bearer ${API_KEY}` }
});
const data = await response.json();
return {
id: data.product.id,
title: data.product.title,
price: data.product.price.amount,
sold_count: data.product.sold_count, // e.g., 10500
shop_name: data.product.shop.name
};
}
Step 3: Building the Tracker (Node.js + Database)
You need a database to store the history. A simple SQL table works:
product_snapshots (id, product_id, sold_count, price, timestamp)
Here is the logic for your daily worker script:
async function runDailyUpdate() {
// 1. Get all products we are tracking from DB
const trackedProducts = await db.getTrackedProducts();
for (const product of trackedProducts) {
// 2. Scrape current data
const currentData = await getProductData(product.tiktok_id);
// 3. Get yesterday's data
const yesterdayData = await db.getLastSnapshot(product.tiktok_id);
if (yesterdayData) {
const unitsSold = currentData.sold_count - yesterdayData.sold_count;
const revenue = unitsSold * currentData.price;
console.log(`Product: ${currentData.title}`);
console.log(`Sold Today: ${unitsSold}`);
console.log(`Revenue: $${revenue.toFixed(2)}`);
// Alert if viral
if (revenue > 1000) {
sendSlackAlert(`🔥 Viral Product Alert: ${currentData.title} made $${revenue} today!`);
}
}
// 4. Save today's snapshot
await db.saveSnapshot(currentData);
}
}
Advanced: Finding the "Creator" Connection
Knowing a product is selling is good. Knowing WHO is selling it is better.
TikTok Shop sales are usually driven by creator videos (affiliates).
SociaVault can also scrape the "Videos related to this product" section.
- Get Product ID.
- Fetch related videos.
- Sort by views in the last 7 days.
This tells you: "This $20 lip gloss is viral because @BeautyInfluencerX posted a video 3 days ago that got 2M views."
Conclusion
The TikTok Shop gold rush is happening right now. The winners aren't just the sellers—they are the people with the data.
By building a simple tracker using SociaVault, you can see exactly what is selling, how much it's making, and who is promoting it. You don't need to pay $300/month for Kalodata. You can build your own.
Start tracking sales: Get your API Key
Related Articles
Found this helpful?
Share it with others who might benefit
Ready to Try SociaVault?
Start extracting social media data with our powerful API. No credit card required.