How to Scrape TikTok Data

TikTok holds an enormous amount of publicly available data: creator profiles, video metadata, comments, trending hashtags, engagement metrics, and more. If you are building an influencer marketing platform, a social listening tool, or a research dashboard, you need a reliable way to get that data into your application.
This guide covers every approach to scraping TikTok data, from building your own scraper to using a dedicated API, with working code examples you can run today.
What is TikTok scraping?
TikTok scraping is the process of programmatically extracting public data from TikTok. This includes creator profiles, video metadata, comments, hashtags, trending content, and engagement statistics.
Businesses and developers scrape TikTok for many reasons:
- Influencer marketing: Finding creators in specific niches and evaluating their engagement
- Market research: Understanding what content performs well in a given category
- Competitive analysis: Tracking competitor brand mentions and campaign performance
- Content strategy: Identifying trending sounds, hashtags, and content formats
- Academic research: Studying social media behavior and content virality
What data can you scrape from TikTok?
Here is what is publicly available and commonly extracted:
| Data type | What you get |
|---|---|
| Profiles | Username, bio, follower count, following count, total likes, video count, verified status |
| Videos | Caption, view count, likes, comments, shares, saves, duration, cover image, sound used |
| Comments | Comment text, author, like count, reply count, timestamps, pinned status |
| Hashtags | Hashtag name, associated video counts, trending status |
| Trending feed | Currently trending videos by region with full engagement metrics |
| Search results | Users and content matching keyword queries |
| Sounds/music | Song details, usage counts, associated videos |
Methods to scrape TikTok data
1. TikTok's official Research API
TikTok offers official Research Tools for qualifying researchers conducting approved non-commercial work in eligible regions. Applicants submit a research proposal, and TikTok says they typically hear back within four weeks, although additional review can take longer.
Standard access allows 1,000 requests per day. TikTok documents separate higher-volume limits for follower and following research, while the video-query archive can take up to 48 hours to include new videos and up to 10 days to refresh some statistics. The product covers videos, users, comments, follower relationships, liked videos, pinned videos, and reposted videos.
It is a strong free option when your institution, region, and research purpose qualify. It is not designed for commercial product data access.
2. Building a custom scraper
You can build your own TikTok scraper using tools like Playwright, Puppeteer, or Selenium. This gives you full control but comes with real costs:
- TikTok actively blocks datacenter IP addresses
- The frontend changes frequently, breaking scrapers every few weeks
- You need residential proxy infrastructure ($50 to $500/month)
- Ongoing maintenance runs 5 to 10 hours per month
- At $150/hour developer time, that is $750 to $1,500/month just for upkeep
For learning projects, building a scraper is a great exercise. For production use, the economics rarely make sense.
3. Using a TikTok data API (recommended)
A dedicated TikTok API like CreatorCrawl gives you structured JSON responses, consistent schemas, sub-second response times, and zero maintenance burden. You make HTTP requests and get clean data back.
This is the approach most production applications use, and it is what the rest of this guide focuses on.
Step-by-step: Scraping TikTok data with CreatorCrawl
Prerequisites
- Sign up for CreatorCrawl (50 free credits, no card required)
- Generate an API key from your dashboard
- Have Python 3.7+ or Node.js 18+ installed
Scraping a TikTok profile
Python:
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://app.creatorcrawl.com/api"
response = requests.get(
f"{BASE_URL}/tiktok/profile",
params={"handle": "charlidamelio"},
headers={"x-api-key": API_KEY}
)
data = response.json()
user = data["user"]
stats = data["stats"]
print(f"Username: {user['uniqueId']}")
print(f"Followers: {stats['followerCount']:,}")
print(f"Total likes: {stats['heartCount']:,}")
print(f"Videos: {stats['videoCount']:,}")
print(f"Verified: {user['verified']}")
JavaScript:
const API_KEY = 'your_api_key_here'
const BASE_URL = 'https://app.creatorcrawl.com/api'
const response = await fetch(
`${BASE_URL}/tiktok/profile?handle=charlidamelio`,
{ headers: { 'x-api-key': API_KEY } }
)
const data = await response.json()
const { user, stats } = data
console.log(`Username: ${user.uniqueId}`)
console.log(`Followers: ${stats.followerCount.toLocaleString()}`)
console.log(`Total likes: ${stats.heartCount.toLocaleString()}`)
console.log(`Videos: ${stats.videoCount}`)
console.log(`Verified: ${user.verified}`)
Scraping a creator's videos
Pull all videos from a profile with pagination:
Python:
def get_all_videos(handle):
all_videos = []
cursor = None
while True:
params = {"handle": handle}
if cursor:
params["max_cursor"] = cursor
response = requests.get(
f"{BASE_URL}/tiktok/profile/videos",
params=params,
headers={"x-api-key": API_KEY}
)
data = response.json()
videos = data.get("aweme_list", [])
all_videos.extend(videos)
if not data.get("has_more"):
break
cursor = data.get("max_cursor")
return all_videos
videos = get_all_videos("charlidamelio")
for video in videos[:5]:
stats = video.get("statistics", {})
print(f"Caption: {video.get('desc', '')[:60]}")
print(f"Views: {stats.get('play_count', 0):,}")
print(f"Likes: {stats.get('digg_count', 0):,}")
print()
Scraping TikTok comments
Extract comments from any TikTok video:
JavaScript:
const videoUrl = 'https://www.tiktok.com/@charlidamelio/video/7321456789012345678'
const response = await fetch(
`${BASE_URL}/tiktok/video/comments?url=${encodeURIComponent(videoUrl)}`,
{ headers: { 'x-api-key': API_KEY } }
)
const data = await response.json()
for (const comment of data.comments) {
console.log(`@${comment.user.unique_id}: ${comment.text}`)
console.log(` Likes: ${comment.digg_count} | Replies: ${comment.reply_comment_total}`)
}
Scraping trending content
Get the current trending feed for any region:
Python:
response = requests.get(
f"{BASE_URL}/tiktok/get-trending-feed",
params={"region": "US"},
headers={"x-api-key": API_KEY}
)
trending = response.json()
for video in trending["aweme_list"][:10]:
stats = video["statistics"]
print(f"@{video['author']['unique_id']}: {video['desc'][:50]}")
print(f" Views: {stats['play_count']:,} | Likes: {stats['digg_count']:,}")
Searching for TikTok users
Find creators matching a keyword:
Python:
response = requests.get(
f"{BASE_URL}/tiktok/search/users",
params={"query": "fitness coach"},
headers={"x-api-key": API_KEY}
)
results = response.json()
for result in results["users"]:
user = result["user_info"]
print(f"@{user['unique_id']} - {user['nickname']}")
print(f" Followers: {user['follower_count']:,}")
print(f" Videos: {user['aweme_count']}")
Legal considerations
Scraping publicly available data is generally permissible, but there are important boundaries to respect:
- Only collect public data. Never attempt to access private accounts or data behind authentication.
- Respect robots.txt. When building your own scrapers, check TikTok's robots.txt directives.
- Follow data protection laws. GDPR, CCPA, and similar regulations apply to personal data even when it is publicly posted. Have a legitimate purpose for collection and handle data responsibly.
- Use an API when possible. APIs provide a cleaner legal position than raw scraping because you are accessing data through a structured interface rather than circumventing technical measures.
Using an API like CreatorCrawl means you are working with structured data endpoints rather than reverse-engineering the TikTok frontend, which is a cleaner approach from both a legal and practical standpoint.
Why an API beats building your own scraper
| Factor | Custom scraper | API (CreatorCrawl) |
|---|---|---|
| Setup time | Days to weeks | 30 seconds |
| Maintenance | 5-10 hours/month | Zero |
| Monthly cost | $820-2,200 (time + infra) | $29-299 (pay per use) |
| Data format | Raw HTML to parse | Clean JSON |
| Reliability | Breaks on frontend changes | Consistent uptime |
| Response time | 3-10 seconds (browser) | Sub-second |
| Scaling | Complex infrastructure | Just make more requests |
For production applications, a dedicated API saves you time, money, and headaches. Start with 50 free credits and see how much faster it is than maintaining a scraper.
Next steps
Once you have your TikTok data pipeline working:
- Extract video transcripts with the TikTok Transcript Tool
- Explore all available endpoints in the API Reference
- Learn about TikTok API alternatives in our comparison guide
- Build profile scraping workflows using the profile scraping use case guide
Explore CreatorCrawl
Try the free social media tools
Test transcripts, comments, profiles, channels, and tweets in your browser before moving to bulk API access.
More from the Blog
YouTube Transcript API: Get Video Transcripts in Python
Get a YouTube transcript through an API using Python, JavaScript, or curl. Includes timestamped JSON, language selection, and error handling.
Read article
INSTAGRAMHow to Download Instagram Data in 2026
Four ways to download Instagram data in 2026: in-app export, official Graph API, third-party data APIs, and DIY scrapers. With code and limits.
Read article
COMPAREInstagram API Cost and Pricing in 2026
How much does the Instagram API cost? Compare the free official Graph API with third-party profile, Reel, comment, and transcript APIs.
Read article