TikTok has over 1.5 billion monthly active users in 2026. For developers and data teams, accessing TikTok data — video metrics, hashtag trends, creator profiles — is essential for brand monitoring, trend detection, and competitive analysis.
This guide covers what TikTok data is available, the legal considerations, and how to extract it programmatically.
Why TikTok Data Matters
TikTok influences purchasing decisions, shapes culture, and launches trends faster than any other platform:
- Brand monitoring — Track mentions of your brand or products across TikTok
- Trend detection — Identify viral hashtags and sounds before they peak
- Competitor analysis — Monitor rival brands' TikTok presence and engagement
- Creator economy research — Find influencers by niche, follower count, and engagement rate
- Market research — Understand Gen Z and Millennial preferences through content trends
The Legal Landscape
Before extracting any data, understand the rules:
- TikTok's Terms of Service prohibit unauthorized scraping
- Public data (video metadata visible without login) is generally considered fair game for research purposes in most jurisdictions
- Private data (DMs, private accounts, personal info) is off-limits
- The EU's GDPR and California's CCPA add additional requirements around personal data
- Always respect robots.txt and rate limits
The safest approach: only collect publicly visible metadata (view counts, hashtags, post dates) — not user-generated content or personal information.
What Public Data Is Available?
Here's what you can extract from public TikTok profiles and videos:
Video Metadata
- Video URL and ID
- Description and hashtags
- View count, like count, comment count, share count
- Music/sound used
- Post date
- Duration
Creator Profiles
- Username and display name
- Follower count and following count
- Total likes received
- Bio and profile picture URL
- Verified status
Hashtag Data
- Total videos using the hashtag
- Total views for the hashtag
- Related hashtags
TikTok Research API (Official)
TikTok offers a Research API for academic and commercial research. However:
- Application process is lengthy (weeks to months)
- Limited to approved research use cases
- Strict rate limits and data retention policies
- Not available for all countries
For most developers, the Research API isn't practical for production use.
Extracting TikTok Data with Apify
For reliable, structured data extraction, I built a TikTok Scraper on Apify that handles TikTok's anti-bot protections and outputs clean JSON.
Features
- Search by keyword, hashtag, or username
- Extract video metadata and creator profiles
- Automatic proxy rotation and browser fingerprinting
- Structured JSON output ready for analysis
- Pay-per-result pricing
Python Code Example
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
# Search TikTok videos by hashtag
run_input = {
"hashtags": ["python", "coding"],
"maxResults": 30,
"sortBy": "likes"
}
run = client.actor("cryptosignals/tiktok-scraper").call(run_input=run_input)
# Process results
for video in client.dataset(run["defaultDatasetId"]).iterate_items():
print(f"Description: {video['description']}")
print(f"Views: {video['viewCount']}")
print(f"Likes: {video['likeCount']}")
print(f"Comments: {video['commentCount']}")
print(f"Shares: {video['shareCount']}")
print(f"Creator: @{video['authorUsername']}")
print(f"Hashtags: {video['hashtags']}")
print(f"Music: {video['musicTitle']}")
print(f"Posted: {video['createTime']}")
print("---")
Sample JSON Output
{
"description": "Learn Python in 60 seconds #python #coding #tech",
"url": "https://tiktok.com/@coder/video/123456",
"viewCount": 1250000,
"likeCount": 89000,
"commentCount": 1200,
"shareCount": 4500,
"authorUsername": "coder",
"authorFollowers": 350000,
"hashtags": ["python", "coding", "tech"],
"musicTitle": "original sound - coder",
"createTime": "2026-02-20T18:30:00Z",
"duration": 58
}
Building a Trend Detection Pipeline
Here's a practical example — monitoring hashtag trends daily:
from apify_client import ApifyClient
import json
from datetime import datetime
client = ApifyClient("YOUR_APIFY_TOKEN")
def track_hashtag_trend(hashtag: str, days: int = 7):
"""Track a hashtag's daily video volume and engagement."""
run_input = {
"hashtags": [hashtag],
"maxResults": 100,
"sortBy": "date"
}
run = client.actor("cryptosignals/tiktok-scraper").call(run_input=run_input)
videos = list(client.dataset(run["defaultDatasetId"]).iterate_items())
total_views = sum(v.get("viewCount", 0) for v in videos)
total_likes = sum(v.get("likeCount", 0) for v in videos)
avg_engagement = total_likes / total_views * 100 if total_views else 0
return {
"hashtag": hashtag,
"videos_found": len(videos),
"total_views": total_views,
"total_likes": total_likes,
"avg_engagement_rate": round(avg_engagement, 2),
"checked_at": datetime.now().isoformat()
}
# Track multiple hashtags
hashtags = ["aitools", "pythontips", "techreview"]
for tag in hashtags:
trend = track_hashtag_trend(tag)
print(json.dumps(trend, indent=2))
Use Cases in Practice
1. Brand Monitoring
Track mentions of your brand name and product names. Alert when a video goes viral — positive or negative.
2. Influencer Discovery
Find creators in your niche with high engagement rates (likes/views ratio > 5%). Filter by follower count range to find micro-influencers.
3. Content Strategy
Analyze which video formats, lengths, and posting times perform best in your niche. Use this data to optimize your own TikTok content.
4. Competitive Intelligence
Monitor competitor branded hashtags. Track their posting frequency, engagement trends, and which content types resonate.
Data Processing Tips
import pandas as pd
# Load scraped data into a DataFrame
df = pd.DataFrame(videos)
# Engagement rate calculation
df["engagement_rate"] = (df["likeCount"] + df["commentCount"]) / df["viewCount"] * 100
# Best posting times
df["hour"] = pd.to_datetime(df["createTime"]).dt.hour
best_hours = df.groupby("hour")["viewCount"].mean().sort_values(ascending=False)
print("Best posting hours by avg views:")
print(best_hours.head(5))
# Top performing hashtags
from collections import Counter
all_tags = [tag for tags in df["hashtags"] for tag in tags]
tag_counts = Counter(all_tags).most_common(10)
print("\nMost common hashtags in top videos:")
for tag, count in tag_counts:
print(f" #{tag}: {count} videos")
Conclusion
TikTok data is valuable for any team doing social media research, brand monitoring, or trend analysis. While the official Research API has a lengthy approval process, tools like the TikTok Scraper on Apify let you start extracting structured data immediately.
Stick to public data, respect rate limits, and focus on metadata rather than content — and you'll have a powerful data pipeline for TikTok analytics.
Top comments (0)