TikTok is useful for trend research, competitive monitoring, and media extraction, but it is not a friendly platform to scrape directly.
The official options are limited, the frontend changes often, and simple scraping setups do not last long. This guide focuses on the endpoints that are most useful in day-to-day work and the data you can expect back from each one.
Why Scraping TikTok Is So Hard
TikTok is difficult to scrape for a few familiar reasons:
The TikTok Scraping Challenge
- ❌ No public API: Unlike Twitter or YouTube, TikTok doesn't offer a public API for developers
- ❌ Aggressive bot detection: TikTok uses sophisticated fingerprinting and behavioral analysis
- ❌ Dynamic content: Everything loads via JavaScript and complex API calls
- ❌ Rate limiting: Too many requests and your IP gets blocked instantly
- ❌ Changing endpoints: TikTok frequently changes their internal API structure
The ScrapingBot TikTok API: 8 Powerful Endpoints
These eight endpoints cover the workflows people usually start with.
1. Video Info & Download (No Watermark)
This is the endpoint most people reach for first. Pass in a TikTok video URL and you get video metadata along with download links, including watermark-free output.
# Get video info and download links
curl -X POST https://scrapingbot.io/api/v1/tiktok \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "/",
"params": {
"url": "https://www.tiktok.com/@tiktok/video/7231338487075638570"
}
}'
What you get back: A full JSON response with the fields that matter most for downloaders, analytics, and archiving:
Video Response Data
- Video downloads: HD play URL, watermark-free download link, music track
- Stats: Play count, likes, comments, shares, saves
- Author info: Username, display name, avatar, verification status
- Content details: Description, hashtags, mentions, duration
- Metadata: Video ID, create time, region, language
// Typical response structure
{
"success": true,
"data": {
"aweme_id": "7231338487075638570",
"desc": "Check out this amazing video! #fyp",
"create_time": 1680000000,
"author": {
"uid": "123456789",
"unique_id": "tiktok",
"nickname": "TikTok",
"avatar_larger": "https://...",
"signature": "Make Your Day",
"verified": true
},
"statistics": {
"play_count": 1234567,
"comment_count": 12345,
"digg_count": 123456,
"share_count": 12345
},
"video": {
"play_addr": "https://...hd.mp4",
"download_addr": "https://...nowatermark.mp4",
"duration": 15000,
"ratio": "720p"
},
"music": {
"title": "Original Sound",
"author": "tiktok",
"play_url": "https://..."
}
}
}
2. User Profile Info
Use this endpoint when you need a creator profile, follower counts, bio text, and other account-level fields.
# Get user profile information
curl -X POST https://scrapingbot.io/api/v1/tiktok \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "/user/info",
"params": {
"unique_id": "tiktok"
}
}'
Important: Just pass the username (like "tiktok"), not the full URL or @ symbol.
User Profile Data
- Basic info: Username, display name, bio, avatar URLs
- Stats: Follower count, following count, total likes, video count
- Verification: Verified status, account type
- Social links: Instagram, YouTube, Twitter handles if linked
3. User Posts (Video Feed)
Get all videos posted by a specific user. This is perfect for tracking content creators or analyzing posting patterns.
# Get user's videos
curl -X POST https://scrapingbot.io/api/v1/tiktok \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "/user/posts",
"params": {
"unique_id": "tiktok",
"count": "20",
"cursor": "0"
}
}'
The cursor parameter is for pagination. Start with "0", then use the has_more field and max_cursor from the response to fetch the next page.
💡 Pagination Example
Fetch all videos from a user by following the pagination:
# Python pagination example
cursor = 0
all_videos = []
while True:
response = scrape_tiktok({
"endpoint": "/user/posts",
"params": {
"unique_id": "tiktok",
"count": "30",
"cursor": str(cursor)
}
})
all_videos.extend(response['data']['aweme_list'])
if not response['data']['has_more']:
break
cursor = response['data']['max_cursor']
print(f"Found {len(all_videos)} total videos")
4. Search Users
Find TikTok users by keywords. Great for discovering influencers in specific niches.
# Search for users
curl -X POST https://scrapingbot.io/api/v1/tiktok \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "/user/search",
"params": {
"keywords": "cooking",
"count": "20",
"cursor": "0"
}
}'
Returns a list of users matching your keywords, including their follower counts, bios, and verification status.
5. Search Videos
Search for videos by keywords or hashtags. This is incredibly useful for trend research and content discovery.
# Search for videos
curl -X POST https://scrapingbot.io/api/v1/tiktok \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "/feed/search",
"params": {
"keywords": "funny cats",
"count": "20",
"cursor": "0"
}
}'
You'll get back full video objects just like the video info endpoint, including play URLs, stats, and author info.
6. Music Info
Get information about a specific music track or sound used on TikTok.
# Get music track information
curl -X POST https://scrapingbot.io/api/v1/tiktok \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "/music/info",
"params": {
"music_id": "7231338505431288622"
}
}'
7. Music Posts (Videos Using a Sound)
Find all videos that use a specific music track. Perfect for tracking trending sounds.
# Get videos using a specific music track
curl -X POST https://scrapingbot.io/api/v1/tiktok \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "/music/posts",
"params": {
"music_id": "7231338505431288622",
"count": "20",
"cursor": "0"
}
}'
8. Video Comments
Extract all comments from a video. Great for sentiment analysis and engagement tracking.
# Get video comments
curl -X POST https://scrapingbot.io/api/v1/tiktok \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "/comment/list",
"params": {
"url": "https://www.tiktok.com/@tiktok/video/7093219391759764782",
"count": "20",
"cursor": "0"
}
}'
Comment Data Structure
- Comment text: Full comment content
- User info: Commenter username, avatar, verification status
- Engagement: Like count, reply count
- Timing: When the comment was posted
- Replies: Nested reply structure if available
Real-World Use Cases
Here are a few common use cases for TikTok scraping:
Use Case 1: Build a TikTok Video Downloader
Create a simple web app where users paste a TikTok URL and get a watermark-free download:
// JavaScript example
async function downloadTikTokVideo(videoUrl) {
const response = await fetch('https://scrapingbot.io/api/v1/tiktok', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
endpoint: '/',
params: { url: videoUrl }
})
});
const data = await response.json();
if (data.success) {
const downloadUrl = data.data.video.download_addr;
const videoTitle = data.data.desc;
// Trigger download
const a = document.createElement('a');
a.href = downloadUrl;
a.download = `${videoTitle}.mp4`;
a.click();
}
}
Use Case 2: Track Competitor Content Strategy
Monitor what your competitors are posting and analyze their engagement:
# Python example - Track competitors
competitors = ['competitor1', 'competitor2', 'competitor3']
analytics = []
for username in competitors:
# Get their latest posts
response = scrape_tiktok({
"endpoint": "/user/posts",
"params": {"unique_id": username, "count": "10"}
})
for video in response['data']['aweme_list']:
analytics.append({
'username': username,
'video_id': video['aweme_id'],
'views': video['statistics']['play_count'],
'likes': video['statistics']['digg_count'],
'engagement_rate': video['statistics']['digg_count'] / video['statistics']['play_count'],
'description': video['desc'],
'created': video['create_time']
})
# Sort by engagement rate
top_performing = sorted(analytics, key=lambda x: x['engagement_rate'], reverse=True)
print(f"Best performing video: {top_performing[0]}")
Use Case 3: Trend Discovery Dashboard
Build a dashboard that shows trending sounds, hashtags, and viral videos:
# Search for trending topics
trending_topics = ['fyp', 'viral', 'trending', 'challenge2025']
viral_videos = []
for topic in trending_topics:
response = scrape_tiktok({
"endpoint": "/feed/search",
"params": {"keywords": topic, "count": "50"}
})
# Filter for high-performing videos
for video in response['data']['data']:
if video['statistics']['play_count'] > 1000000:
viral_videos.append({
'topic': topic,
'video_url': f"https://tiktok.com/@{video['author']['unique_id']}/video/{video['aweme_id']}",
'views': video['statistics']['play_count'],
'engagement': video['statistics']['digg_count']
})
print(f"Found {len(viral_videos)} viral videos across trending topics")
Best Practices & Tips
✅ Do's
- ✓ Cache results: Store frequently accessed data to save on API calls
- ✓ Use pagination: Don't try to fetch everything at once—paginate through results
- ✓ Handle errors gracefully: Videos get deleted, users change usernames
- ✓ Respect rate limits: One request costs 1 credit—plan accordingly
⚠️ Common Mistakes
- ⚠ Wrong URL format: Video endpoint needs /video/ in URL, user endpoints need just username
- ⚠ Including @ symbol: Just use "tiktok", not "@tiktok"
- ⚠ Ignoring cursor: Always check has_more and use max_cursor for pagination
- ⚠ Not handling deleted content: Videos and users can disappear—check status codes
Getting Started
If you want to test the API without much setup, this is the fastest way to do it:
Quick Start Guide
-
1
Sign up for ScrapingBot — Get 100 free credits to test the API
-
2
Get your API key — Available instantly in your dashboard
-
3
Make your first request — Try any endpoint from this guide
-
4
Build from a real use case — Downloader, analytics dashboard, or trend tracker
Wrapping Up
TikTok scraping is still a moving target, but it becomes much easier to work with when the extraction layer is already handled for you.
If your work also touches Instagram, the companion guide Complete Guide to Instagram Scraping API covers a similar set of workflows for Instagram data.
Next step: Test one endpoint against a real URL, then decide whether you need only metadata, full media downloads, or recurring monitoring.