Skip to main content

Documentation

Browse guides and endpoints

TikTok API Endpoints: Hashtags, Search, Videos, Trends

Search hashtags, run keyword search, and fetch video data with API Fast. Trending songs and trending videos are coming soon.

10 endpoints available

Endpoints marked

Coming soon
are not available for use yet.

Includes hashtag search, video URL downloads, and comment stats likedigg_count. Trending hashtags, songs, and videos are marked as coming soon.

TikTok Fields Glossary

  • digg_count: likes on comments or posts in TikTok responses.
  • play_count: video view count in TikTok post or video responses.
  • comment_count: number of comments on a TikTok post or video.
  • url: full TikTok video URL used bydownload/video.
  • search_id: pagination id returned by search/general.
Get Music Posts
Get posts that use a specific music/sound
GET /api/tiktok/music/posts

Parameters

Query Parameters
musicId
required
string

TikTok music ID

Example: 7224128604890990593

countnumber

Number of posts to retrieve

Example: 30

Default: 30

cursornumber

Pagination cursor

Example: 0

Default: 0

Code Examples

curl -X GET "https://apifast.dev/api/tiktok/music/posts?musicId=7224128604890990593&count=30&cursor=0" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "statusCode": 0,
  "itemList": [],
  "hasMore": false
}
Get User Info (Include User Region)
Get user information including region data
GET /api/tiktok/user/info-with-region

Parameters

Query Parameters
uniqueId
required
string

The unique ID (username) of the TikTok user

Example: taylorswift

Code Examples

curl -X GET "https://apifast.dev/api/tiktok/user/info-with-region?uniqueId=taylorswift" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "userInfo": {
    "user": {
      "id": "6881290705605477381",
      "shortId": "",
      "uniqueId": "taylorswift",
      "nickname": "Taylor Swift",
      "avatarLarger": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/c39c2807c155535cf328225955e00aba~tplv-tiktokx-cropcenter:1080:1080.jpeg",
      "avatarMedium": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/c39c2807c155535cf328225955e00aba~tplv-tiktokx-cropcenter:720:720.jpeg",
      "avatarThumb": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/c39c2807c155535cf328225955e00aba~tplv-tiktokx-cropcenter:100:100.jpeg",
      "signature": "This is pretty much just a cat account",
      "createTime": 1628514847,
      "verified": true,
      "secUid": "MS4wLjABAAAAqB08cUbXaDWqbD6MCga2RbGTuhfO2EsHayBYx08NDrN7IE3jQuRDNNN6YwyfH6_6",
      "ftc": false,
      "relation": 0,
      "openFavorite": true,
      "bioLink": {
        "link": "taylorswift.com",
        "risk": 0
      },
      "commentSetting": 0,
      "commerceUserInfo": {
        "commerceUser": false
      },
      "duetSetting": 0,
      "stitchSetting": 0,
      "privateAccount": false,
      "secret": false,
      "isADVirtual": false,
      "roomId": "",
      "uniqueIdModifyTime": 0,
      "ttSeller": false,
      "downloadSetting": 0,
      "profileTab": {
        "showMusicTab": true,
        "showQuestionTab": false,
        "showPlayListTab": false
      },
      "followingVisibility": 1,
      "recommendReason": "",
      "nowInvitationCardUrl": "",
      "nickNameModifyTime": 1629723423,
      "isEmbedBanned": false,
      "canExpPlaylist": true,
      "profileEmbedPermission": 1,
      "language": "en",
      "eventList": [],
      "suggestAccountBind": false,
      "isOrganization": 0,
      "UserStoryStatus": 0
    },
    "stats": {
      "followerCount": 33300000,
      "followingCount": 0,
      "heart": 263700000,
      "heartCount": 263700000,
      "videoCount": 78,
      "diggCount": 2276,
      "friendCount": 0
    },
    "statsV2": {
      "followerCount": "33270110",
      "followingCount": "0",
      "heart": "263678598",
      "heartCount": "263678598",
      "videoCount": "78",
      "diggCount": "2276",
      "friendCount": "0"
    },
    "itemList": []
  },
  "shareMeta": {
    "title": "Taylor Swift on TikTok",
    "desc": "@taylorswift 33.3m Followers, 0 Following, 263.7m Likes - Watch awesome short videos created by Taylor Swift"
  },
  "statusCode": 0,
  "statusMsg": "",
  "needFix": true
}
Search General
Search for general content on TikTok (videos, users, hashtags)
GET /api/tiktok/search/general

Parameters

Query Parameters
keyword
required
string

Search keyword

Example: cat

cursornumber

cursor parameter is used for pagination. In the first request, the default value of cursor is 0. For subsequent requests, the value of cursor will be taken from the response of the previous request. In the Search Endpoints, both cursor and search_id need to be provided when pagination is used. Default: 0

Example: 0

Default: 0

search_idstring

search_id parameter is used for pagination. In the first request, the default value of the search_id is 0. For subsequent requests, the value of the cursor will be taken from the response of the previous request (from: res.log_pb.impr_id). In the Search Endpoints, both cursor and search_id need to be provided when pagination is used

Example: 0

Default: 0

Code Examples

curl -X GET "https://apifast.dev/api/tiktok/search/general?keyword=cat&cursor=0&search_id=0" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "ad_info": {},
  "backtrace": "",
  "cursor": 12,
  "data": [
    {
      "common": {
        "doc_id_str": "7226469547300146433"
      },
      "item": {
        "author": {
          "uniqueId": "yourcat0222",
          "nickname": "yourcatฅ^._.^ฅ",
          "avatarLarger": "https://p16-sign-sg.tiktokcdn.com/aweme/1080x1080/tos-alisg-avt-0068/fe1d499e091833a2b6425d8eaf146576.jpeg",
          "verified": false
        },
        "desc": "#cat #猫 #cute #fyp ",
        "stats": {
          "diggCount": 642300,
          "shareCount": 80200,
          "commentCount": 10200,
          "playCount": 23000000
        }
      },
      "type": 1
    }
  ],
  "extra": {
    "logid": "20240204233241404F547D7FDCA23848EB",
    "now": 1707089563000,
    "search_request_id": ""
  },
  "global_doodle_config": {
    "feedback_survey": null
  },
  "has_more": 1,
  "log_pb": {
    "impr_id": "20240204233241404F547D7FDCA23848EB"
  },
  "qc": "",
  "status_code": 0
}
Get Post Detail
Get detailed information about a specific TikTok post/video
GET /api/tiktok/post/detail

Parameters

Query Parameters
videoId
required
string

TikTok video/post ID

Example: 7306132438047116586

Code Examples

curl -X GET "https://apifast.dev/api/tiktok/post/detail?videoId=7306132438047116586" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "itemInfo": {
    "itemStruct": {
      "id": "7306132438047116586",
      "desc": "Sample video description",
      "createTime": "1701091554",
      "author": {
        "id": "6881290705605477381",
        "uniqueId": "taylorswift",
        "nickname": "Taylor Swift",
        "avatarLarger": "https://p16-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/f8c7cad75f3a12205d31d6662d2555d5~c5_1080x1080.jpeg",
        "verified": true
      },
      "stats": {
        "diggCount": "5300000",
        "shareCount": "91200",
        "commentCount": "68700",
        "playCount": "44400000",
        "collectCount": "291901"
      },
      "statsV2": {
        "diggCount": "5300000",
        "shareCount": "91200",
        "commentCount": "68700",
        "playCount": "44400000",
        "collectCount": "291901",
        "repostCount": "0"
      },
      "video": {
        "id": "",
        "duration": 59,
        "cover": "https://p16-sign.tiktokcdn-us.com/obj/tos-useast5-p-0068-tx/3334e9d54705479d95c404e673e8cc00_1701091645",
        "playAddr": "https://v16-webapp-prime.tiktok.com/video/tos/maliva/tos-maliva-ve-0068c799-us/o0EpmZiEkvmyIJASWgY4BbUmIQWSEPbUiBiEP/",
        "downloadAddr": "https://v16-webapp-prime.tiktok.com/video/tos/maliva/tos-maliva-ve-0068c799-us/oYgPmYBbpkBEE4UEEKBvSiOybQQWmiIZASEoD/",
        "format": "mp4",
        "definition": "540p",
        "bitrate": 1221776,
        "codecType": "h264",
        "width": 576,
        "height": 1024
      },
      "music": {
        "id": "7306132624873917226",
        "title": "original sound",
        "authorName": "Taylor Swift",
        "duration": 59,
        "coverLarge": "https://p16-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/f8c7cad75f3a12205d31d6662d2555d5~c5_1080x1080.jpeg"
      }
    }
  },
  "shareMeta": {
    "title": "Taylor Swift on TikTok",
    "desc": "Sample video description"
  },
  "statusCode": 0,
  "statusMsg": "ok"
}
Get Comments of Post
Get comments for a specific TikTok post/video
GET /api/tiktok/post/comments

Parameters

Query Parameters
videoId
required
string

TikTok video/post ID

Example: 7306132438047116586

countnumber

count parameter specifies the number of results to be returned. The default and maximum value is 50

Example: 50

Default: 50

cursornumber

cursor parameter is used for pagination. In the first request, the default value of cursor is 0. For subsequent requests, the value of cursor will be taken from the response of the previous request

Example: 0

Default: 0

Code Examples

curl -X GET "https://apifast.dev/api/tiktok/post/comments?videoId=7306132438047116586&count=50&cursor=0" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "alias_comment_deleted": false,
  "comments": [
    {
      "cid": "7306133620770751250",
      "text": "justice for cardigan",
      "create_time": 1701091808,
      "digg_count": 47418,
      "reply_comment_total": 211,
      "user": {
        "uid": "7111130981097440257",
        "unique_id": "noootjasper",
        "nickname": "jasper💌",
        "avatar_thumb": {
          "uri": "tos-alisg-avt-0068/74d11452bbbf6d930b1e3e4c536a9e69",
          "url_list": [
            "https://p16-sign-sg.tiktokcdn.com/tos-alisg-avt-0068/74d11452bbbf6d930b1e3e4c536a9e69~tplv-tiktokx-cropcenter:100:100.jpg"
          ]
        }
      }
    }
  ],
  "cursor": 50,
  "has_more": 1,
  "total": 63136,
  "status_code": 0,
  "status_msg": ""
}
Get Music Info
Get detailed information about a specific TikTok music/sound
GET /api/tiktok/music/info

Parameters

Query Parameters
musicId
required
string

TikTok music ID

Example: 7556815852168759313

Code Examples

curl -X GET "https://apifast.dev/api/tiktok/music/info?musicId=7556815852168759313" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "data": {
    "extra": {
      "logid": "202511201405493EF3AD8D51F7D3770EED",
      "now": 1763618749000
    },
    "log_pb": {
      "impr_id": "202511201405493EF3AD8D51F7D3770EED"
    },
    "musicInfo": {
      "music": {
        "id": "7556815852168759313",
        "title": "The Fate of Ophelia",
        "authorName": "Taylor Swift",
        "album": "The Life of a Showgirl",
        "duration": 60,
        "coverLarge": "https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/oQewhAfrNQKV6AteGNQAhmGGAjcLIMrYKAnexf.jpeg",
        "coverMedium": "https://p16-sg.tiktokcdn.com/aweme/200x200/tos-alisg-v-2774/oQewhAfrNQKV6AteGNQAhmGGAjcLIMrYKAnexf.jpeg",
        "coverThumb": "https://p16-sg.tiktokcdn.com/aweme/100x100/tos-alisg-v-2774/oQewhAfrNQKV6AteGNQAhmGGAjcLIMrYKAnexf.jpeg",
        "playUrl": "https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-ve-2774/oMoOQfKtCDE1Mg7qWVyBfFF1RBQXZYxKZ13Bhd",
        "isCopyrighted": true,
        "original": false,
        "private": false
      },
      "artist": {
        "id": "6881290705605477381",
        "uniqueId": "taylorswift",
        "nickname": "Taylor Swift",
        "avatarLarger": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/c39c2807c155535cf328225955e00aba~tplv-tiktokx-cropcenter:1080:1080.jpeg",
        "signature": "This is pretty much just a cat account",
        "verified": true
      },
      "stats": {
        "videoCount": 737500
      }
    },
    "shareMeta": {
      "title": "Taylor Swift | ♬ The Fate of Ophelia | on TikTok",
      "desc": "737.5k videos - Watch awesome short videos created with ♬ The Fate of Ophelia"
    },
    "statusCode": 0,
    "status_code": 0,
    "status_msg": ""
  }
}
Download Video
Download TikTok video by URL
GET /api/tiktok/download/video

Parameters

Query Parameters
url
required
string

TikTok video URL

Example: https://www.tiktok.com/@taylorswift/video/7558098574555254046

Code Examples

curl -X GET "https://apifast.dev/api/tiktok/download/video?url=https%3A%2F%2Fwww.tiktok.com%2F%40taylorswift%2Fvideo%2F7558098574555254046" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "play": "https://v16-coin.tiktokcdn.com/bcc1d44dae381bf970ed40b97d4d3481/69246a9c/video/tos/maliva/tos-maliva-ve-0068c799-us/oIBCEAlvdiDkwVjVcPaCP6sCTOEQBi4IlyRBA/",
  "play_watermark": "https://v16-coin.tiktokcdn.com/bcca7013f60fe93b2cf5570ec0347334/69246a9c/video/tos/maliva/tos-maliva-ve-0068c799-us/oYH4VQUIDlsK8BhIAEfXAegxLFwHEoEEl1CRkH/"
}
Get Trending Hashtags
Coming soon
Get trending hashtags on TikTok. Coming soon...
GET /api/tiktok/trending/hashtag
This endpoint is coming soon and is not yet available.
Get Trending Songs
Coming soon
Get trending songs on TikTok. Coming soon...
GET /api/tiktok/trending/songs
This endpoint is coming soon and is not yet available.
Get Trending Videos
Coming soon
Get trending videos on TikTok. Coming soon...
GET /api/tiktok/trending/videos
This endpoint is coming soon and is not yet available.