Track TikTok Videos Programmatically
This guide shows you how to track TikTok video performance using the ContentStats.io API. Get hourly snapshots of views, likes, comments, shares, and saves.No TikTok API approval required. Start tracking in minutes with just an API key.
Prerequisites
Before you start, you’ll need:- ContentStats.io account (sign up free)
- API key from your dashboard
- At least 5 free)
- URL of a public TikTok video
Step 1: Get Your API Key
Access Dashboard
Log in to contentstats.io
Step 2: Start Tracking a TikTok Video
Send a POST request to/api/v1/videos/track:
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
video_link | string | ✅ | Full TikTok video URL |
duration_days | integer | ✅ | Days to track (1-30) |
Response
Save the
id field — you’ll need it to retrieve snapshots later.Step 3: Get Snapshots
After the first hour, retrieve snapshot data:Response with Snapshots
Step 4: List All Tracked TikTok Videos
Get all your tracked videos:Query Parameters
| Parameter | Values | Description |
|---|---|---|
platform | tiktok, youtube, instagram, twitter | Filter by platform |
status | monitoring, completed, paused, error | Filter by status |
limit | 1-100 | Number of results (default: 50) |
Step 5: Stop Tracking Early (Optional)
To stop tracking before the duration ends:You’ll only pay for snapshots already collected. Future snapshots won’t be charged.
Supported TikTok URL Formats
We accept all TikTok video URL formats:Cost Breakdown
Tracking cost calculation:Advanced: Batch Tracking
Track multiple TikTok videos at once:Webhook Notifications (Coming Soon)
Get notified when:- First snapshot is collected
- Tracking completes
- Video gets deleted
Troubleshooting
Error: Video not found
Error: Video not found
Cause: Invalid URL or video is private/deletedFix: Verify the URL is public and accessible without login
Error: Insufficient balance
Error: Insufficient balance
Cause: Not enough credit for estimated costFix: Add credits to your account
No snapshots appearing
No snapshots appearing
Cause: First snapshot takes up to 1 hourFix: Wait 60 minutes and check again
Duplicate tracking
Duplicate tracking
Cause: Same video tracked multiple timesFix: List videos first to check if already tracking:
Best Practices
Use Environment Variables
Use Environment Variables
Never hardcode API keys:
Check Balance Before Tracking
Check Balance Before Tracking
Verify sufficient balance:
Track High-Value Videos Only
Track High-Value Videos Only
Focus on videos that matter:
- Sponsored content
- Competitor analysis
- Viral trend research
- Campaign performance
Stop Tracking When Done
Stop Tracking When Done
If you get the data you need early, stop tracking to save credits
