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."
How do they know this? Do they have insider access to TikTok's database?
No. They just scrape the public "Sold Count" on product pages every day and calculate the difference.
In this tutorial, I'm going to show you how to build your own TikTok Shop Spy Tool using Node.js and the SociaVault API.
The Logic: How to Calculate "Daily Sales"
TikTok doesn't give you a "Daily Sales" API. But they do give you a "Total Sold" number on every product page.
To find the daily sales velocity, we use the Snapshot Method:
- Day 1 (10:00 AM): Scrape Product X. Total Sold:
10,000. - Day 2 (10:00 AM): Scrape Product X. Total Sold:
10,500. - Calculation:
10,500 - 10,000= 500 units sold in 24h.
Multiply that by the price ($20), and you know this product made $10,000 yesterday.
Prerequisites
- Node.js installed.
- A SociaVault API Key (to handle the scraping/proxies).
Step 1: Setup
mkdir tiktok-spy
cd tiktok-spy
npm init -y
npm install axios dotenv
Create a .env file:
SOCIAVAULT_API_KEY=your_api_key_here
Step 2: Find Products to Track
First, we need a way to find products. We'll use the /v1/scrape/tiktok-shop/search endpoint.
Create spy.js:
require('dotenv').config();
const axios = require('axios');
const API_KEY = process.env.SOCIAVAULT_API_KEY;
const BASE_URL = 'https://api.sociavault.com/v1/scrape/tiktok-shop';
const headers = { 'Authorization': `Bearer ${API_KEY}` };
async function findProducts(keyword) {
console.log(`π Searching for "${keyword}"...`);
try {
const response = await axios.get(`${BASE_URL}/search`, {
params: { query: keyword, amount: 10 }, // Get top 10 results
headers
});
return response.data.data.products || [];
} catch (error) {
console.error('Search failed:', error.message);
return [];
}
}
Step 3: Get Product Details (The "Snapshot")
Now we need a function to get the specific details (Price, Sold Count) for a single product. We use /v1/scrape/tiktok-shop/product-details.
async function getProductSnapshot(productUrl) {
try {
const response = await axios.get(`${BASE_URL}/product-details`, {
params: { url: productUrl },
headers
});
const product = response.data.data;
return {
id: product.product_id,
name: product.title,
price: product.price.min_price, // Assuming simple pricing
soldCount: product.sold_count, // This is the gold mine
timestamp: Date.now()
};
} catch (error) {
console.error(`Failed to snapshot ${productUrl}:`, error.message);
return null;
}
}
Step 4: The "Spy" Engine
Now, let's simulate the tracking process. In a real app, you would save these snapshots to a database (Postgres/MongoDB) and run this script once every 24 hours.
For this demo, we'll just show how to fetch the data.
async function main() {
// 1. Find potential winners in the "Home" niche
const products = await findProducts('home decor');
console.log(`\nFound ${products.length} products. Taking snapshots...\n`);
// 2. Take a snapshot of each
for (const p of products) {
// Construct the URL (SociaVault returns the ID, we need the URL for details)
// Or often the search result already has the sold_count!
// Let's check the search result first to save credits.
// If search result has sold_count, we use it directly:
if (p.sold_count) {
console.log(`πΈ SNAPSHOT: [${p.title.substring(0, 30)}...]`);
console.log(` π° Price: $${p.price.min_price}`);
console.log(` π¦ Total Sold: ${p.sold_count}`);
console.log('-----------------------------------');
} else {
// If not, we fetch details (costs 1 credit)
// const details = await getProductSnapshot(p.product_url);
}
}
}
main();
The Output
When you run node spy.js, you get raw intelligence:
π Searching for "home decor"...
Found 10 products. Taking snapshots...
πΈ SNAPSHOT: [Galaxy Projector Night Light...]
π° Price: $19.99
π¦ Total Sold: 15432
-----------------------------------
πΈ SNAPSHOT: [Soft Fluffy Rug for Bedroom...]
π° Price: $12.50
π¦ Total Sold: 8901
-----------------------------------
How to Monetize This
You just built the core engine of a SaaS. Here is the business model:
- Track 1,000 products daily.
- Store the data in a database.
- Build a UI that shows a graph: "This product sold 500 units yesterday."
- Charge $29/mo to dropshippers who want to find winning products.
Why SociaVault?
TikTok Shop uses aggressive anti-scraping measures (Captcha, IP bans, device fingerprinting). Building your own scraper for this is a nightmare.
SociaVault handles all the rotation and fingerprinting for you. You just ask for the data, and you get JSON back.
Ready to build the next Kalodata? Grab your API key at SociaVault.com.
Top comments (0)