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

EndpointDescription
POST /api/v1/tiktok/profileGet a user profile by username or sec_user_id
POST /api/v1/tiktok/user/postsList a user's videos (paginated, sortable)
POST /api/v1/tiktok/videoGet full details for a single video
POST /api/v1/tiktok/video/commentsList comments on a video
POST /api/v1/tiktok/video/comments/repliesList replies to a specific comment
POST /api/v1/tiktok/search/videosSearch TikTok videos by keyword
POST /api/v1/tiktok/search/usersSearch TikTok users by keyword
POST /api/v1/tiktok/hashtagGet hashtag details and stats
POST /api/v1/tiktok/hashtag/videosList videos for a hashtag
POST /api/v1/tiktok/user/followersList a user's followers
POST /api/v1/tiktok/user/followingsList accounts a user follows

Authentication

HeaderValueRequired
AuthorizationBearer YOUR_API_KEYYes
Content-Typeapplication/jsonYes

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

Bash
POST https://api.scavio.dev
/api/v1/tiktok/profile

Get a TikTok user profile. Pass either username or sec_user_id.

Request Body

ParameterTypeDefaultDescription
usernamestring--TikTok handle (without @). One of username or sec_user_id required.
sec_user_idstring--Secure user ID. One of username or sec_user_id required.

Example Request

Bash
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)

FieldTypeDescription
unique_idstringUsername (handle)
nicknamestringDisplay name
sec_uidstringSecure user ID (use for other endpoints)
uidstringNumeric user ID
signaturestringBio text
bio_urlstringLink in bio
follower_countnumberFollowers
following_countnumberFollowing
aweme_countnumberTotal videos posted
total_favoritednumberTotal likes received
avatar_largerobjectAvatar image (.url_list[0] for URL)

Example Response

JSON
{
  "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

Bash
POST https://api.scavio.dev
/api/v1/tiktok/user/posts

List a user's videos. Requires sec_user_id (get it from the profile endpoint).

Request Body

ParameterTypeDefaultDescription
sec_user_idstring--Required. Secure user ID from profile endpoint.
cursorstring"0"Pagination cursor. Use data.max_cursor from previous response.
countnumber20Results per page (1-30).
sort_typestring"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[])

FieldTypeDescription
aweme_idstringVideo ID
descstringVideo caption
create_timenumberUnix timestamp (seconds)
statistics.digg_countnumberLikes
statistics.comment_countnumberComments
statistics.play_countnumberViews
statistics.share_countnumberShares
statistics.collect_countnumberBookmarks
authorobjectAuthor info (subset of profile)
musicobjectSound used
videoobjectVideo URLs, dimensions, duration

Video Detail

Bash
POST https://api.scavio.dev
/api/v1/tiktok/video

Get full details for a single video.

Request Body

ParameterTypeDefaultDescription
video_idstring--Required. TikTok video ID.

Example Request

Bash
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:

FieldTypeDescription
video.play_addrobjectVideo play URL (.url_list[0])
video.download_addrobjectDownload URL (watermark-free)
video.coverobjectCover image
video.durationnumberDuration in ms
cha_listarrayHashtags used
text_extraarrayMentions and hashtags in caption

Example Response

JSON
{
  "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

Bash
POST https://api.scavio.dev
/api/v1/tiktok/video/comments

Get comments on a video.

Request Body

ParameterTypeDefaultDescription
video_idstring--Required. Video ID.
cursorstring"0"Pagination cursor.
countnumber20Results per page (1-50).

Pagination

Use data.cursor as the next cursor. Stop when data.has_more is 0.

Comment Fields (data.comments[])

FieldTypeDescription
cidstringComment ID (use for replies endpoint)
textstringComment text
create_timenumberUnix timestamp (seconds)
digg_countnumberLikes on this comment
reply_comment_totalnumberReply count
userobjectCommenter info (nickname, avatar, etc.)
is_author_diggednumber1 if video author liked this comment

Comment Replies

Bash
POST https://api.scavio.dev
/api/v1/tiktok/video/comments/replies

Get replies to a specific comment.

Request Body

ParameterTypeDefaultDescription
video_idstring--Required. Video ID.
comment_idstring--Required. Comment ID (cid from comments endpoint).
cursorstring"0"Pagination cursor.
countnumber20Results 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

Bash
POST https://api.scavio.dev
/api/v1/tiktok/search/videos

Search TikTok videos by keyword.

Request Body

ParameterTypeDefaultDescription
keywordstring--Required. Search query (1-500 chars).
cursorstring"0"Pagination offset.
countnumber20Results per page (1-30).
sort_typestring"0""0" = relevance, "1" = most likes.
publish_timestring"0""0" = all time, "1" = last day, "7" = week, "30" = month, "90" = 3 months, "180" = 6 months.

Example Request

Bash
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

Bash
POST https://api.scavio.dev
/api/v1/tiktok/search/users

Search TikTok users by keyword.

Request Body

ParameterTypeDefaultDescription
keywordstring--Required. Search query (1-500 chars).
cursorstring"0"Pagination offset.
countnumber20Results per page (1-30).

Response Fields (data.user_list[].user_info)

FieldTypeDescription
uidstringUser ID
unique_idstringUsername
nicknamestringDisplay name
sec_uidstringSecure user ID
follower_countnumberFollowers
signaturestringBio

Hashtag Info

Bash
POST https://api.scavio.dev
/api/v1/tiktok/hashtag

Get hashtag details and stats. Pass either hashtag_name or hashtag_id.

Request Body

ParameterTypeDefaultDescription
hashtag_namestring--Hashtag text (without #). One of hashtag_name or hashtag_id required.
hashtag_idstring--Numeric hashtag ID. One of hashtag_name or hashtag_id required.

Response Fields

FieldTypeDescription
data.challengeInfo.challenge.idstringHashtag ID (use for hashtag videos)
data.challengeInfo.challenge.titlestringHashtag name
data.challengeInfo.challenge.descstringDescription
data.challengeInfo.stats.videoCountnumberNumber of videos
data.challengeInfo.stats.viewCountnumberTotal views

Example Response

JSON
{
  "data": {
    "challengeInfo": {
      "challenge": {
        "id": "229207",
        "title": "fyp",
        "desc": "",
        "stats": {
          "videoCount": 0,
          "viewCount": 118798000000000
        }
      }
    }
  },
  "response_time": 892,
  "credits_used": 1,
  "credits_remaining": 11751
}

Hashtag Videos

Bash
POST https://api.scavio.dev
/api/v1/tiktok/hashtag/videos

List videos for a hashtag. Requires hashtag_id (get it from the hashtag info endpoint).

Request Body

ParameterTypeDefaultDescription
hashtag_idstring--Required. From hashtag info endpoint.
cursorstring"0"Pagination cursor.
countnumber20Results 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

Bash
POST https://api.scavio.dev
/api/v1/tiktok/user/followers

Get a user's follower list.

Request Body

ParameterTypeDefaultDescription
sec_user_idstring--Required. From profile endpoint.
countnumber20Results per page (1-20).
page_tokenstring--From previous response data.next_page_token.
min_timenumber--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[])

FieldTypeDescription
unique_idstringUsername
nicknamestringDisplay name
sec_uidstringSecure user ID
uidstringUser ID
follower_countnumberTheir follower count
aweme_countnumberTheir video count
signaturestringTheir bio
avatar_thumbobjectAvatar (.url_list[0])

User Followings

Bash
POST https://api.scavio.dev
/api/v1/tiktok/user/followings

Get accounts a user follows. Same request shape and parameters as followers. Response uses data.followings[] instead of data.followers[].

Pagination Reference

StyleEndpointsNext pageStop condition
Cursor (string)user/postscursor = data.max_cursordata.has_more === 0
Offset (number)search/*, hashtag/videos, video/comments, video/comments/repliescursor = data.cursordata.has_more === 0
Token + timeuser/followers, user/followingspage_token + min_timedata.has_more === false

Notes

  • All create_time fields are Unix timestamps in seconds. Multiply by 1000 for JavaScript Date.
  • Avatar and image fields return an object with a url_list array. Use .url_list[0] for the URL.
  • See Errors for 401, 429, and 502 handling.