TikTok API
The TikTok API lets you look up user profiles, list videos, read comments and replies, search videos and users, explore hashtags, and traverse the social graph (followers / followings). Eleven endpoints, all at 1 credit per request.
Endpoints
| Endpoint | Description |
|---|---|
POST /api/v1/tiktok/profile | Get a user profile by username or sec_user_id |
POST /api/v1/tiktok/user/posts | List a user's videos (paginated, sortable) |
POST /api/v1/tiktok/video | Get full details for a single video |
POST /api/v1/tiktok/video/comments | List comments on a video |
POST /api/v1/tiktok/video/comments/replies | List replies to a specific comment |
POST /api/v1/tiktok/search/videos | Search TikTok videos by keyword |
POST /api/v1/tiktok/search/users | Search TikTok users by keyword |
POST /api/v1/tiktok/hashtag | Get hashtag details and stats |
POST /api/v1/tiktok/hashtag/videos | List videos for a hashtag |
POST /api/v1/tiktok/user/followers | List a user's followers |
POST /api/v1/tiktok/user/followings | List accounts a user follows |
Authentication
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_KEY | Yes |
Content-Type | application/json | Yes |
Every successful response includes credit tracking fields: credits_used, credits_remaining, and response_time (ms).
Getting a sec_user_id
Most endpoints require a sec_user_id instead of a username. Call the Profile endpoint first with a username, then use data.user.sec_uid for subsequent requests.
User Profile
POST https://api.scavio.dev
/api/v1/tiktok/profileGet a TikTok user profile. Pass either username or sec_user_id.
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
username | string | -- | TikTok handle (without @). One of username or sec_user_id required. |
sec_user_id | string | -- | Secure user ID. One of username or sec_user_id required. |
Example Request
curl -X POST 'https://api.scavio.dev
/api/v1/tiktok/profile' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"username": "tiktok"}'Response Fields (data.user)
| Field | Type | Description |
|---|---|---|
unique_id | string | Username (handle) |
nickname | string | Display name |
sec_uid | string | Secure user ID (use for other endpoints) |
uid | string | Numeric user ID |
signature | string | Bio text |
bio_url | string | Link in bio |
follower_count | number | Followers |
following_count | number | Following |
aweme_count | number | Total videos posted |
total_favorited | number | Total likes received |
avatar_larger | object | Avatar image (.url_list[0] for URL) |
Example Response
{
"data": {
"user": {
"unique_id": "tiktok",
"nickname": "TikTok",
"sec_uid": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
"uid": "107955",
"signature": "One TikTok can make a big impact",
"bio_url": "linktr.ee/tiktok",
"follower_count": 94015018,
"following_count": 1,
"aweme_count": 1510,
"total_favorited": 457945663
}
},
"response_time": 1245,
"credits_used": 1,
"credits_remaining": 11753
}User Posts
POST https://api.scavio.dev
/api/v1/tiktok/user/postsList a user's videos. Requires sec_user_id (get it from the profile endpoint).
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
sec_user_id | string | -- | Required. Secure user ID from profile endpoint. |
cursor | string | "0" | Pagination cursor. Use data.max_cursor from previous response. |
count | number | 20 | Results per page (1-30). |
sort_type | string | "0" | "0" = latest, "1" = popular. |
Pagination
Use data.max_cursor as cursor in the next request. Stop when data.has_more is 0.
Video Fields (data.aweme_list[])
| Field | Type | Description |
|---|---|---|
aweme_id | string | Video ID |
desc | string | Video caption |
create_time | number | Unix timestamp (seconds) |
statistics.digg_count | number | Likes |
statistics.comment_count | number | Comments |
statistics.play_count | number | Views |
statistics.share_count | number | Shares |
statistics.collect_count | number | Bookmarks |
author | object | Author info (subset of profile) |
music | object | Sound used |
video | object | Video URLs, dimensions, duration |
Video Detail
POST https://api.scavio.dev
/api/v1/tiktok/videoGet full details for a single video.
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
video_id | string | -- | Required. TikTok video ID. |
Example Request
curl -X POST 'https://api.scavio.dev
/api/v1/tiktok/video' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"video_id": "7350810998023949599"}'Additional Fields (data.aweme_detail)
Includes all video fields listed above, plus:
| Field | Type | Description |
|---|---|---|
video.play_addr | object | Video play URL (.url_list[0]) |
video.download_addr | object | Download URL (watermark-free) |
video.cover | object | Cover image |
video.duration | number | Duration in ms |
cha_list | array | Hashtags used |
text_extra | array | Mentions and hashtags in caption |
Example Response
{
"data": {
"aweme_detail": {
"aweme_id": "7350810998023949599",
"desc": "im so sick of being tired im so tired of being sick",
"create_time": 1711494099,
"statistics": {
"digg_count": 2002382,
"comment_count": 8119,
"play_count": 12171757,
"share_count": 274978,
"collect_count": 211332
}
}
},
"response_time": 1605,
"credits_used": 1,
"credits_remaining": 11752
}Video Comments
POST https://api.scavio.dev
/api/v1/tiktok/video/commentsGet comments on a video.
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
video_id | string | -- | Required. Video ID. |
cursor | string | "0" | Pagination cursor. |
count | number | 20 | Results per page (1-50). |
Pagination
Use data.cursor as the next cursor. Stop when data.has_more is 0.
Comment Fields (data.comments[])
| Field | Type | Description |
|---|---|---|
cid | string | Comment ID (use for replies endpoint) |
text | string | Comment text |
create_time | number | Unix timestamp (seconds) |
digg_count | number | Likes on this comment |
reply_comment_total | number | Reply count |
user | object | Commenter info (nickname, avatar, etc.) |
is_author_digged | number | 1 if video author liked this comment |
Comment Replies
POST https://api.scavio.dev
/api/v1/tiktok/video/comments/repliesGet replies to a specific comment.
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
video_id | string | -- | Required. Video ID. |
comment_id | string | -- | Required. Comment ID (cid from comments endpoint). |
cursor | string | "0" | Pagination cursor. |
count | number | 20 | Results per page (1-50). |
Pagination
Same as comments: use data.cursor, stop when data.has_more is 0. Each reply has the same fields as a comment object.
Search Videos
POST https://api.scavio.dev
/api/v1/tiktok/search/videosSearch TikTok videos by keyword.
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
keyword | string | -- | Required. Search query (1-500 chars). |
cursor | string | "0" | Pagination offset. |
count | number | 20 | Results per page (1-30). |
sort_type | string | "0" | "0" = relevance, "1" = most likes. |
publish_time | string | "0" | "0" = all time, "1" = last day, "7" = week, "30" = month, "90" = 3 months, "180" = 6 months. |
Example Request
curl -X POST 'https://api.scavio.dev
/api/v1/tiktok/search/videos' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"keyword": "cooking recipe", "count": 10, "publish_time": "7"}'Pagination
Use data.cursor as the next cursor. Stop when data.has_more is 0. Each item in data.aweme_list has the same structure as a video detail.
Search Users
POST https://api.scavio.dev
/api/v1/tiktok/search/usersSearch TikTok users by keyword.
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
keyword | string | -- | Required. Search query (1-500 chars). |
cursor | string | "0" | Pagination offset. |
count | number | 20 | Results per page (1-30). |
Response Fields (data.user_list[].user_info)
| Field | Type | Description |
|---|---|---|
uid | string | User ID |
unique_id | string | Username |
nickname | string | Display name |
sec_uid | string | Secure user ID |
follower_count | number | Followers |
signature | string | Bio |
Hashtag Info
POST https://api.scavio.dev
/api/v1/tiktok/hashtagGet hashtag details and stats. Pass either hashtag_name or hashtag_id.
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
hashtag_name | string | -- | Hashtag text (without #). One of hashtag_name or hashtag_id required. |
hashtag_id | string | -- | Numeric hashtag ID. One of hashtag_name or hashtag_id required. |
Response Fields
| Field | Type | Description |
|---|---|---|
data.challengeInfo.challenge.id | string | Hashtag ID (use for hashtag videos) |
data.challengeInfo.challenge.title | string | Hashtag name |
data.challengeInfo.challenge.desc | string | Description |
data.challengeInfo.stats.videoCount | number | Number of videos |
data.challengeInfo.stats.viewCount | number | Total views |
Example Response
{
"data": {
"challengeInfo": {
"challenge": {
"id": "229207",
"title": "fyp",
"desc": "",
"stats": {
"videoCount": 0,
"viewCount": 118798000000000
}
}
}
},
"response_time": 892,
"credits_used": 1,
"credits_remaining": 11751
}Hashtag Videos
POST https://api.scavio.dev
/api/v1/tiktok/hashtag/videosList videos for a hashtag. Requires hashtag_id (get it from the hashtag info endpoint).
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
hashtag_id | string | -- | Required. From hashtag info endpoint. |
cursor | string | "0" | Pagination cursor. |
count | number | 20 | Results per page (1-30). |
Pagination
Use data.cursor as the next cursor. Stop when data.has_more is 0. Response contains data.aweme_list[] with the same video structure as search and user posts.
User Followers
POST https://api.scavio.dev
/api/v1/tiktok/user/followersGet a user's follower list.
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
sec_user_id | string | -- | Required. From profile endpoint. |
count | number | 20 | Results per page (1-20). |
page_token | string | -- | From previous response data.next_page_token. |
min_time | number | -- | From previous response data.min_time. |
Pagination
Pass both page_token and min_time from the previous response. Stop when data.has_more is false.
Follower Fields (data.followers[])
| Field | Type | Description |
|---|---|---|
unique_id | string | Username |
nickname | string | Display name |
sec_uid | string | Secure user ID |
uid | string | User ID |
follower_count | number | Their follower count |
aweme_count | number | Their video count |
signature | string | Their bio |
avatar_thumb | object | Avatar (.url_list[0]) |
User Followings
POST https://api.scavio.dev
/api/v1/tiktok/user/followingsGet accounts a user follows. Same request shape and parameters as followers. Response uses data.followings[] instead of data.followers[].
Pagination Reference
| Style | Endpoints | Next page | Stop condition |
|---|---|---|---|
| Cursor (string) | user/posts | cursor = data.max_cursor | data.has_more === 0 |
| Offset (number) | search/*, hashtag/videos, video/comments, video/comments/replies | cursor = data.cursor | data.has_more === 0 |
| Token + time | user/followers, user/followings | page_token + min_time | data.has_more === false |
Notes
- All
create_timefields are Unix timestamps in seconds. Multiply by 1000 for JavaScriptDate. - Avatar and image fields return an object with a
url_listarray. Use.url_list[0]for the URL. - See Errors for
401,429, and502handling.