29 June 2026
How to Get TikTok Profile Data via API (With Code Examples)
Learn how to pull TikTok profile data — followers, likes, bio, and recent posts — programmatically via the TikTok Data Pro API. Includes cURL, JavaScript, and Python examples.
- tiktok api
- tutorial
- tiktok profile data api
TikTok's official API is restricted to approved partners and requires a lengthy review process. For most developers, marketers, and builders who just want basic public profile data — follower counts, engagement figures, recent videos — that approval never comes.
The TikTok Data Pro API on RapidAPI solves this. It exposes a clean REST endpoint that returns structured TikTok profile data for any public account. This guide shows you exactly how to use it, with working code examples in cURL, JavaScript, and Python.
What data does the API return?
A single call to /profile returns everything you need about a public TikTok account:
Profile fields (data object):
id— TikTok user IDname— the account handle (e.g.khaby.lame)nickname— display name (e.g.Khabane lame)bio— profile bio textverified— whether the account has a verification badgefollowers— total follower countfollowing— number of accounts they followtotalLikes— cumulative likes across all videostotalVideos— total video countprofileUrl— link to their TikTok profileavatar— profile image URL
Recent posts (posts array):
Each post object includes videoId, description, plays, likes, comments, shares, createdAt, and videoUrl. This lets you calculate real engagement metrics from actual data, not estimates.
Getting started
- Go to TikTok Data Pro on RapidAPI and subscribe to the free tier (25 calls, no credit card required).
- Copy your
x-rapidapi-keyfrom the dashboard. - Make a request to the profile endpoint — examples below.
Code examples
cURL
curl --request GET \
--url 'https://tiktok-data-pro.p.rapidapi.com/profile?username=khaby.lame' \
--header 'x-rapidapi-host: tiktok-data-pro.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_API_KEY'
JavaScript (fetch)
const response = await fetch(
'https://tiktok-data-pro.p.rapidapi.com/profile?username=khaby.lame',
{
method: 'GET',
headers: {
'x-rapidapi-host': 'tiktok-data-pro.p.rapidapi.com',
'x-rapidapi-key': 'YOUR_API_KEY',
},
}
);
const data = await response.json();
console.log(data.data.followers); // → follower count
console.log(data.posts); // → recent videos
Python
import requests
url = "https://tiktok-data-pro.p.rapidapi.com/profile"
params = {"username": "khaby.lame"}
headers = {
"x-rapidapi-host": "tiktok-data-pro.p.rapidapi.com",
"x-rapidapi-key": "YOUR_API_KEY",
}
response = requests.get(url, params=params, headers=headers)
data = response.json()
print(data["data"]["followers"]) # → follower count
print(data["data"]["totalLikes"]) # → cumulative likes
Sample response
{
"success": true,
"username": "khaby.lame",
"data": {
"id": "127905465618821121",
"name": "khaby.lame",
"nickname": "Khabane lame",
"bio": "If u wanna laugh u r in the right place 😎",
"verified": true,
"followers": 160600000,
"following": 86,
"totalLikes": 2600000000,
"totalVideos": 1314,
"profileUrl": "https://www.tiktok.com/@khaby.lame",
"avatar": "https://..."
},
"posts": [
{
"videoId": "7623088450576633119",
"description": "Not a good morning 🚑 #learnfromkhaby #comedy",
"plays": 6100000,
"likes": 463900,
"comments": 4696,
"shares": 14000,
"createdAt": "2026-03-30T16:37:04.000Z",
"videoUrl": "https://www.tiktok.com/@khaby.lame/video/7623088450576633119"
}
]
}
What you can build with this
A few real use cases from people already hitting the API:
- Influencer vetting tools — pull follower count and recent engagement before a brand partnership. A high follower count with low plays-per-video is a red flag.
- Competitive monitoring — track a competitor's posting frequency and engagement over time by scheduling daily profile pulls.
- Creator directories — build a searchable database of TikTok accounts with auto-refreshed stats.
- Analytics dashboards — combine profile data with hashtag data (from
/hashtag) to see how a creator's performance relates to trending topics.
Calculating engagement rate from the data
Once you have the posts array, you can calculate a real engagement rate rather than relying on estimates:
function engagementRate(posts, followers) {
if (!posts.length || followers === 0) return 0;
const totalInteractions = posts.reduce(
(sum, post) => sum + post.likes + post.comments + post.shares,
0
);
const avgInteractions = totalInteractions / posts.length;
return ((avgInteractions / followers) * 100).toFixed(2);
}
const rate = engagementRate(data.posts, data.data.followers);
console.log(`Engagement rate: ${rate}%`);
If you want to check engagement rates without writing code, try the free TikTok Engagement Rate Calculator — enter numbers manually and get an instant benchmark comparison.
Common questions
Does this work for private accounts? No. The API only returns data for public TikTok profiles. Private accounts return an error.
How often does the data update? Profile data reflects TikTok's public state at the time of the request. For tracking changes over time, schedule periodic calls and store the results yourself.
Is there a rate limit? The free tier includes 500 requests per month. Paid tiers on RapidAPI offer higher limits. The API also applies a per-minute rate limit server-side to ensure fair usage.
Can I get data for multiple profiles at once? The endpoint handles one username per request. For bulk lookups, run requests sequentially with a small delay between them to stay within rate limits.
Get started
Subscribe on RapidAPI and make your first call in under two minutes:
Get 25 free API calls on RapidAPI →
No credit card required on the free tier.