Unofficial TikTok Analytics API — Account and Video Stats
GET/api/v1/analytics
Audience insights for a public creator account: follower breakdown by country, age and gender, an overview for a date range, and growth milestones. Pass video for a single video's stats.
| Parameter | Description | |
|---|---|---|
username | optional | The account's username. One of username / user_id / sec_uid is required. |
user_id | optional | Numeric user id (instead of username). |
sec_uid | optional | sec_uid (instead of username). |
days | optional | Date window in days for the overview/time-series (default 7). |
video | optional | A video id or URL — returns THAT video's analytics instead of the account's. |
format | optional | Omit for the raw TikTok insight fields (default). clean for a tidy, flattened object. |
Returns
For an account: creator, milestones, overview, viewers, followers (demographics). For a video: views/likes/comments/favorites (+ history). Raw TikTok insight fields by default; flattened with format=clean.
Example Request
https://dev.omar-thing.site/api/v1/analytics?username=mrbeast&days=7&format=clean&key=YOUR_API_KEY
Example Response
{
"data": {
"analytics": {
"...": "format=clean shown; raw insight fields by default",
"creator": {
"followers": 140732092,
"likes": 1463530026,
"username": "mrbeast"
},
"followers": {
"...": "same demographic shape"
},
"milestones": [
{
"summary": "2 posts, avg 11.3M views/post",
"title": "Reached 1M followers",
"year": "2020"
}
],
"overview": {
"views": {
"change": -829,
"total": 1234567
}
},
"viewers": {
"age": {
"18-24": 0.11,
"25-34": 0.17,
"35-44": 0.51
},
"countries": [
{
"cities": {
"New York": 0.06
},
"country": "US",
"percent": 0.42
}
],
"gender": {
"Female": 0.35,
"Male": 0.65
}
}
},
"days": 7,
"user_id": "6614519312189947909",
"username": "mrbeast"
},
"status": "success"
}Sends a live request using your API key above.
More Profiles & Users endpoints
- Unofficial TikTok Profile API — Fetch a user's profile by username.
- Unofficial TikTok Followers API — List an account's followers.
- Unofficial TikTok Following API — List the accounts a user follows.
- Unofficial TikTok Current Region API — Get an account's current region (country) by its numeric user id.