
How to Get TikTok Video Data Without Scraping
Access TikTok video metadata, engagement metrics, and comments through APIMux's unified API. No scraping, no browser automation, no rate limit headaches—just clean, structured data for trend analysis and content research.
If you're building a tool to track viral trends, analyze content performance, or research TikTok creators, you've probably hit the same wall: TikTok doesn't offer a public API for video data, and web scraping is fragile, slow, and violates their terms of service.
APIMux solves this problem by providing a stable, legal API for TikTok video data—no scraping required.
The Problem with Scraping TikTok
Most developers trying to access TikTok data resort to:
Browser automation (Puppeteer, Playwright):
- Slow: 5-10 seconds per video
- Fragile: breaks when TikTok updates their UI
- Resource-intensive: requires headless browsers
- Detectable: TikTok actively blocks automation
HTML scraping:
- Requires reverse-engineering TikTok's obfuscated JavaScript
- No stable selectors—class names change frequently
- Rate limits and IP blocks
- Legal gray area
Unofficial APIs:
- Unreliable uptime
- No support or documentation
- Risk of account bans
- Data quality issues
APIMux's TikTok API: What You Get
APIMux provides 4 TikTok capabilities through a single, stable API:
1. Search Videos
Find videos by keyword, hashtag, or trend:
apimux tiktok search_videos \
--keyword "cooking recipes" \
--count 50Returns:
- Video ID, title, description
- Creator username and profile
- View count, like count, comment count, share count
- Video URL and cover image
- Upload timestamp
- Music info
You can filter by region, sort order, and publish time:
apimux tiktok search_videos \
--keyword "fitness" \
--region US \
--sort-by likes \
--publish-time 1w \
--count 20Sort options: relevance, likes, date
Publish time: all, 1d, 1w, 1m, 3m, 6m
2. Get Video Comments
Retrieve comments for any video:
apimux tiktok list_comments \
--video-id 7234567890123456789 \
--count 100You can also use a TikTok video URL:
apimux tiktok list_comments \
--video-id "https://www.tiktok.com/@user/video/7234567890123456789" \
--count 100Returns:
- Comment text and timestamp
- Commenter username
- Like count on comment
- Reply count
- Nested replies
3. TikTok Shop Products
Access TikTok Shop product listings:
apimux tiktok shop_products \
--seller-id "749691378607410" \
--region US \
--sort sale \
--top-n 30Filter by region and sort:
apimux tiktok shop_products \
--seller-id "749691378607410" \
--region US \
--sort rec \
--top-n 50Sort options: sale (by sales volume), rec (recommended)
Returns:
- Product ID, title, price
- Sales count and rating
- Shop name
- Product images
- Shipping info
4. TikTok Shop Product Details
Get detailed product information:
apimux tiktok shop_product_info \
--product-id 1234567890 \
--region USReturns:
- Full product description
- Variant options (size, color)
- Inventory status
- Reviews and ratings
- Related products
Real-World Use Cases
Use Case 1: Viral Trend Tracking
Track trending topics in real-time:
# Search for videos about a trending topic
apimux tiktok search_videos --keyword "AI agents" --count 100 > ai_trend.json
# Analyze engagement metrics
jq '[.[] | {
description: .description,
views: .play_count,
engagement_rate: ((.like_count + .comment_count) / .play_count * 100)
}] | sort_by(-.engagement_rate) | .[0:10]' ai_trend.jsonThis gives you the top 10 videos by engagement rate, helping you identify what content resonates most with audiences.
Use Case 2: Competitor Content Analysis
Monitor what your competitors are posting:
# Search for videos from a specific creator
apimux tiktok search_videos --keyword "@competitor_username" --count 50 > competitor.json
# Get comments to understand audience sentiment
for video_id in $(jq -r '.[].video_id' competitor.json); do
apimux tiktok list_comments --video-id "$video_id" --count 100 >> comments.json
doneAnalyze comment sentiment to understand what audiences like or dislike about competitor content.
Use Case 3: Product Research for E-commerce
Find trending products on TikTok Shop:
# Fetch products from a TikTok Shop seller
apimux tiktok shop_products --seller-id "749691378607410" --region US --sort sale --top-n 100 > products.json
# Filter by sales volume
jq '.[] | select(.sales_count > 1000) | {title, price, sales_count, rating}' products.jsonIdentify high-performing products to source or create similar offerings.
Use Case 4: Content Strategy Optimization
Understand what makes videos go viral:
# Get top videos in your niche
apimux tiktok search_videos --keyword "fitness tips" --sort-by likes --count 200 > fitness.json
# Analyze patterns
jq '[.[] | {
duration: .duration,
views: .play_count,
likes: .like_count,
comments: .comment_count,
shares: .share_count
}]' fitness.jsonLook for patterns: Do shorter videos perform better? What's the typical engagement rate for viral content?
Why APIMux vs Scraping
Speed:
- Scraping: 5-10 seconds per video
- APIMux: 200-500ms per request
Reliability:
- Scraping: Breaks with every UI update
- APIMux: Stable API contract, we handle upstream changes
Scale:
- Scraping: Limited by browser resources and IP rotation
- APIMux: Handle thousands of requests per hour
Legal:
- Scraping: Violates TikTok's ToS
- APIMux: Compliant data access through authorized channels
Maintenance:
- Scraping: Constant updates required
- APIMux: Zero maintenance—we handle it
Pricing and Rate Limits
Credit usage and rate limits are enforced by the APIMux billing layer. Check the current pricing and billing pages for the latest credit costs before planning production workloads.
Getting Started
# Install the CLI
curl -fsSL https://github.com/reorc/apimux-cli/releases/latest/download/install.sh | sh
# Authenticate
apimux auth login
# Make your first TikTok API call
apimux tiktok search_videos --keyword "viral trends" --count 10Data Freshness
- Video metadata: Updated every 15 minutes
- Engagement metrics (views, likes): Updated hourly
- Comments: Updated every 30 minutes
- Shop data: Updated daily
Best Practices
1. Use specific keywords:
- Bad: "food"
- Good: "easy dinner recipes under 30 minutes"
2. Filter by engagement rate, not just views:
- High views + low engagement = clickbait
- Moderate views + high engagement = quality content
3. Track trends over time:
- Don't just look at current top videos
- Monitor how topics evolve week-over-week
4. Combine with other data sources:
- Cross-reference TikTok trends with Google Trends
- Compare TikTok Shop products with Amazon sales data
Limitations
APIMux provides public TikTok data only:
- No access to private accounts
- No posting or account management
- No analytics for your own account (use TikTok's official Creator Tools for that)
Next Steps
TikTok data is most powerful when combined with other sources. Try:
- TikTok + Google Trends: Validate viral topics with search volume
- TikTok + Amazon: Find products trending on TikTok and check Amazon availability
- TikTok + Reddit: See if TikTok trends are discussed in relevant subreddits
Visit the documentation for complete TikTok API reference, or reach out at [email protected] with questions.
APIMux provides stable, legal access to TikTok data without scraping. Start tracking viral trends today.
作者
更多文章

Amazon Data Intelligence: 14 Capabilities for E-commerce Research
APIMux provides complete coverage of Amazon data with 14 capabilities spanning product search, reviews, sales trends, BSR tracking, and market analysis. Learn how to use these tools for product selection, competitive analysis, and market research.

Getting Started with APIMux CLI: Authentication & First API Call
A step-by-step tutorial on installing the APIMux CLI, authenticating with device-flow, and making your first API call. Learn how to explore capabilities, understand output formats, and track your usage.

Meta Ads Library API: Track Competitor Ad Campaigns
Access Meta's Ad Library data through APIMux to monitor competitor campaigns, analyze ad creatives, and discover winning strategies across Facebook and Instagram—without manual searching.