How to Get TikTok Profile Data with
JavaScript in 5 Minutes
Need TikTok profile data for your app?
This guide gets you from zero to live data
in under 5 minutes — no TikTok account,
no scraping, no proxies.
What You'll Get
By the end, you'll have:
- A working JavaScript function that returns full TikTok profile stats
- Follower count, total likes, video count
- Last N posts with engagement metrics
Step 1 — Get a Free API Key
Go to Scrapiq on RapidAPI and
subscribe to the free plan.
500 calls/month, no credit card required.
Copy your x-rapidapi-key from the dashboard.
Step 2 — Make Your First Call
const getTikTokProfile = async (username) => {
const response = await fetch(
`https://tiktok-data-pro-api.p.rapidapi.com/profile?username=${username}`,
{
headers: {
'x-rapidapi-key': 'YOUR_API_KEY',
'x-rapidapi-host': 'tiktok-data-pro-api.p.rapidapi.com'
}
}
);
return response.json();
};
// Usage
const data = await getTikTokProfile('khabi.lame');
console.log(data);
Step 3 — Parse the Response
The API returns clean, pre-structured JSON:
{
"success": true,
"username": "khabi.lame",
"data": {
"nickname": "Khabane lame",
"verified": true,
"followers": 162000000,
"following": 75,
"totalLikes": 2400000000,
"totalVideos": 64
},
"posts": [
{
"videoId": "7123456789",
"description": "😂 #viral",
"plays": 45000000,
"likes": 8900000,
"comments": 42000,
"shares": 280000,
"createdAt": "2025-03-01T12:00:00.000Z"
}
]
}
Step 4 — Build Something With It
Here's a quick React component that displays
a profile card:
const TikTokCard = ({ username }) => {
const [profile, setProfile] = useState(null);
useEffect(() => {
getTikTokProfile(username)
.then(data => setProfile(data.data));
}, [username]);
if (!profile) return <div>Loading...</div>;
return (
<div className="profile-card">
<h2>{profile.nickname}</h2>
<p>👥 {profile.followers.toLocaleString()} followers</p>
<p>❤️ {profile.totalLikes.toLocaleString()} total likes</p>
</div>
);
};
Hashtag Data Too
The same pattern works for hashtag trends:
const getHashtagTrends = async (tag, limit = 20) => {
const response = await fetch(
`https://tiktok-data-pro-api.p.rapidapi.com/hashtag?tag=${tag}&limit=${limit}`,
{
headers: {
'x-rapidapi-key': 'YOUR_API_KEY',
'x-rapidapi-host': 'tiktok-data-pro-api.p.rapidapi.com'
}
}
);
return response.json();
};
const trends = await getHashtagTrends('viral', 10);
What You Can Build With This
- 🎯 Influencer vetting tool
- 📊 TikTok analytics dashboard
- 🔍 Competitor content tracker
- 📣 Campaign hashtag monitor
- 🤖 AI content research pipeline
Try It Free
→ 500 free calls on RapidAPI
→ Live demo at scrapiq.in
Built by Scrapiq —
data APIs for developers.
Top comments (0)