TikAPI is an unofficial API platform on top of TikTok. Our API is RESTful. It has predictable resource URLs. It uses HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library to work with TikAPI.
TikAPI endpoints fall into two categories:
Public Data
Which are endpoints for getting any TikTok Public information, such as profile information, feed posts, videos, hashtags, etc. You don't need any TikTok account authentication to use the Public Data endpoints.
Authenticated Users
These Endpoints are for getting information or performing interactions on authorized TikTok accounts that have been authenticated through our OAuth platform.
Now to start using TikAPI you will need an API Key. If you don't already have one, you can sign up for a free trial subscription and get your API Key.
If you just want to do some testings first, then you can just use our Sandbox server.
For using the authenticated user endpoints you will need to get an Account Key by asking users for authorization. Or you can authenticate your own account(s) from the Developer Dashboard with a click of a button.
The API is meant to be used on server-side only, because it would be a security issue to directly expose your API Key in the front-end.
import TikAPI from 'tikapi';
const api = TikAPI('DemoAPIKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39Asd4s');
ES6 Import syntax is recommended
Common JS
const TikAPI = require('tikapi').default;
const api = TikAPI('DemoAPIKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39Asd4s');
from tikapi import TikAPI
api = TikAPI('DemoAPIKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39Asd4s');
Enabling sandbox in Javascript:
api.set({
$sandbox: true
});
Enabling sandbox server in Python:
api.set(
__sandbox__=True
)
Sandbox API Key:
DemoAPIKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39Asd4s
Sandbox Account Key:
DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A
Scroll down the documentation for more specific usage examples on all endpoints 🙃
This error can occur for different reasons. Usually the message includes more information about the error, and might also include a TikTok statusCode
paramater.
{
"status": "error",
"message":"Something went wrong."
}
The Account Key is no longer valid and a re-authorization is required.
When this error occurs you should notify the user and send a new authorization link.
{
"status": "error",
"message": "Account session expired, please ask user to re-login and re-authorize.",
"statusCode": 8
}
This means that you have reached your subscription daily request limit or bandwidth limit. You should upgrade your subscription or just wait a few hours until the limit rests.
Learn more about the rate-limit reset
{
"status": "error",
"message":"API Key Rate-Limit reached."
}
{
"status": "error",
"message": "User doesn't exist",
"statusCode": 10202
}
Here is the description of some of the error codes:
2054: "Video is unavailable or deleted.",
2752: "Ad video is unavailable.",
10000: "TikTok Captcha Error",
10101: "TikTok Server Error",
10102: "User not logged-in",
10111: "TikTok Network Error",
10113: "TikTok blocked resource",
10114: "TikTok blocked resource",
10119: "User not logged-in for Live",
10202: "User doesn't exist",
10203: "Music doesn't exist",
10204: "Video doesn't exist",
10205: "Hashtag doesn't exist",
10208: "Effect doesn't exist",
10209: "Hashtag is blacklisted",
10210: "Live doesn't exist",
10211: "Hashtag is sensitive",
10212: "Hashtag error",
10215: "Video is currently unavailable",
10216: "Video is private",
10217: "Video is currently unavailable",
10218: "Music error",
10219: "Music copyright error",
10220: "Video music error",
10221: "User is banned",
10223: "User error",
10224: "Entity doesn't exist",
10225: "User unique sensitivity",
10227: "Video is under review",
10228: "Video is under risk control",
10229: "Video is hidden",
10230: "Video is under risk control",
10231: "Video is not visible on your country",
10241: "Video is deleted.",
10242: "This video has restricted access",
10404: "List limit reached"
Get profile information and statistics from a username.
username | string Example: username=lilyachty The TikTok user username |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.check({ username: "lilyachty" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20231013174203BDE111AE1C4F032047CD",
- "now": 1697218923000
}, - "log_pb": {
- "impr_id": "20231013174203BDE111AE1C4F032047CD"
}, - "message": "",
- "shareMeta": {
- "desc": "@lilyachty 8.3m Followers, 88 Following, 189.2m Likes - Watch awesome short videos created by lilyachty",
- "title": "lilyachty on TikTok"
}, - "status": "success",
- "statusCode": 0,
- "status_code": 0,
- "userInfo": {
- "stats": {
- "diggCount": 0,
- "followerCount": 8300000,
- "followingCount": 88,
- "friendCount": 75,
- "heart": 189200000,
- "heartCount": 189200000,
- "videoCount": 214
}, - "user": {
- "canExpPlaylist": true,
- "commentSetting": 0,
- "commerceUserInfo": {
- "commerceUser": false
}, - "duetSetting": 0,
- "followingVisibility": 1,
- "ftc": false,
- "id": "6569595380449902597",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "isUnderAge18": false,
- "nickname": "lilyachty",
- "openFavorite": false,
- "privateAccount": false,
- "profileEmbedPermission": 1,
- "profileTab": {
- "showMusicTab": true,
- "showPlayListTab": false
}, - "relation": 0,
- "secUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": false,
- "signature": "I love girls with freckled faces",
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "lilyachty",
- "verified": true
}
}
}
secUid required | string Example: secUid=MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud The TikTok user secUid. You can get this from the Get profile information endpoint using the username. |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.posts({ secUid: "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud" }); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "1636508835000",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "2023101317420621382E6C1237C820A98B",
- "now": 1697218926000
}, - "hasMore": true,
- "itemList": [
- {
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6569595380449902597",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "lilyachty",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": false,
- "signature": "I love girls with freckled faces",
- "stitchSetting": 0,
- "uniqueId": "lilyachty",
- "verified": true
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "7253193244845015082",
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "title": "chromespeedchallenge"
}
], - "collected": false,
- "contents": [
- {
- "desc": "I was itnorant as hell.. i aint gone lie .. @A Safe Place Pod ",
- "textExtra": [
- {
- "awemeId": "",
- "end": 61,
- "hashtagName": "",
- "isCommerce": false,
- "secUid": "MS4wLjABAAAAN_UXHzNFuBIWF_n6KTGUzAu8vVAyQWD-Un5iHoOueB9rQoFhg4Q9Et3jsr8tN-_t",
- "start": 44,
- "subType": 0,
- "type": 0,
- "userId": "7174112371630539822",
- "userUniqueId": "asafeplacepod"
}
]
}
], - "createTime": 1697172982,
- "desc": "I was itnorant as hell.. i aint gone lie .. @A Safe Place Pod ",
- "digged": false,
- "duetDisplay": 0,
- "duetEnabled": true,
- "forFriend": false,
- "id": "7289302306921860398",
- "itemCommentStatus": 0,
- "music": {
- "authorName": "lilyachty",
- "duration": 41,
- "id": "7289302423758228270",
- "original": false,
- "title": "original sound"
}, - "officalItem": false,
- "originalItem": false,
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "stats": {
- "collectCount": 360,
- "commentCount": 32,
- "diggCount": 10600,
- "playCount": 68900,
- "shareCount": 14
}, - "stitchDisplay": 0,
- "textExtra": [
- {
- "awemeId": "",
- "end": 61,
- "hashtagName": "",
- "isCommerce": false,
- "secUid": "MS4wLjABAAAAN_UXHzNFuBIWF_n6KTGUzAu8vVAyQWD-Un5iHoOueB9rQoFhg4Q9Et3jsr8tN-_t",
- "start": 44,
- "subType": 0,
- "type": 0,
- "userId": "7174112371630539822",
- "userUniqueId": "asafeplacepod"
}
], - "video": {
- "bitrate": 672311,
- "bitrateInfo": [
- {
- "Bitrate": 672311,
- "CodecType": "h264",
- "GearName": "normal_540_0",
- "PlayAddr": {
- "DataSize": 3519132,
- "FileCs": "c:0-26931-e132",
- "FileHash": "7fdda4288c9559103da6950b6c13caa7",
- "Uri": "v12044gd0000ckkcrcjc77ueepubu1q0",
- "UrlKey": "v12044gd0000ckkcrcjc77ueepubu1q0_h264_540p_672311",
}, - "QualityType": 20
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 41,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7289302306921860398",
- "ratio": "540p",
- "subtitleInfos": [
- {
- "Format": "webvtt",
- "LanguageCodeName": "eng-US",
- "LanguageID": "2",
- "Size": 1564,
- "Source": "ASR",
- "UrlExpire": 1697240567,
- "Version": "1"
}
], - "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -18.2,
- "Peak": 1
}, - "width": 576,
- "zoomCover": {
}
}
}
], - "log_pb": {
- "impr_id": "2023101317420621382E6C1237C820A98B"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
secUid required | string Example: secUid=MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud The TikTok user secUid. You can get this from the Get profile information endpoint using the username. |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.likes({ secUid: "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud" }); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "1696827055000",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20231013174208A8729872CCC41827A99C",
- "now": 1697218928000
}, - "hasMore": true,
- "log_pb": {
- "impr_id": "20231013174208A8729872CCC41827A99C"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
Get followers list of any public profile.
secUid required | string Example: secUid=MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud The TikTok user secUid. You can get this from the Get profile information endpoint using the username. |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
nextCursor | string A iteration parameter returned in each response, should be included in the next requests to get the next items. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.followersList({ secUid: "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud" }); console.log(response?.json); while(response){ let nextCursor = response?.json?.nextCursor; console.log("Getting next items ", nextCursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20231013174209041DDCAF10DA1B29AD5D",
- "now": 1697218930000
}, - "hasMore": true,
- "log_pb": {
- "impr_id": "20231013174209041DDCAF10DA1B29AD5D"
}, - "message": "",
- "nextCursor": "MTY5NzIxNjE5My0tLXNwbGl0X2N1c3Jvci0tLTE2OTcyMTg5MTM=",
- "status": "success",
- "statusCode": 0,
- "status_code": 0,
- "userList": [
- {
- "stats": {
- "diggCount": 11300,
- "followerCount": 507,
- "followingCount": 399,
- "friendCount": 0,
- "heart": 16000,
- "heartCount": 16000,
- "videoCount": 66
}, - "user": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6959217619383911430",
- "isADVirtual": false,
- "nickname": "barbiewrld",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAhYkt01CyuDRVbdqy2kIuiYKLpoO8c5QGiKvIty-YcgbxWH1EOtyt_5TyAc2kHH5J",
- "secret": false,
- "signature": "snap-linzinatir",
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "linzisbarbiewrld",
- "verified": false
}
}
]
}
Get following list of any public profile.
secUid required | string Example: secUid=MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud The TikTok user secUid. You can get this from the Get profile information endpoint using the username. |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
nextCursor | string A iteration parameter returned in each response, should be included in the next requests to get the next items. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.followingList({ secUid: "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud" }); console.log(response?.json); while(response){ let nextCursor = response?.json?.nextCursor; console.log("Getting next items ", nextCursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20231013174211F394F2FA6193DA288857",
- "now": 1697218933000
}, - "hasMore": true,
- "log_pb": {
- "impr_id": "20231013174211F394F2FA6193DA288857"
}, - "message": "",
- "nextCursor": "MTY0OTk3OTY0OS0tLXNwbGl0X2N1c3Jvci0tLTE2OTY4MTA0MDg=",
- "status": "success",
- "statusCode": 0,
- "status_code": 0,
- "userList": [
- {
- "stats": {
- "diggCount": 13700,
- "followerCount": 107800,
- "followingCount": 1653,
- "friendCount": 0,
- "heart": 1600000,
- "heartCount": 1600000,
- "videoCount": 271
}, - "user": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "7424380",
- "isADVirtual": false,
- "nickname": "Giovanna Ramos",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAhoQd2xIFkD2YblXAK0AuTqw4itvLfBjIruvZOA-ADHI",
- "secret": false,
- "signature": "Lesbian | ATL | 23\n\n*outfit details always tagged on IG*",
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "giovannaramos",
- "verified": false
}
}
]
}
Get a list of recommended posts from the For You section.
Learn more about downloading videos
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.explore({ session_id: 0, country: 'us' }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20231013174214AE5B9F4C0DF2E32075E2",
- "now": 1697218935000
}, - "hasMore": true,
- "itemList": [
- {
- "BAInfo": "",
- "adAuthorization": false,
- "adLabelVersion": 0,
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "7137838669516588075",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "Michael Myers Solos",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAnUJjlzIyy8MkKoSGX_Q43w63BvdeeWRlUagzLdoncPI-mEdSddR9ytQdT1IAJQMJ",
- "secret": false,
- "signature": "You not beating me in a fight",
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "michael_myers_solos",
- "verified": false
}, - "authorStats": {
- "diggCount": 54,
- "followerCount": 1600000,
- "followingCount": 80,
- "friendCount": 0,
- "heart": 88300000,
- "heartCount": 88300000,
- "videoCount": 110
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "3565",
- "isCommerce": false,
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "stats": {
- "videoCount": 0,
- "viewCount": 0
}, - "title": "michaelmyers"
}
], - "collected": false,
- "contents": [
- {
- "desc": "#michaelmyers #relatable #viral #fyp #foryou ",
- "textExtra": [
- {
- "awemeId": "",
- "end": 13,
- "hashtagId": "3565",
- "hashtagName": "michaelmyers",
- "isCommerce": false,
- "secUid": "",
- "start": 0,
- "subType": 0,
- "type": 1,
- "userId": "",
- "userUniqueId": ""
}
]
}
], - "createTime": 1691197808,
- "desc": "#michaelmyers #relatable #viral #fyp #foryou ",
- "digged": false,
- "diversificationId": 10003,
- "duetDisplay": 0,
- "duetEnabled": true,
- "duetInfo": {
- "duetFromId": "0"
}, - "forFriend": false,
- "id": "7263639216159034670",
- "isAd": false,
- "itemCommentStatus": 0,
- "itemMute": false,
- "music": {
- "album": "",
- "authorName": "slowed._.songs",
- "duration": 21,
- "id": "7239075601271786267",
- "original": true,
- "title": "som original"
}, - "officalItem": false,
- "originalItem": false,
- "playlistId": "",
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "showNotPass": false,
- "stats": {
- "collectCount": 589400,
- "commentCount": 46500,
- "diggCount": 4800000,
- "playCount": 21300000,
- "shareCount": 115200
}, - "stitchDisplay": 0,
- "stitchEnabled": true,
- "textExtra": [
- {
- "awemeId": "",
- "end": 13,
- "hashtagId": "3565",
- "hashtagName": "michaelmyers",
- "isCommerce": false,
- "secUid": "",
- "start": 0,
- "subType": 0,
- "type": 1,
- "userId": "",
- "userUniqueId": ""
}
], - "video": {
- "bitrate": 768746,
- "bitrateInfo": [
- {
- "Bitrate": 838338,
- "CodecType": "h265_hvc1",
- "GearName": "adapt_lowest_1080_1",
- "PlayAddr": {
- "DataSize": 1491613,
- "FileCs": "c:0-13346-fd98",
- "FileHash": "a2bd6120fc0566ea9841019d2d5a3f2d",
- "Uri": "v12044gd0000cj6prp3c77u5tphqfn80",
- "UrlKey": "v12044gd0000cj6prp3c77u5tphqfn80_bytevc1_1080p_838338",
}, - "QualityType": 2
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 14,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7263639216159034670",
- "ratio": "540p",
- "shareCover": [
- ""
], - "size": 1367793,
- "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -12.9,
- "Peak": 0.74989
}, - "width": 576,
- "zoomCover": {
}
}, - "vl1": false
}
], - "log_pb": {
- "impr_id": "20231013174214AE5B9F4C0DF2E32075E2"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
id required | string Example: id=7003402629929913605 The video ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.video({ id: "7003402629929913605" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202310131801477A6436ED37D083252847",
- "now": 1697220107000
}, - "itemInfo": {
- "itemStruct": {
- "BAInfo": "",
- "adAuthorization": false,
- "adLabelVersion": 0,
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6781957625476842501",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "Hayley",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAA2CYkfZjrAT5tGP2O-0xvW2q9G-tWADL1frxUUvyaZdmWmosKpZRu0QTBDdkHSPAU",
- "secret": false,
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "hayleybuix",
- "verified": false
}, - "authorStats": {
- "diggCount": 22500,
- "followerCount": 3100000,
- "followingCount": 540,
- "friendCount": 0,
- "heart": 132900000,
- "heartCount": 132900000,
- "videoCount": 849
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "25668",
- "isCommerce": false,
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "stats": {
- "videoCount": 3900000,
- "viewCount": 0
}, - "title": "filter"
}
], - "collected": false,
- "contents": [
- {
- "desc": "Which one is your fav? #filter #tiktokfilter",
- "textExtra": [
- {
- "awemeId": "",
- "end": 30,
- "hashtagId": "25668",
- "hashtagName": "filter",
- "isCommerce": false,
- "secUid": "",
- "start": 23,
- "subType": 0,
- "type": 1,
- "userId": "",
- "userUniqueId": ""
}
]
}
], - "createTime": 1630606743,
- "desc": "Which one is your fav? #filter #tiktokfilter",
- "digged": false,
- "diversificationId": 10073,
- "duetDisplay": 0,
- "duetEnabled": true,
- "duetInfo": {
- "duetFromId": "0"
}, - "effectStickers": [
- {
- "ID": "1112272",
- "name": "Jelly Look",
- "stickerStats": {
- "useCount": 17100000
}
}
], - "forFriend": false,
- "id": "7003402629929913605",
- "isActivityItem": false,
- "isAd": false,
- "itemCommentStatus": 0,
- "itemMute": false,
- "music": {
- "album": "Flashbacks (Slowed)",
- "authorName": "Craspore",
- "duration": 60,
- "id": "6971887778502019073",
- "original": false,
- "title": "Flashbacks - Slowed"
}, - "officalItem": false,
- "originalItem": false,
- "playlistId": "",
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "showNotPass": false,
- "stats": {
- "collectCount": 0,
- "commentCount": 557,
- "diggCount": 174700,
- "playCount": 4100000,
- "shareCount": 1235
}, - "stickersOnItem": [
- {
- "stickerText": [
- "Rating Popular Tik Tok filters "
], - "stickerType": 4
}
], - "stitchDisplay": 0,
- "stitchEnabled": true,
- "textExtra": [
- {
- "awemeId": "",
- "end": 30,
- "hashtagId": "25668",
- "hashtagName": "filter",
- "isCommerce": false,
- "secUid": "",
- "start": 23,
- "subType": 0,
- "type": 1,
- "userId": "",
- "userUniqueId": ""
}
], - "video": {
- "bitrate": 908247,
- "bitrateInfo": [
- {
- "Bitrate": 908247,
- "CodecType": "h264",
- "GearName": "normal_720_0",
- "PlayAddr": {
- "DataSize": 2820448,
- "FileCs": "c:0-21674-1d32",
- "FileHash": "011a90e3fd6cb50415edc098045bac93",
- "Uri": "v09044g40000c4ohanbc77u88dlsgdmg",
- "UrlKey": "v09044g40000c4ohanbc77u88dlsgdmg_h264_720p_908247",
}, - "QualityType": 10
}
], - "codecType": "h264",
- "definition": "720p",
- "duration": 24,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7003402629929913605",
- "ratio": "720p",
- "size": 2820448,
- "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -9.3,
- "Peak": 1
}, - "width": 576,
- "zoomCover": {
}
}, - "vl1": false
}
}, - "log_pb": {
- "impr_id": "202310131801477A6436ED37D083252847"
}, - "message": "",
- "shareMeta": {
- "desc": "174.7K likes, 557 comments. “Which one is your fav?”",
- "title": "TikTok · Hayley"
}, - "status": "success",
- "statusCode": 0,
- "status_code": 0
}
secUid required | string Example: secUid=MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud The TikTok user secUid. You can get this from the Get profile information endpoint using the username. |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.playlists({ secUid: "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud" }); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "2",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20231013174222B384127C3412F32085EB",
- "now": 1697218942000
}, - "hasMore": false,
- "log_pb": {
- "impr_id": "20231013174222B384127C3412F32085EB"
}, - "message": "",
- "playList": [
- {
- "creator": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6631401620847788037",
- "isADVirtual": false,
- "nickname": "Javier Romero",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAwyc-EtpXKyysj_GvtC1C996WUYNiXax8m2wAORouuvV3sb0p94dI-YNWGh-X4pQW",
- "secret": false,
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "javierr",
- "verified": true
}, - "id": "7179791304409238318",
- "mixId": "7179791304409238318",
- "mixName": "Fashionnova 🖤",
- "name": "Fashionnova 🖤",
- "videoCount": 14
}
], - "status": "success",
- "statusCode": 0,
- "status_code": 0
}
playlist_id required | any Example: playlist_id=6948562344666532614 The playlist ID. |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.playlistItems({ playlist_id: "6948562344666532614" }); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "1691956065000",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202310131742238D61BD86860F15203FBC",
- "now": 1697218943000
}, - "hasMore": true,
- "itemList": [
- {
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6631401620847788037",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "Javier Romero",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAwyc-EtpXKyysj_GvtC1C996WUYNiXax8m2wAORouuvV3sb0p94dI-YNWGh-X4pQW",
- "secret": false,
- "stitchSetting": 0,
- "uniqueId": "javierr",
- "verified": true
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "771",
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "title": "michaeljackson"
}
], - "collected": false,
- "contents": [
- {
- "desc": "The hips dont stop for no one 🤣"
}
], - "createTime": 1696708360,
- "desc": "The hips dont stop for no one 🤣",
- "digged": false,
- "duetDisplay": 0,
- "duetEnabled": true,
- "forFriend": false,
- "id": "7287306862427426091",
- "itemCommentStatus": 0,
- "music": {
- "album": "90's Dance Party Hits - The Best of The 90's Dance Music",
- "authorName": "Dance Anthem",
- "duration": 60,
- "id": "6710109176523130881",
- "original": false,
- "title": "Gonna Make You Sweat (Everybody Dance Now)"
}, - "officalItem": false,
- "originalItem": false,
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "stats": {
- "collectCount": 2408,
- "commentCount": 274,
- "diggCount": 65300,
- "playCount": 2800000,
- "shareCount": 277
}, - "stitchDisplay": 0,
- "stitchEnabled": true,
- "video": {
- "bitrate": 1349140,
- "bitrateInfo": [
- {
- "Bitrate": 1349140,
- "CodecType": "h264",
- "GearName": "normal_540_0",
- "PlayAddr": {
- "DataSize": 2807561,
- "FileCs": "c:0-15259-a6a2",
- "FileHash": "e045d13301f8ddf012e406d2e89f44c9",
- "Uri": "v12044gd0000ckgrctrc77u8v98ivi80",
- "UrlKey": "v12044gd0000ckgrctrc77u8v98ivi80_h264_540p_1349140",
}, - "QualityType": 20
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 16,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7287306862427426091",
- "ratio": "540p",
- "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -23.2,
- "Peak": 0.40738
}, - "width": 576,
- "zoomCover": {
}
}
}
], - "log_pb": {
- "impr_id": "202310131742238D61BD86860F15203FBC"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
Your first request should be using the hashtag name
parameter, then the following requests should be using the id
parameter which you have stored from the first request (returned in response challengeInfo > challenge > id
).
Learn more about downloading videos
id | string Example: id=4655293 The hashtag ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
name | string The hashtag name |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.hashtag({ name: "lilyachty" }); let hashtagId = response.json.challengeInfo.challenge.id; let response = await api.public.hashtag({ id: hashtagId }); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "30",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "2023101317423089D9BC71D9A0DA246518",
- "now": 1697218951000
}, - "hasMore": true,
- "itemList": [
- {
- "BAInfo": "",
- "adAuthorization": false,
- "adLabelVersion": 0,
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6774717611013211142",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "Joey",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAqNL9MRsNsrQC-BdxNyeI81hARIcw0KdQu2VUyatKTPIMBpfQZUm8DqLo-j36vHpP",
- "secret": false,
- "signature": "dm me for collaborations\nJoin discord ⬇️\n\n.gg/jozefuwu",
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "jozefuwu",
- "verified": false
}, - "authorStats": {
- "diggCount": 142300,
- "followerCount": 318900,
- "followingCount": 235,
- "friendCount": 0,
- "heart": 44200000,
- "heartCount": 44200000,
- "videoCount": 258
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "229207",
- "isCommerce": false,
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "stats": {
- "videoCount": 0,
- "viewCount": 0
}, - "title": "fyp"
}
], - "collected": false,
- "contents": [
- {
- "desc": "real | discord in bio #fyp #foru #forupage #real #lilyachty #drake #relatable #jozefuwu #fypシ #why ",
- "textExtra": [
- {
- "awemeId": "",
- "end": 26,
- "hashtagId": "229207",
- "hashtagName": "fyp",
- "isCommerce": false,
- "secUid": "",
- "start": 22,
- "subType": 0,
- "type": 1,
- "userId": "",
- "userUniqueId": ""
}
]
}
], - "createTime": 1696358668,
- "desc": "real | discord in bio #fyp #foru #forupage #real #lilyachty #drake #relatable #jozefuwu #fypシ #why ",
- "digged": false,
- "diversificationId": 10003,
- "duetDisplay": 0,
- "duetEnabled": true,
- "duetInfo": {
- "duetFromId": "0"
}, - "forFriend": false,
- "id": "7285804940642110721",
- "isAd": false,
- "itemCommentStatus": 0,
- "itemMute": false,
- "music": {
- "album": "",
- "authorName": "✿",
- "duration": 17,
- "id": "7200670597150493441",
- "original": true,
- "title": "trance"
}, - "officalItem": false,
- "originalItem": false,
- "playlistId": "7245253561221745409",
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "showNotPass": false,
- "stats": {
- "collectCount": 304800,
- "commentCount": 10400,
- "diggCount": 3300000,
- "playCount": 18900000,
- "shareCount": 49600
}, - "stickersOnItem": [
- {
- "stickerText": [
- "POV: the math teacher explains\nsomething again and you\nact like u understand it.\n"
], - "stickerType": 4
}
], - "stitchDisplay": 0,
- "stitchEnabled": true,
- "textExtra": [
- {
- "awemeId": "",
- "end": 26,
- "hashtagId": "229207",
- "hashtagName": "fyp",
- "isCommerce": false,
- "secUid": "",
- "start": 22,
- "subType": 0,
- "type": 1,
- "userId": "",
- "userUniqueId": ""
}
], - "video": {
- "bitrate": 702718,
- "bitrateInfo": [
- {
- "Bitrate": 702718,
- "CodecType": "h264",
- "GearName": "normal_540_0",
- "PlayAddr": {
- "DataSize": 473105,
- "FileCs": "c:0-5917-c86e",
- "FileHash": "5e3f7693f0f944cf3ed756eaf2f7d28f",
- "Uri": "v14044g50000cke5uh3c77u0ajg53k40",
- "UrlKey": "v14044g50000cke5uh3c77u0ajg53k40_h264_540p_702718",
}, - "QualityType": 20
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 5,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 830,
- "id": "7285804940642110721",
- "ratio": "540p",
- "shareCover": [
- ""
], - "size": 473105,
- "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -16.4,
- "Peak": 0.53703
}, - "width": 576,
- "zoomCover": {
}
}, - "vl1": false
}
], - "log_pb": {
- "impr_id": "2023101317423089D9BC71D9A0DA246518"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
media_id required | string Example: media_id=7109178205151464746 The video ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | number The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
session_id | number <= 100 (Optional) Longer sessions. The cookies and IP are preserved through different requests for a longer amount of time. You should include this in order to get different posts on every request. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.commentsList({ media_id: "7109178205151464746" }); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "alias_comment_deleted": false,
- "comments": [
- {
- "author_pin": false,
- "aweme_id": "7109178205151464746",
- "cid": "7109185042560680750",
- "collect_stat": 0,
- "comment_language": "en",
- "create_time": 1655236182,
- "digg_count": 8412,
- "is_author_digged": false,
- "label_list": null,
- "no_show": false,
- "reply_comment": null,
- "reply_comment_total": 177,
- "reply_id": "0",
- "reply_to_reply_id": "0",
- "share_info": {
- "acl": {
- "code": 1,
- "extra": "{\"item_share_acl\":\"empty item value\"}"
}, - "desc": "C's comment: man goes to Germany with a near unlimited budget and orders grilled cheese and chicken tenders",
- "title": "Gonna starve in Germany :(",
}, - "status": 1,
- "stick_position": 0,
- "text": "man goes to Germany with a near unlimited budget and orders grilled cheese and chicken tenders",
- "text_extra": [
- "string"
], - "trans_btn_style": 0,
- "user": {
- "ad_cover_url": null,
- "advance_feature_item_order": null,
- "advanced_feature_info": null,
- "avatar_thumb": {
- "uri": "tos-maliva-avt-0068/72d6fb527a7e5451501577d0ecdc3186",
}, - "bold_fields": null,
- "can_set_geofencing": null,
- "cha_list": null,
- "cover_url": null,
- "custom_verify": "",
- "enterprise_verify_reason": "",
- "events": null,
- "followers_detail": null,
- "geofencing": null,
- "homepage_bottom_toast": null,
- "item_list": null,
- "mutual_relation_avatars": null,
- "need_points": null,
- "nickname": "C",
- "platform_sync_info": null,
- "relative_users": null,
- "search_highlight": null,
- "sec_uid": "MS4wLjABAAAAiBWkeHI69Bbf5gcs-nRrETGYZhBH9ajadCYNMS3j8fU_fRWnMbtE0ymP-VXnxt9z",
- "type_label": null,
- "uid": "6797204664526980101",
- "unique_id": "doowopdad",
- "user_tags": null,
- "white_cover_url": null
}, - "user_buried": false,
- "user_digged": 0
}
], - "cursor": 20,
- "extra": {
- "fatal_item_ids": null,
- "now": 1656079898000
}, - "has_more": 1,
- "log_pb": {
- "impr_id": "202206241411380101901851591B15A451"
}, - "message": "",
- "reply_style": 2,
- "status": "success",
- "status_code": 0,
- "top_gifts": [
- "string"
], - "total": 11112
}
media_id required | string Example: media_id=7109178205151464746 The video ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
comment_id required | string Example: comment_id=7109185042560680750 The comment ID |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | number The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
session_id | number <= 100 (Optional) Longer sessions. The cookies and IP are preserved through different requests for a longer amount of time. You should include this in order to get different posts on every request. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.commentRepliesList({ media_id: "7109178205151464746", comment_id: "7109185042560680750" }); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "comments": [
- {
- "aweme_id": "7109178205151464746",
- "cid": "7109192521695396650",
- "collect_stat": 0,
- "comment_language": "en",
- "create_time": 1655237905,
- "digg_count": 1648,
- "is_author_digged": false,
- "label_list": null,
- "no_show": false,
- "reply_comment": null,
- "reply_id": "7109185042560680750",
- "reply_to_reply_id": "0",
- "share_info": {
- "acl": {
- "code": 1,
- "extra": "{\"item_share_acl\":\"empty item value\"}"
}, - "desc": "priyaxo's comment: When you travel a lot sometimes you just want comfort food. You donât have eat schnitzel for every meal.",
- "title": "Gonna starve in Germany :(",
}, - "status": 1,
- "text": "When you travel a lot sometimes you just want comfort food. You donât have eat schnitzel for every meal.",
- "text_extra": [
- "string"
], - "trans_btn_style": 0,
- "user": {
- "ad_cover_url": null,
- "advance_feature_item_order": null,
- "advanced_feature_info": null,
- "avatar_thumb": {
- "uri": "tos-maliva-avt-0068/f540c760836cecd9585897bf31207ad5",
}, - "bold_fields": null,
- "can_set_geofencing": null,
- "cha_list": null,
- "cover_url": null,
- "custom_verify": "",
- "enterprise_verify_reason": "",
- "events": null,
- "followers_detail": null,
- "geofencing": null,
- "homepage_bottom_toast": null,
- "item_list": null,
- "mutual_relation_avatars": null,
- "need_points": null,
- "nickname": "priyaxo",
- "platform_sync_info": null,
- "relative_users": null,
- "search_highlight": null,
- "sec_uid": "MS4wLjABAAAAK5_1k2kU_FGg46fdKlQpNH-cl0vXKJoTD61BKRYLsA5c_2oZWngfyfPPY5DIMW4D",
- "type_label": null,
- "uid": "6946347802281395205",
- "unique_id": "priyasays",
- "user_tags": null,
- "white_cover_url": null
}, - "user_buried": false,
- "user_digged": 0
}
], - "cursor": 20,
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202206241412570102231190200B16A6C7",
- "now": 1656079978000
}, - "has_more": 1,
- "log_pb": {
- "impr_id": "202206241412570102231190200B16A6C7"
}, - "message": "",
- "status": "success",
- "status_code": 0,
- "total": 178
}
Get a list of posts that are using this music.
Learn more about downloading videos
id required | string Example: id=28459463 The music ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.music({ id: "28459463" }); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "30",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "2023101317423689D9BC71D9A0DA246649",
- "now": 1697218956000
}, - "hasMore": true,
- "itemList": [
- {
- "BAInfo": "",
- "adAuthorization": false,
- "adLabelVersion": 0,
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "209793",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "BabyAriel",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAA3vBkEZMTNHwJHqNvAtT23RvjmvbsWI1iGVCnHo_c5Es",
- "secret": false,
- "signature": "snapchat: babyariel",
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "babyariel",
- "verified": true
}, - "authorStats": {
- "diggCount": 19100,
- "followerCount": 36300000,
- "followingCount": 711,
- "friendCount": 0,
- "heart": 1900000000,
- "heartCount": 1900000000,
- "videoCount": 2523
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "4655293",
- "isCommerce": false,
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "stats": {
- "videoCount": 0,
- "viewCount": 0
}, - "title": "lilyachty"
}
], - "collected": false,
- "contents": [
- {
- "desc": "something new. what do you think?😬💙😛"
}
], - "createTime": 1467655609,
- "desc": "something new. what do you think?😬💙😛",
- "digged": false,
- "duetDisplay": 0,
- "duetEnabled": true,
- "duetInfo": {
- "duetFromId": "0"
}, - "forFriend": false,
- "id": "114558579130482688",
- "isAd": false,
- "itemCommentStatus": 0,
- "itemMute": false,
- "music": {
- "album": "",
- "authorName": "Unknown",
- "duration": 15,
- "id": "28459463",
- "original": false,
- "title": "Original Sound"
}, - "officalItem": false,
- "originalItem": false,
- "playlistId": "",
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "showNotPass": false,
- "stats": {
- "collectCount": 341,
- "commentCount": 11500,
- "diggCount": 1300000,
- "playCount": 1400000,
- "shareCount": 206
}, - "stitchDisplay": 0,
- "stitchEnabled": true,
- "video": {
- "bitrate": 1920551,
- "bitrateInfo": [
- {
- "Bitrate": 711664,
- "CodecType": "h265_hvc1",
- "GearName": "adapt_540_1",
- "PlayAddr": {
- "DataSize": 1315689,
- "FileCs": "c:0-13746-5291",
- "FileHash": "2bc02a08758853bbcdec99ba5de3033c",
- "Uri": "332caab478104bfb9077179e44e58c42",
- "UrlKey": "332caab478104bfb9077179e44e58c42_bytevc1_540p_711664",
}, - "QualityType": 28
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 14,
- "encodeUserTag": "",
- "encodedType": "original",
- "format": "mp4",
- "height": 960,
- "id": "114558579130482688",
- "ratio": "540p",
- "shareCover": [
- ""
], - "size": 3513008,
- "videoQuality": "original",
- "volumeInfo": { },
- "width": 540,
- "zoomCover": {
}
}, - "vl1": false
}
], - "log_pb": {
- "impr_id": "2023101317423689D9BC71D9A0DA246649"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
id required | string Example: id=28459463 The music ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.musicInfo({ id: "28459463" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20221013132616010190186038093F9DE6",
- "now": 1665667576000
}, - "log_pb": {
- "impr_id": "20221013132616010190186038093F9DE6"
}, - "message": "",
- "musicInfo": {
- "music": {
- "authorName": "Unknown",
- "duration": 15,
- "id": "28459463",
- "original": false,
- "private": false,
- "title": "Original Sound"
}, - "stats": {
- "videoCount": 243200
}
}, - "status": "success",
- "statusCode": 0,
- "status_code": 0
}
Get popular users, music or hashtag. You can also include Account Key to show personalized results for the user.
category required | string Enum: "users" "music" "hashtag" Example: users The discover category |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
offset | number The starting offset of items list. Returned in every response, should be included in the next request for iteration. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.discover({ category: "users" }); console.log(response?.json); while(response){ let offset = response?.json?.offset; console.log("Getting next items ", offset); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20231013174240F0A8215F5F426128B8E7",
- "now": 1697218961000
}, - "log_pb": {
- "impr_id": "20231013174240F0A8215F5F426128B8E7"
}, - "message": "",
- "offset": "20",
- "status": "success",
- "statusCode": 0,
- "status_code": 0,
- "userInfoList": [
- {
- "stats": {
- "diggCount": 5306,
- "followerCount": 17900000,
- "followingCount": 0,
- "friendCount": 0,
- "heart": 172000000,
- "heartCount": 172000000,
- "videoCount": 57
}, - "user": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 1,
- "ftc": false,
- "id": "6760381874016912390",
- "isADVirtual": false,
- "nickname": "Olivia Rodrigo",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAnb7UrYm7BoqTzDSu6XphP68sueqPwuXJeHhJcYMye9NNlA7-nh427qHb_e-Al5ES",
- "secret": false,
- "signature": "spicy pisces",
- "stitchSetting": 1,
- "ttSeller": false,
- "uniqueId": "livbedumb",
- "verified": true
}
}
]
}
Get popular posts, users, music or hashtags from a keyword.
Limited to only a few items. If you want more, try using the Search endpoint instead.
keyword required | string Example: keyword=lilyachty |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.discoverKeyword({ keyword: "lilyachty" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "hashtags": {
- "challengeInfoList": [
- {
- "challenge": {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "4655293",
- "isCommerce": false,
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "stats": {
- "videoCount": 0,
- "viewCount": 2500000000
}, - "title": "lilyachty"
}, - "challengeAnnouncement": { },
- "itemList": [
- "string"
], - "stats": {
- "videoCount": 0,
- "viewCount": 2500000000
}
}
], - "hasMore": false,
- "searchId": "202310131742438D161C469D35D1242117",
- "statusCode": 0,
- "statusMsg": ""
}, - "info": {
- "category": "",
- "content": "lilyachty",
- "createTime": "1619308800",
- "extra": {
- "index_date": "20211104",
- "submission": "index"
}, - "isDiscovery": false,
- "language": "en",
- "originalContent": "lilyachty",
- "region": "US",
- "source": "creators",
- "updateTime": "1657238400",
- "vv": "608524480"
}, - "items": {
- "hasMore": false,
- "itemList": [
- {
- "BAInfo": "",
- "adAuthorization": false,
- "adLabelVersion": 0,
- "author": {
- "canExpPlaylist": false,
- "commentSetting": 0,
- "createTime": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "7069533265899963397",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickNameModifyTime": 0,
- "nickname": "ShortsGalore🥤",
- "nowInvitationCardUrl": "",
- "openFavorite": false,
- "privateAccount": false,
- "recommendReason": "",
- "relation": 0,
- "roomId": "",
- "secUid": "MS4wLjABAAAAHeghM47ql1TKiOx-V7Sra489PvwGi-LQGUCmtJa-UqZp4I4rweQjPllqhayaY7PF",
- "secret": false,
- "shortId": "",
- "signature": "MESSAGE ON IG FOR PROMO\nRap | Streamers | Memes\nFollow & Like For More\n300k?",
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "shortsgalore",
- "uniqueIdModifyTime": 0,
- "verified": false
}, - "authorStats": {
- "diggCount": 368,
- "followerCount": 297100,
- "followingCount": 0,
- "friendCount": 0,
- "heart": 40000000,
- "heartCount": 40000000,
- "videoCount": 856
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "4655293",
- "isCommerce": false,
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "stats": {
- "videoCount": 0,
- "viewCount": 0
}, - "title": "lilyachty"
}
], - "channelTags": [
- "string"
], - "collected": false,
- "comments": [
- "string"
], - "contents": [
- {
- "desc": "Nah he gotta be a freak or sum😭😭😭",
- "textExtra": [
- "string"
]
}
], - "createTime": "1681615502",
- "desc": "Nah he gotta be a freak or sum😭😭😭 #lilyachty#citygirls#yachty#kai#kaicenat#actup#rap#rapper#ghostwriter#foryou#fyp#shortsgalore ",
- "digged": false,
- "diversificationId": 10088,
- "diversificationLabels": [
- "Celebrity Clips & Variety Show"
], - "duetDisplay": 0,
- "duetEnabled": true,
- "duetInfo": {
- "duetFromId": "0"
}, - "effectStickers": [
- "string"
], - "forFriend": false,
- "id": "7222483563210345733",
- "indexEnabled": true,
- "isAd": false,
- "itemCommentStatus": 0,
- "itemMute": false,
- "locationCreated": "GB",
- "music": {
- "album": "",
- "authorName": "ShortsGalore🥤",
- "duration": 48,
- "id": "7222483551030741766",
- "original": true,
- "scheduleSearchTime": 0,
- "title": "original sound"
}, - "officalItem": false,
- "originalItem": false,
- "playlistId": "7250827874507197211",
- "privateItem": false,
- "scheduleTime": 0,
- "secret": false,
- "shareEnabled": true,
- "showNotPass": false,
- "stats": {
- "collectCount": "21000",
- "commentCount": 874,
- "diggCount": 376400,
- "playCount": 1800000,
- "shareCount": 1643
}, - "stickersOnItem": [
- {
- "stickerText": [
- "LIL YACHTY TALKS ABOUT WRITING FOR THE CITY GIRLS"
], - "stickerType": 4
}
], - "stitchDisplay": 0,
- "stitchEnabled": true,
- "takeDown": 0,
- "textExtra": [
- {
- "awemeId": "",
- "end": 47,
- "hashtagId": "4655293",
- "hashtagName": "lilyachty",
- "isCommerce": false,
- "secUid": "",
- "start": 37,
- "subType": 0,
- "type": 1,
- "userId": "",
- "userUniqueId": ""
}
], - "video": {
- "bitrate": 679830,
- "bitrateInfo": [
- {
- "Bitrate": 679830,
- "CodecType": "h264",
- "GearName": "normal_540_0",
- "PlayAddr": {
- "DataSize": "4082468",
- "FileCs": "c:0-40900-fa97",
- "FileHash": "a76ddf953011ab398a23d4e4bbc19068",
- "Uri": "v09044g40000cgtml0bc77u9ao8anidg",
- "UrlKey": "v09044g40000cgtml0bc77u9ao8anidg_h264_540p_679830",
}, - "QualityType": 20
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 48,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7222483563210345733",
- "ratio": "540p",
- "shareCover": [
- ""
], - "size": "4082468",
- "subtitleInfos": [
- "string"
], - "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -21.1,
- "Peak": 0.5559
}, - "width": 576,
- "zoomCover": {
}
}, - "vl1": false,
- "warnInfo": [
- "string"
]
}
], - "recommendLogId": "202310131742438D161C469D35D1242117",
- "searchId": "202310131742438D161C469D35D1242117",
- "statusCode": 0,
- "statusMsg": ""
}, - "message": "",
- "music": {
- "hasMore": false,
- "musicInfoList": [
- {
- "artists": [
- "string"
], - "itemList": [
- "string"
], - "music": {
- "album": "Slide",
- "authorName": "Lil Yachty",
- "duration": 60,
- "id": "7263215419287537666",
- "original": false,
- "scheduleSearchTime": 0,
- "title": "SOLO STEPPIN CRETE BOY"
}, - "stats": {
- "videoCount": 17700
}
}
], - "searchId": "202310131742438D161C469D35D1242117",
- "statusCode": 0,
- "statusMsg": ""
}, - "related": {
- "hasMore": true,
- "relatedWordList": [
- {
- "category": "",
- "content": "bobbi-and-lil-yachty",
- "createTime": "1689877659",
- "extra": {
- "index_date": "20230721",
- "rank_id": "23592",
- "submission": "index"
}, - "language": "en",
- "mergeStatus": 0,
- "originalContent": "bobbi and lil yachty",
- "region": "US",
- "source": "app_search",
- "updateTime": "1689908868",
- "vv": "0"
}
], - "statusCode": 0,
- "statusMsg": ""
}, - "status": "success",
- "statusCode": 0,
- "users": {
- "hasMore": false,
- "searchId": "202310131742438D161C469D35D1242117",
- "statusCode": 0,
- "statusMsg": "",
- "userInfoList": [
- {
- "itemList": [
- "string"
], - "stats": {
- "diggCount": 6691,
- "followerCount": 8300000,
- "followingCount": 88,
- "friendCount": 0,
- "heart": 189200000,
- "heartCount": 189200000,
- "videoCount": 214
}, - "user": {
- "canExpPlaylist": false,
- "commentSetting": 0,
- "createTime": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6569595380449902597",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickNameModifyTime": 0,
- "nickname": "lilyachty",
- "nowInvitationCardUrl": "",
- "openFavorite": false,
- "privateAccount": false,
- "recommendReason": "",
- "relation": 0,
- "roomId": "",
- "secUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": false,
- "shortId": "",
- "signature": "I love girls with freckled faces",
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "lilyachty",
- "uniqueIdModifyTime": 0,
- "verified": true
}
}
]
}
}
Search anything, users, videos, or get keyword autocomplete suggestions.
Learn more about downloading videos
category required | string Enum: "general" "users" "videos" "autocomplete" Example: general The search category |
query required | string Example: query=lilyachty The search keyword |
nextCursor | string A iteration parameter returned in each response, should be included in the next requests to get the next items. |
country | string Example: country=us You can optionally choose the proxy country from where the request is being sent by providing an ISO Code (e.g us, ca, gb) — 200+ countries supported |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.public.search({ category: "general", query: "lilyachty" }); console.log(response?.json); while(response){ let nextCursor = response?.json?.nextCursor; console.log("Getting next items ", nextCursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "ad_info": { },
- "data": [
- {
- "card_title": "Users",
- "common": {
- "doc_id_str": "1"
}, - "has_top_user": 0,
- "type": 4,
- "user_list": [
- {
- "challenges": null,
- "effects": null,
- "items": null,
- "mix_list": null,
- "musics": null,
- "position": null,
- "uniqid_position": null,
- "user_info": {
- "account_labels": null,
- "ad_cover_url": null,
- "advance_feature_item_order": null,
- "advanced_feature_info": null,
- "avatar_thumb": {
- "height": 720,
- "uri": "musically-maliva-obj/1658838867803142",
- "url_prefix": null,
- "width": 720
}, - "bold_fields": null,
- "can_message_follow_status_list": null,
- "can_set_geofencing": null,
- "cha_list": null,
- "cover_url": null,
- "custom_verify": "Verified account",
- "enterprise_verify_reason": "",
- "events": null,
- "follow_status": 0,
- "follower_count": 8300000,
- "followers_detail": null,
- "geofencing": null,
- "homepage_bottom_toast": null,
- "item_list": null,
- "mutual_relation_avatars": null,
- "need_points": null,
- "nickname": "lilyachty",
- "platform_sync_info": null,
- "relative_users": null,
- "room_id": 0,
- "room_id_str": "0",
- "search_highlight": null,
- "sec_uid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "shield_edit_field_info": null,
- "signature": "I love girls with freckled faces",
- "type_label": null,
- "uid": "6569595380449902597",
- "unique_id": "lilyachty",
- "user_profile_guide": null,
- "user_tags": null,
- "white_cover_url": null
}
}
], - "view_more": true
}
], - "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202310131742590A5113676E880D213C5D",
- "now": 1697218979000,
- "search_request_id": ""
}, - "has_more": 1,
- "log_pb": {
- "impr_id": "202310131742590A5113676E880D213C5D"
}, - "message": "",
- "nextCursor": "MTItLS1zcGxpdF9jdXNyb3ItLS0yMDIzMTAxMzE3NDI1OTBBNTExMzY3NkU4ODBEMjEzQzVE",
- "status": "success",
- "status_code": 0
}
Get current user profile information, or another user's by specifying the username.
username | string The TikTok user username |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.info(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20231013174203BDE111AE1C4F032047CD",
- "now": 1697218923000
}, - "log_pb": {
- "impr_id": "20231013174203BDE111AE1C4F032047CD"
}, - "message": "",
- "shareMeta": {
- "desc": "@lilyachty 8.3m Followers, 88 Following, 189.2m Likes - Watch awesome short videos created by lilyachty",
- "title": "lilyachty on TikTok"
}, - "status": "success",
- "statusCode": 0,
- "status_code": 0,
- "userInfo": {
- "stats": {
- "diggCount": 0,
- "followerCount": 8300000,
- "followingCount": 88,
- "friendCount": 75,
- "heart": 189200000,
- "heartCount": 189200000,
- "videoCount": 214
}, - "user": {
- "canExpPlaylist": true,
- "commentSetting": 0,
- "commerceUserInfo": {
- "commerceUser": false
}, - "duetSetting": 0,
- "followingVisibility": 1,
- "ftc": false,
- "id": "6569595380449902597",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "isUnderAge18": false,
- "nickname": "lilyachty",
- "openFavorite": false,
- "privateAccount": false,
- "profileEmbedPermission": 1,
- "profileTab": {
- "showMusicTab": true,
- "showPlayListTab": false
}, - "relation": 0,
- "secUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": false,
- "signature": "I love girls with freckled faces",
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "lilyachty",
- "verified": true
}
}
}
Premium
Update the current user profile fields.
field required | string Enum: "nickname" "username" "bio" "private" Example: bio The profile field. |
value required | string The new field value |
{- "value": "My new bio"
}
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20220624151705010188020153161E2388",
- "now": 1656083826068
}, - "log_pb": {
- "impr_id": "20220624151705010188020153161E2388"
}, - "message": "",
- "status": "success",
- "status_code": 0,
- "user": {
- "apple_account": 0,
- "avatar_larger": {
- "uri": "tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
}, - "avatar_medium": {
- "uri": "tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
}, - "avatar_thumb": {
- "uri": "tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
}, - "google_account": "",
- "ins_id": "",
- "navi_id": "",
- "nickname": "lilyachty",
- "secret": 0,
- "share_qrcode_uri": "",
- "short_id": "0",
- "signature": "",
- "twitter_id": "",
- "twitter_name": "",
- "uid": "7109178205151464746",
- "unique_id": "lilyachty",
- "verification_type": 3,
- "video_icon": {
- "uri": "",
- "url_list": [
- "string"
]
}, - "youtube_channel_id": "",
- "youtube_channel_title": ""
}
}
Get current user recent notifications.
Note: Some notifications are limited by TikTok.
filter | string Default: "all" Enum: "all" "likes" "comments" "mentions" "followers" Filter notifications by type |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
max_time | any Returned in every response, should be included in the next request for iteration. |
min_time | any Returned in every response, should be included in the next request for iteration. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.notifications(); console.log(response?.json); while(response){ let min_time = response?.json?.min_time; console.log("Getting next items ", min_time); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202206241251190100020060050050060030300417340F",
- "now": 1656075079000
}, - "log_pb": {
- "impr_id": "202206241251190100020060050050060030300417340F"
}, - "message": "",
- "notice_lists": [
- {
- "group": 500,
- "has_more": 1,
- "max_time": 1654980580,
- "min_time": 1466760868,
- "notice_list": [
- {
- "create_time": 1656036706,
- "digg": {
- "aweme": {
- "anchors": null,
- "author": {
- "ad_cover_url": null,
- "advance_feature_item_order": null,
- "advanced_feature_info": null,
- "bold_fields": null,
- "can_set_geofencing": null,
- "cha_list": null,
- "cover_url": null,
- "events": null,
- "followers_detail": null,
- "geofencing": null,
- "homepage_bottom_toast": null,
- "item_list": null,
- "mutual_relation_avatars": null,
- "need_points": null,
- "platform_sync_info": null,
- "relative_users": null,
- "search_highlight": null,
- "type_label": null,
- "uid": "7109178205151464746",
- "user_tags": null,
- "white_cover_url": null
}, - "aweme_id": "7112517487035452715",
- "aweme_type": 0,
- "cha_list": null,
- "challenge_position": null,
- "commerce_config_data": null,
- "content_desc_extra": null,
- "cover_labels": null,
- "create_time": 1656012027,
- "desc": "#mexicocancun2022â¥ï¸ð²ð½ #shoppinghaul #summervibes #travelphotography #contentcreation4you #fashioninspo",
- "geofencing": null,
- "geofencing_regions": null,
- "green_screen_materials": null,
- "hybrid_label": null,
- "image_infos": null,
- "interaction_stickers": null,
- "label_top_text": null,
- "long_video": null,
- "mask_infos": null,
- "nickname_position": null,
- "origin_comment_ids": null,
- "position": null,
- "products_info": null,
- "question_list": null,
- "search_highlight": null,
- "status": {
- "is_delete": false
}, - "text_extra": null,
- "uniqid_position": null,
- "video": {
- "big_thumbs": null,
- "bit_rate": null,
- "cover": {
- "height": 720,
- "uri": "tos-useast5-p-0068-tx/a9e7db80a80446a985facabed18ef225",
- "url_list": [
- null
], - "width": 720
}, - "origin_cover": {
- "height": 720,
- "uri": "tos-useast5-p-0068-tx/a9e7db80a80446a985facabed18ef225",
- "url_list": [
- null
], - "width": 720
}, - "tags": null
}, - "video_labels": null,
- "video_text": null
}, - "comment": {
- "label_list": null,
- "reply_comment": null,
- "text_extra": null
}, - "content": "",
- "digg_type": 1,
- "forward_id": "7112517487035452715",
- "from_user": [
- {
- "ad_cover_url": null,
- "ad_virtual": false,
- "advance_feature_item_order": null,
- "advanced_feature_info": null,
- "avatar_168x168": {
- "height": 720,
- "uri": "tos-maliva-avt-0068/ab944bbcab405fc628d7de4eaa7d7ffb",
- "url_list": [
- null
], - "width": 720
}, - "avatar_300x300": {
- "height": 720,
- "uri": "tos-maliva-avt-0068/ab944bbcab405fc628d7de4eaa7d7ffb",
- "url_list": [
- null
], - "width": 720
}, - "avatar_larger": {
- "height": 720,
- "uri": "tos-maliva-avt-0068/ab944bbcab405fc628d7de4eaa7d7ffb",
- "url_list": [
- null
], - "width": 720
}, - "avatar_thumb": {
- "height": 720,
- "uri": "tos-maliva-avt-0068/ab944bbcab405fc628d7de4eaa7d7ffb",
- "url_list": [
- null
], - "width": 720
}, - "bold_fields": null,
- "can_set_geofencing": null,
- "cha_list": null,
- "commerce_user_level": 0,
- "cover_url": null,
- "custom_verify": "",
- "enterprise_verify_reason": "",
- "events": null,
- "follow_status": 2,
- "follower_status": 1,
- "followers_detail": null,
- "geofencing": null,
- "homepage_bottom_toast": null,
- "is_ad_fake": false,
- "item_list": null,
- "mutual_relation_avatars": null,
- "need_points": null,
- "nickname": "lilyachty",
- "platform_sync_info": null,
- "relative_users": null,
- "search_highlight": null,
- "sec_uid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": 0,
- "story_status": 0,
- "type_label": null,
- "uid": "7109178205151464746",
- "unique_id": "lilyachty",
- "user_tags": null,
- "verification_type": 0,
- "white_cover_url": null
}
], - "has_digg_list": false,
- "label_text": "",
- "merge_count": 3
}, - "has_read": true,
- "nid": 7112623430365332000,
- "nid_str": "7112623430365332267",
- "type": 41,
- "user_id": 7109178205151464000
}
], - "notice_list_v2": null,
- "total": 130
}
], - "status": "success",
- "status_code": 0,
- "status_msg": ""
}
Get analytics for business or creator accounts
type required | string Enum: "overview" "content" "video" "followers" "live" Example: overview The analytics type |
days | number Default: 7 The days time frame for the analytics data |
media_id | any Required only for video type analytics, otherwise don't include. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.analytics({ type: "overview" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "comment_history": [
- {
- "status": 0,
- "value": 20
}
], - "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "2022062413154801024500411414141CFD",
- "now": 1656076548000
}, - "follower_active_history_days": null,
- "follower_active_history_hours": null,
- "follower_num": {
- "status": 0,
- "value": 185046
}, - "follower_num_history": [
- {
- "status": 0,
- "value": 184108
}
], - "like_history": [
- {
- "status": 0,
- "value": 251
}
], - "log_pb": {
- "impr_id": "2022062413154801024500411414141CFD"
}, - "message": "",
- "pv_history": [
- {
- "status": 0,
- "value": 2900
}
], - "share_history": [
- {
- "status": 0,
- "value": 17
}
], - "status": "success",
- "status_code": 0,
- "user_info": {
- "ad_cover_url": null,
- "advance_feature_item_order": null,
- "advanced_feature_info": null,
- "bold_fields": null,
- "can_set_geofencing": null,
- "cha_list": null,
- "cover_url": null,
- "events": null,
- "followers_detail": null,
- "geofencing": null,
- "homepage_bottom_toast": null,
- "item_list": null,
- "mutual_relation_avatars": null,
- "need_points": null,
- "open_insight_time": 1611973605,
- "platform_sync_info": null,
- "region": "US",
- "relative_users": null,
- "search_highlight": null,
- "type_label": null,
- "unique_id": "lilyachty",
- "user_tags": null,
- "white_cover_url": null
}, - "user_live_cnt_history": null,
- "user_live_diamonds_history": null,
- "user_live_duration_time_history": null,
- "user_live_follower_diamonds_history": null,
- "user_live_gift_unique_viewers_history": null,
- "user_live_new_followers_history": null,
- "user_live_top_viewers_history": null,
- "user_live_unique_viewers_history": null,
- "user_live_views_history": null,
- "video_comment_history_7d": null,
- "video_favorites_history_7d": null,
- "video_finish_rate_history_7d": null,
- "video_like_history_7d": null,
- "video_new_followers_history_7d": null,
- "video_shares_history_7d": null,
- "video_vv_history_7d": null,
- "vv_history": [
- {
- "status": 0,
- "value": 7616
}
]
}
Check if the current user's session is valid. Auto-removes the user if it's invalid.
Note: The session is automatically checked, though you can still manually call this endpoint if you are having issues with a user.
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.verify(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "data": {
- "connects": [
- "string"
], - "country_code": 0,
- "create_time": 1606080254,
- "has_password": 1,
- "mobile": "",
- "screen_name": "user9277470419087",
- "sec_user_id": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "user_id": "7109178205151464746",
- "username": "lilyachty"
}, - "message": "success",
- "status": "success"
}
Get current user following list (or a friends by specifying the secUid).
secUid | string Example: secUid=MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud The TikTok user secUid. You can get this from the Get profile information endpoint using the username. |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
nextCursor | string A iteration parameter returned in each response, should be included in the next requests to get the next items. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.following(); console.log(response?.json); while(response){ let nextCursor = response?.json?.nextCursor; console.log("Getting next items ", nextCursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "message": "",
- "status": "success"
}
Get current user followers list (or a friends by specifying the secUid).
secUid | string Example: secUid=MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud The TikTok user secUid. You can get this from the Get profile information endpoint using the username. |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
nextCursor | string A iteration parameter returned in each response, should be included in the next requests to get the next items. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.followers(); console.log(response?.json); while(response){ let nextCursor = response?.json?.nextCursor; console.log("Getting next items ", nextCursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "message": "",
- "status": "success"
}
Get current user feed posts, or someone elses by providing the secUid
parameter.
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
secUid | string Example: secUid=MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud The TikTok user secUid. You can get this from the Get profile information endpoint using the username. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.posts.feed(); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "1636508835000",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "2023101317420621382E6C1237C820A98B",
- "now": 1697218926000
}, - "hasMore": true,
- "itemList": [
- {
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6569595380449902597",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "lilyachty",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": false,
- "signature": "I love girls with freckled faces",
- "stitchSetting": 0,
- "uniqueId": "lilyachty",
- "verified": true
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "7253193244845015082",
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "title": "chromespeedchallenge"
}
], - "collected": false,
- "contents": [
- {
- "desc": "I was itnorant as hell.. i aint gone lie .. @A Safe Place Pod ",
- "textExtra": [
- {
- "awemeId": "",
- "end": 61,
- "hashtagName": "",
- "isCommerce": false,
- "secUid": "MS4wLjABAAAAN_UXHzNFuBIWF_n6KTGUzAu8vVAyQWD-Un5iHoOueB9rQoFhg4Q9Et3jsr8tN-_t",
- "start": 44,
- "subType": 0,
- "type": 0,
- "userId": "7174112371630539822",
- "userUniqueId": "asafeplacepod"
}
]
}
], - "createTime": 1697172982,
- "desc": "I was itnorant as hell.. i aint gone lie .. @A Safe Place Pod ",
- "digged": false,
- "duetDisplay": 0,
- "duetEnabled": true,
- "forFriend": false,
- "id": "7289302306921860398",
- "itemCommentStatus": 0,
- "music": {
- "authorName": "lilyachty",
- "duration": 41,
- "id": "7289302423758228270",
- "original": false,
- "title": "original sound"
}, - "officalItem": false,
- "originalItem": false,
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "stats": {
- "collectCount": 360,
- "commentCount": 32,
- "diggCount": 10600,
- "playCount": 68900,
- "shareCount": 14
}, - "stitchDisplay": 0,
- "textExtra": [
- {
- "awemeId": "",
- "end": 61,
- "hashtagName": "",
- "isCommerce": false,
- "secUid": "MS4wLjABAAAAN_UXHzNFuBIWF_n6KTGUzAu8vVAyQWD-Un5iHoOueB9rQoFhg4Q9Et3jsr8tN-_t",
- "start": 44,
- "subType": 0,
- "type": 0,
- "userId": "7174112371630539822",
- "userUniqueId": "asafeplacepod"
}
], - "video": {
- "bitrate": 672311,
- "bitrateInfo": [
- {
- "Bitrate": 672311,
- "CodecType": "h264",
- "GearName": "normal_540_0",
- "PlayAddr": {
- "DataSize": 3519132,
- "FileCs": "c:0-26931-e132",
- "FileHash": "7fdda4288c9559103da6950b6c13caa7",
- "Uri": "v12044gd0000ckkcrcjc77ueepubu1q0",
- "UrlKey": "v12044gd0000ckkcrcjc77ueepubu1q0_h264_540p_672311",
}, - "QualityType": 20
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 41,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7289302306921860398",
- "ratio": "540p",
- "subtitleInfos": [
- {
- "Format": "webvtt",
- "LanguageCodeName": "eng-US",
- "LanguageID": "2",
- "Size": 1564,
- "Source": "ASR",
- "UrlExpire": 1697240567,
- "Version": "1"
}
], - "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -18.2,
- "Peak": 1
}, - "width": 576,
- "zoomCover": {
}
}
}
], - "log_pb": {
- "impr_id": "2023101317420621382E6C1237C820A98B"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
Get current user liked posts, or someone elses by providing the secUid
parameter.
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
secUid | string Example: secUid=MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud The TikTok user secUid. You can get this from the Get profile information endpoint using the username. |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.posts.likes(); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "1636508835000",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "2023101317420621382E6C1237C820A98B",
- "now": 1697218926000
}, - "hasMore": true,
- "itemList": [
- {
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6569595380449902597",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "lilyachty",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": false,
- "signature": "I love girls with freckled faces",
- "stitchSetting": 0,
- "uniqueId": "lilyachty",
- "verified": true
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "7253193244845015082",
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "title": "chromespeedchallenge"
}
], - "collected": false,
- "contents": [
- {
- "desc": "I was itnorant as hell.. i aint gone lie .. @A Safe Place Pod ",
- "textExtra": [
- {
- "awemeId": "",
- "end": 61,
- "hashtagName": "",
- "isCommerce": false,
- "secUid": "MS4wLjABAAAAN_UXHzNFuBIWF_n6KTGUzAu8vVAyQWD-Un5iHoOueB9rQoFhg4Q9Et3jsr8tN-_t",
- "start": 44,
- "subType": 0,
- "type": 0,
- "userId": "7174112371630539822",
- "userUniqueId": "asafeplacepod"
}
]
}
], - "createTime": 1697172982,
- "desc": "I was itnorant as hell.. i aint gone lie .. @A Safe Place Pod ",
- "digged": false,
- "duetDisplay": 0,
- "duetEnabled": true,
- "forFriend": false,
- "id": "7289302306921860398",
- "itemCommentStatus": 0,
- "music": {
- "authorName": "lilyachty",
- "duration": 41,
- "id": "7289302423758228270",
- "original": false,
- "title": "original sound"
}, - "officalItem": false,
- "originalItem": false,
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "stats": {
- "collectCount": 360,
- "commentCount": 32,
- "diggCount": 10600,
- "playCount": 68900,
- "shareCount": 14
}, - "stitchDisplay": 0,
- "textExtra": [
- {
- "awemeId": "",
- "end": 61,
- "hashtagName": "",
- "isCommerce": false,
- "secUid": "MS4wLjABAAAAN_UXHzNFuBIWF_n6KTGUzAu8vVAyQWD-Un5iHoOueB9rQoFhg4Q9Et3jsr8tN-_t",
- "start": 44,
- "subType": 0,
- "type": 0,
- "userId": "7174112371630539822",
- "userUniqueId": "asafeplacepod"
}
], - "video": {
- "bitrate": 672311,
- "bitrateInfo": [
- {
- "Bitrate": 672311,
- "CodecType": "h264",
- "GearName": "normal_540_0",
- "PlayAddr": {
- "DataSize": 3519132,
- "FileCs": "c:0-26931-e132",
- "FileHash": "7fdda4288c9559103da6950b6c13caa7",
- "Uri": "v12044gd0000ckkcrcjc77ueepubu1q0",
- "UrlKey": "v12044gd0000ckkcrcjc77ueepubu1q0_h264_540p_672311",
}, - "QualityType": 20
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 41,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7289302306921860398",
- "ratio": "540p",
- "subtitleInfos": [
- {
- "Format": "webvtt",
- "LanguageCodeName": "eng-US",
- "LanguageID": "2",
- "Size": 1564,
- "Source": "ASR",
- "UrlExpire": 1697240567,
- "Version": "1"
}
], - "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -18.2,
- "Peak": 1
}, - "width": 576,
- "zoomCover": {
}
}
}
], - "log_pb": {
- "impr_id": "2023101317420621382E6C1237C820A98B"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.posts.followingPosts(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "1636508835000",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "2023101317420621382E6C1237C820A98B",
- "now": 1697218926000
}, - "hasMore": true,
- "itemList": [
- {
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6569595380449902597",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "lilyachty",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": false,
- "signature": "I love girls with freckled faces",
- "stitchSetting": 0,
- "uniqueId": "lilyachty",
- "verified": true
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "7253193244845015082",
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "title": "chromespeedchallenge"
}
], - "collected": false,
- "contents": [
- {
- "desc": "I was itnorant as hell.. i aint gone lie .. @A Safe Place Pod ",
- "textExtra": [
- {
- "awemeId": "",
- "end": 61,
- "hashtagName": "",
- "isCommerce": false,
- "secUid": "MS4wLjABAAAAN_UXHzNFuBIWF_n6KTGUzAu8vVAyQWD-Un5iHoOueB9rQoFhg4Q9Et3jsr8tN-_t",
- "start": 44,
- "subType": 0,
- "type": 0,
- "userId": "7174112371630539822",
- "userUniqueId": "asafeplacepod"
}
]
}
], - "createTime": 1697172982,
- "desc": "I was itnorant as hell.. i aint gone lie .. @A Safe Place Pod ",
- "digged": false,
- "duetDisplay": 0,
- "duetEnabled": true,
- "forFriend": false,
- "id": "7289302306921860398",
- "itemCommentStatus": 0,
- "music": {
- "authorName": "lilyachty",
- "duration": 41,
- "id": "7289302423758228270",
- "original": false,
- "title": "original sound"
}, - "officalItem": false,
- "originalItem": false,
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "stats": {
- "collectCount": 360,
- "commentCount": 32,
- "diggCount": 10600,
- "playCount": 68900,
- "shareCount": 14
}, - "stitchDisplay": 0,
- "textExtra": [
- {
- "awemeId": "",
- "end": 61,
- "hashtagName": "",
- "isCommerce": false,
- "secUid": "MS4wLjABAAAAN_UXHzNFuBIWF_n6KTGUzAu8vVAyQWD-Un5iHoOueB9rQoFhg4Q9Et3jsr8tN-_t",
- "start": 44,
- "subType": 0,
- "type": 0,
- "userId": "7174112371630539822",
- "userUniqueId": "asafeplacepod"
}
], - "video": {
- "bitrate": 672311,
- "bitrateInfo": [
- {
- "Bitrate": 672311,
- "CodecType": "h264",
- "GearName": "normal_540_0",
- "PlayAddr": {
- "DataSize": 3519132,
- "FileCs": "c:0-26931-e132",
- "FileHash": "7fdda4288c9559103da6950b6c13caa7",
- "Uri": "v12044gd0000ckkcrcjc77ueepubu1q0",
- "UrlKey": "v12044gd0000ckkcrcjc77ueepubu1q0_h264_540p_672311",
}, - "QualityType": 20
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 41,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7289302306921860398",
- "ratio": "540p",
- "subtitleInfos": [
- {
- "Format": "webvtt",
- "LanguageCodeName": "eng-US",
- "LanguageID": "2",
- "Size": 1564,
- "Source": "ASR",
- "UrlExpire": 1697240567,
- "Version": "1"
}
], - "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -18.2,
- "Peak": 1
}, - "width": 576,
- "zoomCover": {
}
}
}
], - "log_pb": {
- "impr_id": "2023101317420621382E6C1237C820A98B"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.posts.savedPosts(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "1636508835000",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "2023101317420621382E6C1237C820A98B",
- "now": 1697218926000
}, - "hasMore": true,
- "itemList": [
- {
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6569595380449902597",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "lilyachty",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": false,
- "signature": "I love girls with freckled faces",
- "stitchSetting": 0,
- "uniqueId": "lilyachty",
- "verified": true
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "7253193244845015082",
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "title": "chromespeedchallenge"
}
], - "collected": false,
- "contents": [
- {
- "desc": "I was itnorant as hell.. i aint gone lie .. @A Safe Place Pod ",
- "textExtra": [
- {
- "awemeId": "",
- "end": 61,
- "hashtagName": "",
- "isCommerce": false,
- "secUid": "MS4wLjABAAAAN_UXHzNFuBIWF_n6KTGUzAu8vVAyQWD-Un5iHoOueB9rQoFhg4Q9Et3jsr8tN-_t",
- "start": 44,
- "subType": 0,
- "type": 0,
- "userId": "7174112371630539822",
- "userUniqueId": "asafeplacepod"
}
]
}
], - "createTime": 1697172982,
- "desc": "I was itnorant as hell.. i aint gone lie .. @A Safe Place Pod ",
- "digged": false,
- "duetDisplay": 0,
- "duetEnabled": true,
- "forFriend": false,
- "id": "7289302306921860398",
- "itemCommentStatus": 0,
- "music": {
- "authorName": "lilyachty",
- "duration": 41,
- "id": "7289302423758228270",
- "original": false,
- "title": "original sound"
}, - "officalItem": false,
- "originalItem": false,
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "stats": {
- "collectCount": 360,
- "commentCount": 32,
- "diggCount": 10600,
- "playCount": 68900,
- "shareCount": 14
}, - "stitchDisplay": 0,
- "textExtra": [
- {
- "awemeId": "",
- "end": 61,
- "hashtagName": "",
- "isCommerce": false,
- "secUid": "MS4wLjABAAAAN_UXHzNFuBIWF_n6KTGUzAu8vVAyQWD-Un5iHoOueB9rQoFhg4Q9Et3jsr8tN-_t",
- "start": 44,
- "subType": 0,
- "type": 0,
- "userId": "7174112371630539822",
- "userUniqueId": "asafeplacepod"
}
], - "video": {
- "bitrate": 672311,
- "bitrateInfo": [
- {
- "Bitrate": 672311,
- "CodecType": "h264",
- "GearName": "normal_540_0",
- "PlayAddr": {
- "DataSize": 3519132,
- "FileCs": "c:0-26931-e132",
- "FileHash": "7fdda4288c9559103da6950b6c13caa7",
- "Uri": "v12044gd0000ckkcrcjc77ueepubu1q0",
- "UrlKey": "v12044gd0000ckkcrcjc77ueepubu1q0_h264_540p_672311",
}, - "QualityType": 20
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 41,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7289302306921860398",
- "ratio": "540p",
- "subtitleInfos": [
- {
- "Format": "webvtt",
- "LanguageCodeName": "eng-US",
- "LanguageID": "2",
- "Size": 1564,
- "Source": "ASR",
- "UrlExpire": 1697240567,
- "Version": "1"
}
], - "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -18.2,
- "Peak": 1
}, - "width": 576,
- "zoomCover": {
}
}
}
], - "log_pb": {
- "impr_id": "2023101317420621382E6C1237C820A98B"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
secUid | string Example: secUid=MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud The TikTok user secUid. You can get this from the Get profile information endpoint using the username. |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.posts.playlists(); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "2",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20231013174222B384127C3412F32085EB",
- "now": 1697218942000
}, - "hasMore": false,
- "log_pb": {
- "impr_id": "20231013174222B384127C3412F32085EB"
}, - "message": "",
- "playList": [
- {
- "creator": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6631401620847788037",
- "isADVirtual": false,
- "nickname": "Javier Romero",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAwyc-EtpXKyysj_GvtC1C996WUYNiXax8m2wAORouuvV3sb0p94dI-YNWGh-X4pQW",
- "secret": false,
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "javierr",
- "verified": true
}, - "id": "7179791304409238318",
- "mixId": "7179791304409238318",
- "mixName": "Fashionnova 🖤",
- "name": "Fashionnova 🖤",
- "videoCount": 14
}
], - "status": "success",
- "statusCode": 0,
- "status_code": 0
}
playlist_id required | any Example: playlist_id=6948562344666532614 The playlist ID. |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.posts.playlistItems({ playlist_id: "6948562344666532614" }); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "cursor": "1691956065000",
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202310131742238D61BD86860F15203FBC",
- "now": 1697218943000
}, - "hasMore": true,
- "itemList": [
- {
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6631401620847788037",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "Javier Romero",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAwyc-EtpXKyysj_GvtC1C996WUYNiXax8m2wAORouuvV3sb0p94dI-YNWGh-X4pQW",
- "secret": false,
- "stitchSetting": 0,
- "uniqueId": "javierr",
- "verified": true
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "771",
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "title": "michaeljackson"
}
], - "collected": false,
- "contents": [
- {
- "desc": "The hips dont stop for no one 🤣"
}
], - "createTime": 1696708360,
- "desc": "The hips dont stop for no one 🤣",
- "digged": false,
- "duetDisplay": 0,
- "duetEnabled": true,
- "forFriend": false,
- "id": "7287306862427426091",
- "itemCommentStatus": 0,
- "music": {
- "album": "90's Dance Party Hits - The Best of The 90's Dance Music",
- "authorName": "Dance Anthem",
- "duration": 60,
- "id": "6710109176523130881",
- "original": false,
- "title": "Gonna Make You Sweat (Everybody Dance Now)"
}, - "officalItem": false,
- "originalItem": false,
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "stats": {
- "collectCount": 2408,
- "commentCount": 274,
- "diggCount": 65300,
- "playCount": 2800000,
- "shareCount": 277
}, - "stitchDisplay": 0,
- "stitchEnabled": true,
- "video": {
- "bitrate": 1349140,
- "bitrateInfo": [
- {
- "Bitrate": 1349140,
- "CodecType": "h264",
- "GearName": "normal_540_0",
- "PlayAddr": {
- "DataSize": 2807561,
- "FileCs": "c:0-15259-a6a2",
- "FileHash": "e045d13301f8ddf012e406d2e89f44c9",
- "Uri": "v12044gd0000ckgrctrc77u8v98ivi80",
- "UrlKey": "v12044gd0000ckgrctrc77u8v98ivi80_h264_540p_1349140",
}, - "QualityType": 20
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 16,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7287306862427426091",
- "ratio": "540p",
- "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -23.2,
- "Peak": 0.40738
}, - "width": 576,
- "zoomCover": {
}
}
}
], - "log_pb": {
- "impr_id": "202310131742238D61BD86860F15203FBC"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
Get current user recommended posts from the For You section.
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.posts.explore(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20231013174214AE5B9F4C0DF2E32075E2",
- "now": 1697218935000
}, - "hasMore": true,
- "itemList": [
- {
- "BAInfo": "",
- "adAuthorization": false,
- "adLabelVersion": 0,
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "7137838669516588075",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "Michael Myers Solos",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAnUJjlzIyy8MkKoSGX_Q43w63BvdeeWRlUagzLdoncPI-mEdSddR9ytQdT1IAJQMJ",
- "secret": false,
- "signature": "You not beating me in a fight",
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "michael_myers_solos",
- "verified": false
}, - "authorStats": {
- "diggCount": 54,
- "followerCount": 1600000,
- "followingCount": 80,
- "friendCount": 0,
- "heart": 88300000,
- "heartCount": 88300000,
- "videoCount": 110
}, - "challenges": [
- {
- "coverLarger": "",
- "coverMedium": "",
- "coverThumb": "",
- "desc": "",
- "id": "3565",
- "isCommerce": false,
- "profileLarger": "",
- "profileMedium": "",
- "profileThumb": "",
- "stats": {
- "videoCount": 0,
- "viewCount": 0
}, - "title": "michaelmyers"
}
], - "collected": false,
- "contents": [
- {
- "desc": "#michaelmyers #relatable #viral #fyp #foryou ",
- "textExtra": [
- {
- "awemeId": "",
- "end": 13,
- "hashtagId": "3565",
- "hashtagName": "michaelmyers",
- "isCommerce": false,
- "secUid": "",
- "start": 0,
- "subType": 0,
- "type": 1,
- "userId": "",
- "userUniqueId": ""
}
]
}
], - "createTime": 1691197808,
- "desc": "#michaelmyers #relatable #viral #fyp #foryou ",
- "digged": false,
- "diversificationId": 10003,
- "duetDisplay": 0,
- "duetEnabled": true,
- "duetInfo": {
- "duetFromId": "0"
}, - "forFriend": false,
- "id": "7263639216159034670",
- "isAd": false,
- "itemCommentStatus": 0,
- "itemMute": false,
- "music": {
- "album": "",
- "authorName": "slowed._.songs",
- "duration": 21,
- "id": "7239075601271786267",
- "original": true,
- "title": "som original"
}, - "officalItem": false,
- "originalItem": false,
- "playlistId": "",
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "showNotPass": false,
- "stats": {
- "collectCount": 589400,
- "commentCount": 46500,
- "diggCount": 4800000,
- "playCount": 21300000,
- "shareCount": 115200
}, - "stitchDisplay": 0,
- "stitchEnabled": true,
- "textExtra": [
- {
- "awemeId": "",
- "end": 13,
- "hashtagId": "3565",
- "hashtagName": "michaelmyers",
- "isCommerce": false,
- "secUid": "",
- "start": 0,
- "subType": 0,
- "type": 1,
- "userId": "",
- "userUniqueId": ""
}
], - "video": {
- "bitrate": 768746,
- "bitrateInfo": [
- {
- "Bitrate": 838338,
- "CodecType": "h265_hvc1",
- "GearName": "adapt_lowest_1080_1",
- "PlayAddr": {
- "DataSize": 1491613,
- "FileCs": "c:0-13346-fd98",
- "FileHash": "a2bd6120fc0566ea9841019d2d5a3f2d",
- "Uri": "v12044gd0000cj6prp3c77u5tphqfn80",
- "UrlKey": "v12044gd0000cj6prp3c77u5tphqfn80_bytevc1_1080p_838338",
}, - "QualityType": 2
}
], - "codecType": "h264",
- "definition": "540p",
- "duration": 14,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7263639216159034670",
- "ratio": "540p",
- "shareCover": [
- ""
], - "size": 1367793,
- "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -12.9,
- "Peak": 0.74989
}, - "width": 576,
- "zoomCover": {
}
}, - "vl1": false
}
], - "log_pb": {
- "impr_id": "20231013174214AE5B9F4C0DF2E32075E2"
}, - "message": "",
- "status": "success",
- "statusCode": 0,
- "status_code": 0
}
Search anything, users, videos, or get keyword autocomplete suggestions. Using this instead of the Public Search endpoint will give you more personalized and consistent results.
Learn more about downloading videos
category required | string Enum: "general" "users" "videos" "autocomplete" Example: general The search category |
query required | string Example: query=lilyachty The search keyword |
nextCursor | string A iteration parameter returned in each response, should be included in the next requests to get the next items. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.posts.search({ category: "general", query: "lilyachty" }); console.log(response?.json); while(response){ let nextCursor = response?.json?.nextCursor; console.log("Getting next items ", nextCursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "message": "",
- "status": "success"
}
id required | string Example: id=7003402629929913605 The video ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.posts.video({ id: "7003402629929913605" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "$other": {
- "videoLinkHeaders": {
- "Cookie": "tt_chain_token=TMXpDHM3PJdJYl8FEhqTZQ==;",
}
}, - "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "2023101317421755B3FDD29A43812128E5",
- "now": 1697218937000
}, - "itemInfo": {
- "itemStruct": {
- "BAInfo": "",
- "adAuthorization": false,
- "adLabelVersion": 0,
- "author": {
- "commentSetting": 0,
- "downloadSetting": 0,
- "duetSetting": 0,
- "ftc": false,
- "id": "6569595380449902597",
- "isADVirtual": false,
- "isEmbedBanned": false,
- "nickname": "lilyachty",
- "openFavorite": false,
- "privateAccount": false,
- "relation": 0,
- "secUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": false,
- "signature": "I love girls with freckled faces",
- "stitchSetting": 0,
- "ttSeller": false,
- "uniqueId": "lilyachty",
- "verified": true
}, - "authorStats": {
- "diggCount": 6691,
- "followerCount": 8300000,
- "followingCount": 88,
- "friendCount": 0,
- "heart": 189200000,
- "heartCount": 189200000,
- "videoCount": 214
}, - "collected": false,
- "contents": [
- {
- "desc": "Gonna starve in Germany :("
}
], - "createTime": 1655234538,
- "desc": "Gonna starve in Germany :(",
- "digged": false,
- "diversificationId": 10039,
- "duetDisplay": 0,
- "duetEnabled": true,
- "duetInfo": {
- "duetFromId": "0"
}, - "forFriend": false,
- "id": "7109178205151464746",
- "isActivityItem": false,
- "isAd": false,
- "itemCommentStatus": 0,
- "itemMute": false,
- "music": {
- "album": "",
- "authorName": "lilyachty",
- "duration": 15,
- "id": "7109178175363500846",
- "original": true,
- "title": "original sound"
}, - "officalItem": false,
- "originalItem": false,
- "playlistId": "",
- "privateItem": false,
- "secret": false,
- "shareEnabled": true,
- "showNotPass": false,
- "stats": {
- "collectCount": 0,
- "commentCount": 13600,
- "diggCount": 1800000,
- "playCount": 11300000,
- "shareCount": 25400
}, - "stitchDisplay": 0,
- "stitchEnabled": false,
- "video": {
- "bitrate": 1307565,
- "bitrateInfo": [
- {
- "Bitrate": 1307565,
- "CodecType": "h264",
- "GearName": "normal_720_0",
- "PlayAddr": {
- "DataSize": 2481595,
- "FileCs": "c:0-13698-3e54",
- "FileHash": "ee452fa2c27ba439a662b45b79fed69f",
- "Uri": "v12044gd0000cakdvajc77u1jdfkdsl0",
- "UrlKey": "v12044gd0000cakdvajc77u1jdfkdsl0_h264_720p_1307565",
}, - "QualityType": 10
}
], - "codecType": "h264",
- "definition": "720p",
- "duration": 15,
- "encodeUserTag": "",
- "encodedType": "normal",
- "format": "mp4",
- "height": 1024,
- "id": "7109178205151464746",
- "ratio": "720p",
- "size": 2481595,
- "subtitleInfos": [
- {
- "Format": "webvtt",
- "LanguageCodeName": "jpn-JP",
- "LanguageID": "3",
- "Size": 541,
- "Source": "MT",
- "UrlExpire": 1697240552,
- "Version": "4",
- "VideoSubtitleID": -1877084525
}
], - "videoQuality": "normal",
- "volumeInfo": {
- "Loudness": -18.2,
- "Peak": 0.91201
}, - "width": 576,
- "zoomCover": {
}
}, - "vl1": false
}
}, - "log_pb": {
- "impr_id": "2023101317421755B3FDD29A43812128E5"
}, - "message": "",
- "shareMeta": {
- "desc": "1.8M likes, 13.6K comments. “Gonna starve in Germany :(”",
- "title": "TikTok · lilyachty"
}, - "status": "success",
- "statusCode": 0,
- "status_code": 0
}
This endpoint is only available to trusted customers. Learn more about special endpoints
media_id required | string The video ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
{- "media_id": "7109178205151464746"
}
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202206241430240101902180901618AD3E",
- "now": 1656081024000
}, - "is_digg": 1,
- "log_pb": {
- "impr_id": "202206241430240101902180901618AD3E"
}, - "message": "",
- "status": "success",
- "status_code": 0
}
This endpoint is only available to trusted customers. Learn more about special endpoints
media_id required | string The video ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
{- "media_id": "7109178205151464746"
}
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202206241430240101902180901618AD3E",
- "now": 1656081024000
}, - "is_digg": 1,
- "log_pb": {
- "impr_id": "202206241430240101902180901618AD3E"
}, - "message": "",
- "status": "success",
- "status_code": 0
}
media_id required | string Example: media_id=7109178205151464746 The video ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | number The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.posts.comments.list({ media_id: "7109178205151464746" }); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "alias_comment_deleted": false,
- "comments": [
- {
- "author_pin": false,
- "aweme_id": "7109178205151464746",
- "cid": "7109185042560680750",
- "collect_stat": 0,
- "comment_language": "en",
- "create_time": 1655236182,
- "digg_count": 8412,
- "is_author_digged": false,
- "label_list": null,
- "no_show": false,
- "reply_comment": null,
- "reply_comment_total": 177,
- "reply_id": "0",
- "reply_to_reply_id": "0",
- "share_info": {
- "acl": {
- "code": 1,
- "extra": "{\"item_share_acl\":\"empty item value\"}"
}, - "desc": "C's comment: man goes to Germany with a near unlimited budget and orders grilled cheese and chicken tenders",
- "title": "Gonna starve in Germany :(",
}, - "status": 1,
- "stick_position": 0,
- "text": "man goes to Germany with a near unlimited budget and orders grilled cheese and chicken tenders",
- "text_extra": [
- "string"
], - "trans_btn_style": 0,
- "user": {
- "ad_cover_url": null,
- "advance_feature_item_order": null,
- "advanced_feature_info": null,
- "avatar_thumb": {
- "uri": "tos-maliva-avt-0068/72d6fb527a7e5451501577d0ecdc3186",
}, - "bold_fields": null,
- "can_set_geofencing": null,
- "cha_list": null,
- "cover_url": null,
- "custom_verify": "",
- "enterprise_verify_reason": "",
- "events": null,
- "followers_detail": null,
- "geofencing": null,
- "homepage_bottom_toast": null,
- "item_list": null,
- "mutual_relation_avatars": null,
- "need_points": null,
- "nickname": "C",
- "platform_sync_info": null,
- "relative_users": null,
- "search_highlight": null,
- "sec_uid": "MS4wLjABAAAAiBWkeHI69Bbf5gcs-nRrETGYZhBH9ajadCYNMS3j8fU_fRWnMbtE0ymP-VXnxt9z",
- "type_label": null,
- "uid": "6797204664526980101",
- "unique_id": "doowopdad",
- "user_tags": null,
- "white_cover_url": null
}, - "user_buried": false,
- "user_digged": 0
}
], - "cursor": 20,
- "extra": {
- "fatal_item_ids": null,
- "now": 1656079898000
}, - "has_more": 1,
- "log_pb": {
- "impr_id": "202206241411380101901851591B15A451"
}, - "message": "",
- "reply_style": 2,
- "status": "success",
- "status_code": 0,
- "top_gifts": [
- "string"
], - "total": 11112
}
media_id required | string Example: media_id=7109178205151464746 The video ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
comment_id required | string Example: comment_id=7109185042560680750 The comment ID |
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
cursor | number The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.posts.comments.replies({ media_id: "7109178205151464746", comment_id: "7109185042560680750" }); console.log(response?.json); while(response){ let cursor = response?.json?.cursor; console.log("Getting next items ", cursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "comments": [
- {
- "aweme_id": "7109178205151464746",
- "cid": "7109192521695396650",
- "collect_stat": 0,
- "comment_language": "en",
- "create_time": 1655237905,
- "digg_count": 1648,
- "is_author_digged": false,
- "label_list": null,
- "no_show": false,
- "reply_comment": null,
- "reply_id": "7109185042560680750",
- "reply_to_reply_id": "0",
- "share_info": {
- "acl": {
- "code": 1,
- "extra": "{\"item_share_acl\":\"empty item value\"}"
}, - "desc": "priyaxo's comment: When you travel a lot sometimes you just want comfort food. You donât have eat schnitzel for every meal.",
- "title": "Gonna starve in Germany :(",
}, - "status": 1,
- "text": "When you travel a lot sometimes you just want comfort food. You donât have eat schnitzel for every meal.",
- "text_extra": [
- "string"
], - "trans_btn_style": 0,
- "user": {
- "ad_cover_url": null,
- "advance_feature_item_order": null,
- "advanced_feature_info": null,
- "avatar_thumb": {
- "uri": "tos-maliva-avt-0068/f540c760836cecd9585897bf31207ad5",
}, - "bold_fields": null,
- "can_set_geofencing": null,
- "cha_list": null,
- "cover_url": null,
- "custom_verify": "",
- "enterprise_verify_reason": "",
- "events": null,
- "followers_detail": null,
- "geofencing": null,
- "homepage_bottom_toast": null,
- "item_list": null,
- "mutual_relation_avatars": null,
- "need_points": null,
- "nickname": "priyaxo",
- "platform_sync_info": null,
- "relative_users": null,
- "search_highlight": null,
- "sec_uid": "MS4wLjABAAAAK5_1k2kU_FGg46fdKlQpNH-cl0vXKJoTD61BKRYLsA5c_2oZWngfyfPPY5DIMW4D",
- "type_label": null,
- "uid": "6946347802281395205",
- "unique_id": "priyasays",
- "user_tags": null,
- "white_cover_url": null
}, - "user_buried": false,
- "user_digged": 0
}
], - "cursor": 20,
- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202206241412570102231190200B16A6C7",
- "now": 1656079978000
}, - "has_more": 1,
- "log_pb": {
- "impr_id": "202206241412570102231190200B16A6C7"
}, - "message": "",
- "status": "success",
- "status_code": 0,
- "total": 178
}
This endpoint is only available to trusted customers. Learn more about special endpoints
Make a comment or reply to a comment.
media_id required | string The video ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
text required | string The comment text |
reply_comment_id | string You can reply to a comment by including a comment ID |
has_tags | boolean Default: false You should set this to true if you are mentioning someone. |
{- "media_id": "7109178205151464746",
- "text": "Italian food is the best",
- "reply_comment_id": "string",
- "has_tags": false
}
{- "comment": {
- "aweme_id": "7097485150124117254",
- "cid": "7112808106580869894",
- "create_time": 1656079705,
- "digg_count": 0,
- "label_list": null,
- "reply_comment": [
- "string"
], - "reply_id": "0",
- "reply_to_reply_id": "0",
- "status": 7,
- "text": "Italian food is the best",
- "text_extra": [
- "string"
], - "user": {
- "accept_private_policy": true,
- "account_region": "",
- "ad_cover_url": null,
- "advance_feature_item_order": null,
- "advanced_feature_info": null,
- "apple_account": 0,
- "authority_status": 0,
- "avatar_168x168": {
- "height": 720,
- "uri": "tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
- "width": 720
}, - "avatar_300x300": {
- "height": 720,
- "uri": "tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
- "width": 720
}, - "avatar_larger": {
- "height": 720,
- "uri": "tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
- "width": 720
}, - "avatar_medium": {
- "height": 720,
- "uri": "tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
- "width": 720
}, - "avatar_thumb": {
- "height": 720,
- "uri": "tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
- "width": 720
}, - "avatar_uri": "tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
- "aweme_count": 0,
- "bind_phone": "",
- "bold_fields": null,
- "can_set_geofencing": null,
- "cha_list": null,
- "comment_filter_status": 0,
- "comment_setting": 0,
- "commerce_user_level": 0,
- "cover_url": [
- {
- "height": 720,
- "uri": "musically-maliva-obj/1612555907887110",
- "width": 720
}
], - "create_time": 1606080255,
- "custom_verify": "",
- "cv_level": "",
- "download_prompt_ts": 1606142438,
- "download_setting": 3,
- "duet_setting": 3,
- "enterprise_verify_reason": "",
- "events": null,
- "favoriting_count": 0,
- "fb_expire_time": 0,
- "follow_status": 0,
- "follower_count": 0,
- "follower_status": 0,
- "followers_detail": null,
- "following_count": 0,
- "geofencing": null,
- "google_account": "",
- "has_email": false,
- "has_facebook_token": false,
- "has_insights": false,
- "has_orders": false,
- "has_twitter_token": false,
- "has_youtube_token": false,
- "hide_search": false,
- "homepage_bottom_toast": null,
- "ins_id": "",
- "is_ad_fake": false,
- "is_block": false,
- "is_discipline_member": false,
- "is_phone_binded": false,
- "is_star": false,
- "item_list": null,
- "language": "en",
- "live_agreement": 0,
- "live_commerce": false,
- "live_verify": 2,
- "mention_status": 1,
- "mutual_relation_avatars": null,
- "need_points": null,
- "need_recommend": 0,
- "nickname": "lilyachty",
- "platform_sync_info": null,
- "prevent_download": false,
- "react_setting": 3,
- "region": "ES",
- "relative_users": null,
- "room_id": 0,
- "search_highlight": null,
- "sec_uid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": 0,
- "shield_comment_notice": 0,
- "shield_digg_notice": 0,
- "shield_follow_notice": 0,
- "short_id": "0",
- "show_image_bubble": false,
- "signature": "",
- "special_lock": 1,
- "status": 1,
- "stitch_setting": 3,
- "story_status": 0,
- "total_favorited": 0,
- "tw_expire_time": 0,
- "twitter_id": "",
- "twitter_name": "",
- "type_label": null,
- "uid": "7109178205151464746",
- "unique_id": "lilyachty",
- "unique_id_modify_time": 1656079705,
- "user_canceled": false,
- "user_mode": 1,
- "user_period": 0,
- "user_rate": 1,
- "user_tags": null,
- "verification_type": 0,
- "verify_info": "",
- "video_icon": {
- "height": 720,
- "uri": "",
- "url_list": [
- "string"
], - "width": 720
}, - "white_cover_url": null,
- "with_commerce_entry": false,
- "with_shop_entry": false,
- "youtube_channel_id": "",
- "youtube_channel_title": "",
- "youtube_expire_time": 0
}, - "user_digged": 0
}, - "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "20220624140825010223079130211584E5",
- "now": 1656079705000
}, - "label_info": "",
- "log_pb": {
- "impr_id": "20220624140825010223079130211584E5"
}, - "message": "",
- "status": "success",
- "status_code": 0,
- "status_msg": "Comment sent successfully"
}
media_id required | string The video ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
comment_id required | string The comment ID |
{- "media_id": "7109178205151464746",
- "comment_id": "7109185042560680750"
}
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202206241413580101890790860016A4CD",
- "now": 1656080038000
}, - "log_pb": {
- "impr_id": "202206241413580101890790860016A4CD"
}, - "message": "",
- "status": "success",
- "status_code": 0,
- "status_msg": ""
}
media_id required | string The video ID. Can also be a short TikTok link (e.g. vm.tiktok.com/UwU) |
comment_id required | string The comment ID |
{- "media_id": "7109178205151464746",
- "comment_id": "7109185042560680750"
}
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202206241413580101890790860016A4CD",
- "now": 1656080038000
}, - "log_pb": {
- "impr_id": "202206241413580101890790860016A4CD"
}, - "message": "",
- "status": "success",
- "status_code": 0,
- "status_msg": ""
}
This endpoint is only available to trusted customers. Learn more about special endpoints
comment_id required | string The comment ID |
{- "comment_id": "7109185042560680750"
}
{- "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202206241424540102230730270417C5C2",
- "now": 1656080694000
}, - "log_pb": {
- "impr_id": "202206241424540102230730270417C5C2"
}, - "message": "",
- "msg": "success",
- "status": "success",
- "status_code": 0
}
Premium
Get a list of current user conversations including the latest messages
nextCursor | number The starting offset of items list. Returned in every response, should be included in the next request for iteration. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.conversations(); console.log(response?.json); while(response){ let nextCursor = response?.json?.nextCursor; console.log("Getting next items ", nextCursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "conversations": [
- {
- "conversationType": 1,
- "favorite": 1,
- "id": "0:1:684574219823284956:69402435203845897564",
- "inboxType": 0,
- "isParticipant": true,
- "messages": [
- {
- "content": {
- "aweType": 0
}, - "createTime": 1618091225059,
- "senderSecUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "senderUid": "7109178205151464746",
- "status": 0,
- "text": "Come over baby ð
My wifey ain't home tonight",
- "version": 0
}
], - "mute": 0,
- "notice": null,
- "ownerSecUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "ownerUid": "7109178205151464746",
- "participantsCount": 2,
- "participantsUid": [
- "6699813648438969349"
], - "short_id": "6940245147502654884",
- "ticket": "3M8IlBpABq00h2aNB1B5JJ2ne0DTnGLLAFjGQQGMf4BKWJxEYxf7RAE0KaD2EjkQkWiJalT4xj36JGWa1ZmQg7SgQfHLoXffNFYLkIJhe1HVyiPXitoxWFyuzlX1xvBCYhZxkQALHE4gx9AaXBPEZjks7jC"
}
], - "error_desc": "OK",
- "hasMore": true,
- "inbox_type": 0,
- "log_id": "202104141321460106584968",
- "message": null,
- "nextCursor": 1,
- "perUserCursor": 1618342989073013,
- "sequence_id": 0,
- "status": "success",
- "status_code": 0
}
Premium
Get full messages list of a conversation
conversation_id required | any Example: conversation_id=0:1:684574219823284956:69402435203845897564 The conversation ID |
conversation_short_id required | any Example: conversation_short_id=6940245147502654884 The additional conversation short ID (TikTok uses two different ID's for some reason) |
nextCursor | string The starting point of the items list. Returned in every response, should be included in the next request for iteration. |
limit | any |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.messages({ conversation_id: "0:1:684574219823284956:69402435203845897564", conversation_short_id: "6940245147502654884" }); console.log(response?.json); while(response){ let nextCursor = response?.json?.nextCursor; console.log("Getting next items ", nextCursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "error_desc": "OK",
- "hasMore": true,
- "inbox_type": 0,
- "log_id": "202104141322656548",
- "message": null,
- "messages": [
- {
- "clientMessageId": "2e141231-f1a5-4234-8521-de37f55c6711",
- "content": {
- "aweType": 700,
- "isDefault": true,
- "is_card": true,
- "mSendStartTime": 1615901742227,
- "msgHint": null,
- "type": 0
}, - "createTime": 1618091225059,
- "isStranger": false,
- "senderSecUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "senderUid": "7109178205151464746",
- "status": 0,
- "text": "What you thinkin' bout?",
- "type": 7
}
], - "nextCursor": 1615902725060022,
- "sequence_id": 10005,
- "status": "success",
- "status_code": 0
}
Premium
This endpoint is only available to trusted customers.
Learn more about special endpoints
text required | string The message text |
conversation_id required | string The conversation ID |
conversation_short_id required | string The additional conversation short ID (TikTok uses two different ID's for some reason) |
ticket required | string The conversation ticket |
{- "text": "Hey! How you doing?",
- "conversation_id": "0:1:684574219823284956:69402435203845897564",
- "conversation_short_id": "6940245147502654884",
- "ticket": "3M8IlBpABq00h2aNB1B5JJ2ne0DTnGLLAFjGQQGMf4BKWJxEYxf7RAE0KaD2EjkQkWiJalT4xj36JGWa1ZmQg7SgQfHLoXffNFYLkIJhe1HVyiPXitoxWFyuzlX1xvBCYhZxkQALHE4gx9AaXBPEZjks7jC"
}
{- "body": {
- "send_message_body": {
- "check_code": 0,
- "client_message_id": "204ec383-1927-41a1-928e-d93e38d41c56",
- "server_message_id": 7112875354875808000,
- "status": 0
}
}, - "cmd": 100,
- "error_desc": "OK",
- "inbox_type": 0,
- "log_id": "202206241829080101890490991BDF1A6E",
- "message": "",
- "request_arrived_time": 1656095348713,
- "sequence_id": 10010,
- "server_execution_end_time": 1656095348925,
- "status": "success",
- "status_code": 0
}
Premium
Get a list of current user conversations requests including the latest message.
nextCursor | number The starting offset of items list. Returned in every response, should be included in the next request for iteration. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.conversationRequests.conversations(); console.log(response?.json); while(response){ let nextCursor = response?.json?.nextCursor; console.log("Getting next items ", nextCursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "conversation_requests": [
- {
- "id": "0:1:7260252377754181232:7260252377754181232",
- "last_message": {
- "content": {
- "aweType": 700,
- "isDefault": false,
- "is_card": false,
- "sendStartTime": 1690456789329
}, - "createTime": "1690456789518",
- "index_in_conversation": "1690456793412306",
- "message_type": 7,
- "order_in_conversation": "7260252377754181232",
- "senderSecUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "senderUid": "7260252377754181232",
- "status": 0,
- "text": "Hey there!",
- "version": "0"
}, - "participantsSecUid": [
- "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud"
], - "participantsUid": [
- "7260252377754181232"
], - "short_id": "7260252377754181232"
}
], - "error_desc": "OK",
- "hasMore": false,
- "inbox_type": 0,
- "log_id": "20230727112101932CD4BFC3BAED2BDB9F",
- "message": "",
- "nextCursor": "1",
- "status": "success",
- "status_code": 0
}
Premium
Get the messages of a conversation in the requests tab (generally there is a 3 message limit).
conversation_id required | any Example: conversation_id=0:1:684574219823284956:69402435203845897564 The conversation ID |
conversation_short_id required | any Example: conversation_short_id=6940245147502654884 The additional conversation short ID |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.conversationRequests.messages({ conversation_id: "0:1:684574219823284956:69402435203845897564", conversation_short_id: "6940245147502654884" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "error_desc": "OK",
- "inbox_type": 0,
- "log_id": "20230727110811C472D0F798857E277CAF",
- "message": "",
- "messages": [
- {
- "clientMessageId": "546545-6551-4bc7-87ac-77123542de9c7",
- "content": {
- "aweType": 700,
- "isDefault": false,
- "is_card": false,
- "sendStartTime": 1690454842402
}, - "createTime": "1690454998870",
- "index_in_conversation": "1690455006071416",
- "isStranger": false,
- "message_type": 7,
- "order_in_conversation": "7260252377754181232",
- "senderSecUid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "senderUid": "7260252377754181232",
- "status": 0,
- "text": "Hey there!",
- "type": 7
}
], - "status": "success",
- "status_code": 0
}
Premium
conversation_id required | any Example: conversation_id=0:1:684574219823284956:69402435203845897564 The conversation ID |
conversation_short_id required | any Example: conversation_short_id=6940245147502654884 The additional conversation short ID |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.conversationRequests.delete({ conversation_id: "0:1:684574219823284956:69402435203845897564", conversation_short_id: "6940245147502654884" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "error_desc": "OK",
- "inbox_type": 0,
- "log_id": "20230727111926932CD4BFC3BAED2B7D4F",
- "message": "Conversation request has been deleted successfully.",
- "status": "success",
- "status_code": 0
}
Premium
conversation_id required | any Example: conversation_id=0:1:684574219823284956:69402435203845897564 The conversation ID |
conversation_short_id required | any Example: conversation_short_id=6940245147502654884 The additional conversation short ID |
user_id required | string Example: user_id=6569595380449902597 The sender ID. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.conversationRequests.accept({ conversation_id: "0:1:684574219823284956:69402435203845897564", conversation_short_id: "6940245147502654884", user_id: "6569595380449902597" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "message": "Conversation request has been accepted successfully.",
- "status": "success",
- "status_code": 0,
- "status_msg": ""
}
Check current user live permissions. You can use this to check if the user has third_party streaming enabled.
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.permissions(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "data": {
- "access_recall_info": [
- {
- "access_type": 1,
- "duration": 0,
- "end_timestamp": 0,
- "status": 0
}
], - "age_restricted_config": {
- "disabled": false,
- "disabled_reason": "",
- "open": false,
- "show": true
}, - "anchor_fans_info": {
- "avatar_pick_reason": [
- "string"
], - "avatar_type": 0,
- "avatars": [
- "string"
], - "living_friend_count": 0,
- "no_online_fans_count_reason": 2,
- "online_fans_count": 0,
- "online_friend_count": 0
}, - "anchor_prompt_type": 0,
- "ban_status": {
- "end_time": 0,
- "is_ban": false
}, - "banner_data": {
- "banner_list": [
- "string"
], - "container_height": 0,
- "container_type": 0,
- "container_width": 0,
- "lynx_container_url": ""
}, - "block_detail_url": "",
- "block_prompt": "",
- "block_schema_locale": "",
- "block_status": 0,
- "can_show_fragment": true,
- "cover": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
- "width": 0
}, - "cover_audit_status": 2,
- "deprecate1": 0,
- "deprecate3": 0,
- "deprecate4": "",
- "device_level": 0,
- "donation_sticker": 1,
- "game_guide_info": [
- {
- "create_scene": 1,
- "show_game_live_guide": true
}
], - "game_live_convert_info": {
- "acu_type": 0,
- "convert_type": 0,
- "text": "",
- "title": ""
}, - "game_live_info": {
- "has_comment_in_game_live": false,
- "has_game_live": false,
- "has_game_live_2min": false
}, - "go_live_prompt": "",
- "guide_status": 0,
- "has_fragment": false,
- "is_new_anchor": false,
- "last_room_id": 7113508115123211000,
- "last_room_id_str": "7113508115123211017",
- "live_additional_prompt": "Make sure LIVE isn't interrupted. Switching to other apps during LIVE may pause the broadcast and reset the stream key.",
- "live_house_status": 0,
- "live_scenario": {
- "enable_live_audio": false,
- "enable_live_screenshot": false,
- "enable_live_studio": false,
- "enable_live_third_party": false
}, - "live_status": 4,
- "never_go_live_flag": 0,
- "obs_accees_recall_info": {
- "duration": 0,
- "end_timestamp": 0,
- "status": 0
}, - "pop_info": {
- "button_content": [
- "string"
], - "content": "",
- "has_pop": false
}, - "push_stream_info": {
- "1": {
- "default_quality": {
- "desc": "",
- "name": "540p",
- "sdk_key": "sd"
}, - "qualities": [
- {
- "desc": "",
- "name": "540p",
- "sdk_key": "sd"
}
]
}, - "4": {
- "default_quality": {
- "desc": "",
- "name": "540p",
- "sdk_key": "sd"
}, - "qualities": [
- {
- "desc": "",
- "name": "540p",
- "sdk_key": "sd"
}
]
}
}, - "screenshot_cover_status": 1,
- "show_game_tags": true,
- "stream_status": 0,
- "title": "Powered by TikAPI",
- "use_avatar_as_cover": true
}, - "extra": {
- "now": 1656248396102
}, - "message": "",
- "status": "success",
- "status_code": 0
}
Premium
Start a live video, if the user has live enabled.
The live is closed automatically after stream ends.
title required | any The live room header title |
third_party | any Default: true TikTok has a special gateway for invite only users. Only if this is enabled you can do third party streaming. |
hashtag_id | number (Optional) The topic ID. You can find this by using the Get topics list endpoint. |
game_tag_id | number (Optional) The sub-topic ID for gaming topics. |
{- "title": "Check out my live!",
- "third_party": true,
- "hashtag_id": 0,
- "game_tag_id": 0
}
{- "message": "",
- "room": {
- "cover": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "720x720/tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
- "width": 0
}, - "create_time": 1656242720,
- "id": "7114708315123211013",
- "status": 1
}, - "status": "success",
- "stream": {
- "id": "2993873698363425157",
- "pull": {
- "default_resolution": "ORIGION",
- "flv": {
},
}, - "push": {
- "key": "stream-2993873698363425157?expire=1656847520&sign=91962f21a00930c435e7001e77777269",
- "server": "rtmp://push-rtmp-f5-va01.tiktokcdn.com/stage",
- "url": "rtmp://push-rtmp-f5-va01.tiktokcdn.com/stage/stream-2993873698363425157?expire=1656847520&sign=91962f21a00930c435e7001e77777269"
}
}
}
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.stop(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "data": { },
- "extra": {
- "now": 1656242845804
}, - "message": "",
- "status": "success",
- "status_code": 0
}
Get information about a live video.
You can use this for any user
that has an open live video. There is a roomId
parameter included when
fetching profile information about users.
room_id required | string Example: room_id=7112492061034646278 The Live room ID. You can find this using the Get profile information endpoint. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.info({ room_id: "7112492061034646278" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "data": {
- "admin_user_ids": [
- "string"
], - "answering_question_content": "",
- "app_id": 1233,
- "auto_cover": 0,
- "book_end_time": 0,
- "book_time": 0,
- "business_live": 0,
- "challenge_info": "",
- "common_label_list": "",
- "cover": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "720x720/tos-maliva-avt-0068/f82a09c587e28744df2d364ed7c8d41b",
- "width": 0
}, - "create_time": 1656243590,
- "deco_list": [
- "string"
], - "existed_commerce_goods": false,
- "feed_room_label": {
- "avg_color": "#A3A3CC",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "webcast-sg/2ea90002aca1159b5c67",
- "width": 0
}, - "feed_room_labels": [
- "string"
], - "filter_msg_rules": [
- "string"
], - "finish_reason": 0,
- "finish_time": 1656244293,
- "finish_url": "",
- "finish_url_v2": "",
- "follow_msg_style": 2,
- "forum_extra_data": "",
- "game_tag": [
- "string"
], - "gift_poll_vote_enabled": false,
- "group_source": 0,
- "have_wishlist": false,
- "hot_sentence_info": "",
- "id": 7113511870039903000,
- "id_str": "7113511870039902987",
- "indicators": [
- "string"
], - "introduction": "",
- "is_gated_room": false,
- "is_replay": false,
- "is_show_user_card_switch": false,
- "last_ping_time": 1656244293,
- "layout": 0,
- "like_count": 0,
- "link_mic": {
- "audience_id_list": [
- "string"
], - "battle_scores": [
- "string"
], - "battle_settings": {
- "battle_id": 0,
- "channel_id": 0,
- "duration": 0,
- "finished": 0,
- "match_type": 0,
- "start_time": 0,
- "start_time_ms": 0,
- "theme": ""
}, - "channel_id": 0,
- "followed_count": 0,
- "linked_user_list": [
- "string"
], - "multi_live_enum": 1,
- "rival_anchor_id": 0,
- "show_user_list": [
- "string"
]
}, - "live_distribution": [
- "string"
], - "live_id": 12,
- "live_reason": "",
- "live_room_mode": 0,
- "live_type_audio": false,
- "live_type_linkmic": false,
- "live_type_normal": true,
- "live_type_sandbox": false,
- "live_type_screenshot": false,
- "live_type_social_live": false,
- "live_type_third_party": false,
- "living_room_attrs": {
- "admin_flag": 0,
- "rank": 0,
- "room_id": 7113511870039903000,
- "room_id_str": "7113511870039902981",
- "silence_flag": 0
}, - "lottery_finish_time": 0,
- "mosaic_status": 0,
- "os_type": 2,
- "owner": {
- "allow_find_by_contacts": false,
- "allow_others_download_video": false,
- "allow_others_download_when_sharing_video": false,
- "allow_share_show_profile": false,
- "allow_show_in_gossip": false,
- "allow_show_my_action": false,
- "allow_strange_comment": false,
- "allow_unfollower_comment": false,
- "allow_use_linkmic": false,
- "badge_image_list": [
- "string"
], - "badge_list": [
- "string"
], - "bg_img_url": "",
- "bio_description": "ð si tengo azul ð ð",
- "block_status": 0,
- "border_list": [
- "string"
], - "comment_restrict": 0,
- "constellation": "",
- "create_time": 0,
- "disable_ichat": 0,
- "display_id": "channel_pantera_on",
- "enable_ichat_img": 0,
- "exp": 0,
- "fan_ticket_count": 0,
- "fold_stranger_chat": false,
- "follow_info": {
- "follow_status": 0,
- "follower_count": 10919,
- "following_count": 947,
- "push_status": 0
}, - "follow_status": 0,
- "ichat_restrict_type": 0,
- "id": 7098901522989204000,
- "id_str": "7098901522989204487",
- "is_follower": false,
- "is_following": false,
- "link_mic_stats": 0,
- "media_badge_image_list": [
- "string"
], - "modify_time": 1655995881,
- "need_profile_guide": false,
- "new_real_time_icons": [
- "string"
], - "nickname": "ð©ðChannel.Pantera.0nðð©",
- "own_room": {
- "room_ids": [
- 7113511870039903000
], - "room_ids_str": [
- "7113511870039902981"
]
}, - "pay_grade": {
- "grade_banner": "",
- "grade_describe": "",
- "grade_icon_list": [
- "string"
], - "level": 0,
- "name": "",
- "next_name": "",
- "next_privileges": "",
- "score": 0,
- "screen_chat_type": 0,
- "upgrade_need_consume": 0
}, - "pay_score": 0,
- "pay_scores": 0,
- "push_comment_status": false,
- "push_digg": false,
- "push_follow": false,
- "push_friend_action": false,
- "push_ichat": false,
- "push_status": false,
- "push_video_post": false,
- "push_video_recommend": false,
- "real_time_icons": [
- "string"
], - "sec_uid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": 0,
- "share_qrcode_uri": "",
- "special_id": "",
- "status": 1,
- "ticket_count": 0,
- "top_fans": [
- "string"
], - "top_vip_no": 0,
- "user_attr": {
- "is_admin": false,
- "is_muted": false,
- "is_super_admin": false,
- "mute_duration": 0
}, - "user_role": 0,
- "verified": false,
- "verified_content": "",
- "verified_reason": "",
- "with_car_management_permission": false,
- "with_commerce_permission": false,
- "with_fusion_shop_entry": false
}, - "owner_device_id": 0,
- "owner_device_id_str": "",
- "owner_user_id": 7098901522989204000,
- "owner_user_id_str": "",
- "pre_enter_time": 0,
- "ranklist_audience_type": 0,
- "relation_tag": "",
- "replay": true,
- "room_auth": {
- "Banner": 1,
- "BroadcastMessage": 0,
- "Chat": true,
- "ChatL2": false,
- "ChatSubOnly": false,
- "CustomizablePoll": 0,
- "Danmaku": false,
- "Digg": true,
- "DonationSticker": 2,
- "Gift": true,
- "GiftAnchorMt": 1,
- "GiftPoll": 0,
- "GoldenEnvelope": 0,
- "GoldenEnvelopeActivity": 0,
- "InteractionQuestion": true,
- "Landscape": 2,
- "LandscapeChat": 0,
- "LuckMoney": true,
- "Pictionary": 0,
- "Poll": 0,
- "Promote": false,
- "PromoteOther": 0,
- "Props": false,
- "PublicScreen": 1,
- "QuickChat": 0,
- "Rank": 0,
- "RoomContributor": false,
- "Share": true,
- "ShareEffect": 0,
- "UserCard": true,
- "UserCount": 0,
- "Viewers": false,
- "transaction_history": 0,
- "use_user_pv": false
}, - "room_create_ab_param": "",
- "room_layout": 0,
- "room_sticker_list": [
- "string"
], - "room_tabs": [
- "string"
], - "room_tag": 0,
- "search_id": 0,
- "share_msg_style": 2,
- "short_title": "",
- "short_touch_items": [
- "string"
], - "social_interaction": {
- "linkmic_scene_linker": { },
- "multi_live": {
- "linkmic_service_version": 0,
- "user_settings": {
- "multi_live_apply_permission": 1
}
}
}, - "start_time": 0,
- "stats": {
- "digg_count": 0,
- "enter_count": 0,
- "fan_ticket": 0,
- "follow_count": 18,
- "gift_uv_count": 0,
- "id": 7113511870039903000,
- "id_str": "7113511870039902987",
- "like_count": 0,
- "replay_fan_ticket": 0,
- "replay_viewers": 725,
- "share_count": 0,
- "total_user": 1271,
- "total_user_desp": "",
- "user_count_composition": {
- "my_follow": 0.34,
- "other": 0.62,
- "video_detail": 0
}, - "watermelon": 0
}, - "status": 2,
- "sticker_list": [
- "string"
], - "stream_id": 2993452386747941000,
- "stream_id_str": "2993452386747940937",
- "stream_url": {
- "candidate_resolution": [
- "SD1"
], - "complete_push_urls": [
- "string"
], - "default_resolution": "ORIGION",
- "extra": {
- "anchor_interact_profile": 0,
- "audience_interact_profile": 0,
- "bframe_enable": false,
- "bitrate_adapt_strategy": 0,
- "bytevc1_enable": false,
- "default_bitrate": 0,
- "fps": 0,
- "gop_sec": 0,
- "hardware_encode": false,
- "height": 0,
- "max_bitrate": 0,
- "min_bitrate": 0,
- "roi": false,
- "sw_roi": false,
- "video_profile": 0,
- "width": 0
}, - "flv_pull_url": {
}, - "flv_pull_url_params": {
- "FULL_HD1": "{\"VCodec\":\"h264\"}",
- "HD1": "{\"VCodec\":\"h264\"}",
- "SD1": "{\"VCodec\":\"h264\"}",
- "SD2": "{\"VCodec\":\"h264\"}"
}, - "hls_pull_url_map": { },
- "hls_pull_url_params": "{\"VCodec\":\"h264\"}",
- "id": 2993452386747941000,
- "id_str": "2993452386747940937",
- "live_core_sdk_data": {
- "pull_data": {
- "options": {
- "default_quality": {
- "level": 0,
- "name": "Original",
- "resolution": "",
- "sdk_key": "origin",
- "v_codec": ""
}, - "qualities": [
- {
- "level": 10,
- "name": "Original",
- "resolution": "",
- "sdk_key": "origin",
- "v_codec": ""
}
]
}, - "stream_data": "{\"common\":{\"session_id\":\"056-202206261151400101890722161C150E49\",\"rule_ids\":\"{\\\"ab_version_trace\\\":null,\\\"sched\\\":\\\"{\\\\\\\"result\\\\\\\":{\\\\\\\"hit\\\\\\\":\\\\\\\"default\\\\\\\",\\\\\\\"cdn\\\\\\\":107}}\\\"}\"},\"data\":{\"sd\":{\"main\":{\"flv\":\"https://pull-f5-va01.tiktokcdn.com/stage/stream-2993452386747940937_sd.flv\",\"hls\":\"https://pull-hls-f16-va01.tiktokcdn.com/stage/stream-2993452386747940937_sd/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-va01.tiktokcdn.com/stage/stream-2993452386747940937_sd/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":0,\\\"resolution\\\":\\\"480x864\\\",\\\"vbitrate\\\":800000}\"}},\"ld\":{\"main\":{\"flv\":\"https://pull-f5-va01.tiktokcdn.com/stage/stream-2993452386747940937_ld.flv\",\"hls\":\"https://pull-hls-f16-va01.tiktokcdn.com/stage/stream-2993452386747940937_ld/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-va01.tiktokcdn.com/stage/stream-2993452386747940937_ld/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":0,\\\"resolution\\\":\\\"480x864\\\",\\\"vbitrate\\\":500000}\"}},\"hd\":{\"main\":{\"flv\":\"https://pull-f5-va01.tiktokcdn.com/stage/stream-2993452386747940937_hd.flv\",\"hls\":\"https://pull-hls-f16-va01.tiktokcdn.com/stage/stream-2993452386747940937_hd/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-va01.tiktokcdn.com/stage/stream-2993452386747940937_hd/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":0,\\\"resolution\\\":\\\"480x864\\\",\\\"vbitrate\\\":1000000}\"}},\"uhd\":{\"main\":{\"flv\":\"https://pull-f5-va01.tiktokcdn.com/stage/stream-2993452386747940937_uhd.flv\",\"hls\":\"https://pull-hls-f16-va01.tiktokcdn.com/stage/stream-2993452386747940937_uhd/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-va01.tiktokcdn.com/stage/stream-2993452386747940937_uhd/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":0,\\\"resolution\\\":\\\"480x864\\\",\\\"vbitrate\\\":1000000}\"}},\"origin\":{\"main\":{\"flv\":\"https://pull-f5-va01.tiktokcdn.com/stage/stream-2993452386747940937.flv\",\"hls\":\"https://pull-hls-f16-va01.tiktokcdn.com/stage/stream-2993452386747940937/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-va01.tiktokcdn.com/stage/stream-2993452386747940937/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":4,\\\"resolution\\\":\\\"480x864\\\",\\\"vbitrate\\\":1232}\"}}}}"
}
}, - "provider": 0,
- "push_urls": [
- "string"
], - "resolution_name": {
- "AUTO": "AUTO",
- "FULL_HD1": "1080p",
- "HD1": "720p",
- "ORIGION": "Original",
- "SD1": "360p",
- "SD2": "540p",
- "pm_mt_video_1080p60": "1080p60",
- "pm_mt_video_720p60": "720p60"
}, - "rtmp_pull_url_params": "{\"VCodec\":\"h264\"}",
- "rtmp_push_url": "",
- "rtmp_push_url_params": "",
- "stream_control_type": 0
}, - "stream_url_filtered_info": {
- "is_gated_room": false,
- "is_paid_event": false
}, - "title": "âï¸",
- "top_fans": [
- {
- "fan_ticket": 3,
- "user": {
- "allow_find_by_contacts": false,
- "allow_others_download_video": false,
- "allow_others_download_when_sharing_video": false,
- "allow_share_show_profile": false,
- "allow_show_in_gossip": false,
- "allow_show_my_action": false,
- "allow_strange_comment": false,
- "allow_unfollower_comment": false,
- "allow_use_linkmic": false,
- "avatar_large": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "1080x1080/musically-maliva-obj/1652314700655621",
- "width": 0
}, - "avatar_medium": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "720x720/musically-maliva-obj/1652314700655621",
- "width": 0
}, - "avatar_thumb": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "100x100/musically-maliva-obj/1652314700655621",
- "width": 0
}, - "badge_image_list": [
- "string"
], - "badge_list": [
- "string"
], - "bg_img_url": "",
- "bio_description": "",
- "block_status": 0,
- "border_list": [
- "string"
], - "comment_restrict": 0,
- "commerce_webcast_config_ids": [
- "string"
], - "constellation": "",
- "create_time": 0,
- "disable_ichat": 0,
- "display_id": "enviamunangel",
- "enable_ichat_img": 0,
- "exp": 0,
- "fan_ticket_count": 0,
- "fold_stranger_chat": false,
- "follow_info": {
- "follow_status": 0,
- "follower_count": 950,
- "following_count": 3123,
- "push_status": 0
}, - "follow_status": 0,
- "ichat_restrict_type": 0,
- "id": 6519100164026684000,
- "id_str": "6519100164026684437",
- "is_follower": false,
- "is_following": false,
- "link_mic_stats": 0,
- "media_badge_image_list": [
- "string"
], - "modify_time": 1641666227,
- "need_profile_guide": false,
- "new_real_time_icons": [
- "string"
], - "nickname": "Ã ngel",
- "pay_grade": {
- "grade_banner": "",
- "grade_describe": "",
- "grade_icon_list": [
- "string"
], - "level": 0,
- "name": "",
- "next_name": "",
- "next_privileges": "",
- "score": 0,
- "screen_chat_type": 0,
- "upgrade_need_consume": 0
}, - "pay_score": 0,
- "pay_scores": 0,
- "push_comment_status": false,
- "push_digg": false,
- "push_follow": false,
- "push_friend_action": false,
- "push_ichat": false,
- "push_status": false,
- "push_video_post": false,
- "push_video_recommend": false,
- "real_time_icons": [
- "string"
], - "sec_uid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": 1,
- "share_qrcode_uri": "",
- "special_id": "",
- "status": 1,
- "ticket_count": 0,
- "top_fans": [
- "string"
], - "top_vip_no": 0,
- "user_attr": {
- "is_admin": false,
- "is_muted": false,
- "is_super_admin": false,
- "mute_duration": 0
}, - "user_role": 0,
- "verified": false,
- "verified_content": "",
- "verified_reason": "",
- "with_car_management_permission": false,
- "with_commerce_permission": false,
- "with_fusion_shop_entry": false
}
}
], - "use_filter": false,
- "user_count": 129,
- "user_share_text": "",
- "video_feed_tag": "",
- "warning_tag": {
- "duration": 257,
- "tag_source": 0,
- "text": {
- "default_format": {
- "bold": false,
- "color": "#ffffffff",
- "font_size": 0,
- "italic": false,
- "italic_angle": 0,
- "use_heigh_light_color": false,
- "use_remote_clor": false,
- "weight": 400
}, - "default_pattern": "Consuming substances featured in this LIVE video could harm your health.",
- "key": "pm_mt_tag_healthdisclaimer",
- "pieces": [
- "string"
]
}
}, - "webcast_sdk_version": 0,
- "with_draw_something": false,
- "with_ktv": false,
- "with_linkmic": true
}, - "extra": {
- "now": 1656244300333
}, - "message": "",
- "status": "success",
- "status_code": 0
}
Get a list of recommended live videos, related with a live video.
room_id required | string Example: room_id=7112492061034646278 The Live room ID. You can find this using the Get profile information endpoint. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.recommend({ room_id: "7112492061034646278" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "data": [
- {
- "admin_user_ids": [
- "string"
], - "answering_question_content": "",
- "app_id": 0,
- "auto_cover": 0,
- "book_end_time": 0,
- "book_time": 0,
- "business_live": 0,
- "challenge_info": "",
- "common_label_list": "",
- "cover": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "720x720/tos-maliva-avt-0068/3b9b5df0dca2f4c2765753f81db3431a",
- "width": 0
}, - "create_time": 1656237033,
- "deco_list": [
- "string"
], - "existed_commerce_goods": false,
- "feed_room_label": {
- "avg_color": "#FAFAFA",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "webcast-sg/2ea90002aca1159b5c67",
- "width": 0
}, - "feed_room_labels": [
- "string"
], - "filter_msg_rules": [
- "string"
], - "finish_reason": 0,
- "finish_time": 1656242857,
- "finish_url": "",
- "finish_url_v2": "",
- "follow_msg_style": 0,
- "forum_extra_data": "",
- "game_tag": [
- "string"
], - "gift_poll_vote_enabled": false,
- "group_source": 0,
- "have_wishlist": false,
- "hot_sentence_info": "",
- "id": 7113483668508691000,
- "id_str": "7113483668508691207",
- "indicators": [
- "string"
], - "introduction": "",
- "is_gated_room": false,
- "is_replay": false,
- "is_show_user_card_switch": false,
- "last_ping_time": 0,
- "layout": 0,
- "like_count": 0,
- "live_distribution": [
- "string"
], - "live_id": 12,
- "live_reason": "",
- "live_room_mode": 0,
- "live_type_audio": false,
- "live_type_linkmic": false,
- "live_type_normal": true,
- "live_type_sandbox": false,
- "live_type_screenshot": false,
- "live_type_social_live": false,
- "live_type_third_party": false,
- "living_room_attrs": {
- "admin_flag": 0,
- "rank": 0,
- "room_id": 7113483668508691000,
- "room_id_str": "7113483668508691206",
- "silence_flag": 0
}, - "lottery_finish_time": 0,
- "mosaic_status": 0,
- "os_type": 2,
- "owner": {
- "allow_find_by_contacts": false,
- "allow_others_download_video": false,
- "allow_others_download_when_sharing_video": false,
- "allow_share_show_profile": false,
- "allow_show_in_gossip": false,
- "allow_show_my_action": false,
- "allow_strange_comment": false,
- "allow_unfollower_comment": false,
- "allow_use_linkmic": false,
- "badge_image_list": [
- "string"
], - "badge_list": [
- "string"
], - "bg_img_url": "",
- "bio_description": "2ndcuenta crececuentassð\nsigue a mis 20kðseguidores/as y gana seguidoresðð¥ð¾",
- "block_status": 0,
- "border_list": [
- "string"
], - "comment_restrict": 0,
- "constellation": "",
- "create_time": 0,
- "disable_ichat": 0,
- "display_id": "crececuentas",
- "enable_ichat_img": 0,
- "exp": 0,
- "fan_ticket_count": 0,
- "fold_stranger_chat": false,
- "follow_info": {
- "follow_status": 0,
- "follower_count": 30852,
- "following_count": 10000,
- "push_status": 0
}, - "follow_status": 0,
- "ichat_restrict_type": 0,
- "id": 7043292577395869000,
- "id_str": "7043292577395868677",
- "is_follower": false,
- "is_following": false,
- "link_mic_stats": 1,
- "media_badge_image_list": [
- "string"
], - "modify_time": 1655899299,
- "need_profile_guide": false,
- "new_real_time_icons": [
- "string"
], - "nickname": "Javi",
- "own_room": {
- "room_ids": [
- 7113483668508691000
], - "room_ids_str": [
- "7113483668508691206"
]
}, - "pay_grade": {
- "grade_banner": "",
- "grade_describe": "",
- "grade_icon_list": [
- "string"
], - "level": 0,
- "name": "",
- "next_name": "",
- "next_privileges": "",
- "score": 0,
- "screen_chat_type": 0,
- "upgrade_need_consume": 0
}, - "pay_score": 0,
- "pay_scores": 0,
- "push_comment_status": false,
- "push_digg": false,
- "push_follow": false,
- "push_friend_action": false,
- "push_ichat": false,
- "push_status": false,
- "push_video_post": false,
- "push_video_recommend": false,
- "real_time_icons": [
- "string"
], - "sec_uid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": 0,
- "share_qrcode_uri": "",
- "special_id": "",
- "status": 1,
- "ticket_count": 0,
- "top_fans": [
- "string"
], - "top_vip_no": 0,
- "user_attr": {
- "is_admin": false,
- "is_muted": false,
- "is_super_admin": false,
- "mute_duration": 0
}, - "user_role": 0,
- "verified": false,
- "verified_content": "",
- "verified_reason": "",
- "with_car_management_permission": false,
- "with_commerce_permission": false,
- "with_fusion_shop_entry": false
}, - "owner_device_id": 0,
- "owner_device_id_str": "",
- "owner_user_id": 7043292577395869000,
- "owner_user_id_str": "",
- "pre_enter_time": 0,
- "ranklist_audience_type": 0,
- "relation_tag": "",
- "replay": false,
- "room_auth": {
- "Banner": 1,
- "BroadcastMessage": 0,
- "Chat": true,
- "ChatL2": false,
- "ChatSubOnly": false,
- "CustomizablePoll": 0,
- "Danmaku": false,
- "Digg": true,
- "DonationSticker": 1,
- "Gift": true,
- "GiftAnchorMt": 1,
- "GiftPoll": 0,
- "GoldenEnvelope": 0,
- "GoldenEnvelopeActivity": 0,
- "InteractionQuestion": false,
- "Landscape": 1,
- "LandscapeChat": 2,
- "LuckMoney": true,
- "Pictionary": 0,
- "Poll": 0,
- "Promote": false,
- "PromoteOther": 0,
- "Props": false,
- "PublicScreen": 1,
- "QuickChat": 0,
- "Rank": 0,
- "RoomContributor": false,
- "Share": false,
- "ShareEffect": 0,
- "UserCard": true,
- "UserCount": 0,
- "Viewers": false,
- "transaction_history": 0,
- "use_user_pv": false
}, - "room_create_ab_param": "",
- "room_layout": 0,
- "room_sticker_list": [
- "string"
], - "room_tabs": [
- "string"
], - "room_tag": 0,
- "search_id": 0,
- "share_msg_style": 0,
- "short_title": "",
- "short_touch_items": [
- "string"
], - "start_time": 0,
- "stats": {
- "digg_count": 0,
- "enter_count": 0,
- "fan_ticket": 709,
- "follow_count": 379,
- "gift_uv_count": 0,
- "id": 7113483668508691000,
- "id_str": "7113483668508691207",
- "like_count": 0,
- "replay_fan_ticket": 0,
- "replay_viewers": 0,
- "share_count": 0,
- "total_user": 8789,
- "total_user_desp": "",
- "user_count_composition": {
- "my_follow": 0.01,
- "other": 0.97,
- "video_detail": 0
}, - "watermelon": 0
}, - "status": 2,
- "sticker_list": [
- "string"
], - "stream_id": 2993451946847764500,
- "stream_id_str": "2993451946847764553",
- "stream_url": {
- "candidate_resolution": [
- "SD1"
], - "complete_push_urls": [
- "string"
], - "default_resolution": "ORIGION",
- "extra": {
- "anchor_interact_profile": 0,
- "audience_interact_profile": 0,
- "bframe_enable": false,
- "bitrate_adapt_strategy": 0,
- "bytevc1_enable": false,
- "default_bitrate": 0,
- "fps": 0,
- "gop_sec": 0,
- "hardware_encode": false,
- "height": 0,
- "max_bitrate": 0,
- "min_bitrate": 0,
- "roi": false,
- "sw_roi": false,
- "video_profile": 0,
- "width": 0
}, - "flv_pull_url": {
}, - "flv_pull_url_params": {
- "FULL_HD1": "{\"VCodec\":\"h264\"}",
- "HD1": "{\"VCodec\":\"h264\"}",
- "SD1": "{\"VCodec\":\"h264\"}",
- "SD2": "{\"VCodec\":\"h264\"}"
}, - "hls_pull_url_map": { },
- "hls_pull_url_params": "{\"VCodec\":\"h264\"}",
- "id": 2993451946847764500,
- "id_str": "2993451946847764557",
- "live_core_sdk_data": {
- "pull_data": {
- "options": {
- "default_quality": {
- "level": 0,
- "name": "Original",
- "resolution": "",
- "sdk_key": "origin",
- "v_codec": ""
}, - "qualities": [
- {
- "level": 0,
- "name": "360p",
- "resolution": "",
- "sdk_key": "ld",
- "v_codec": ""
}
]
}, - "stream_data": "{\"common\":{\"session_id\":\"052-202206261127430101901851371E1400D7\",\"rule_ids\":\"{\\\"ab_version_trace\\\":null,\\\"sched\\\":\\\"{\\\\\\\"result\\\\\\\":{\\\\\\\"hit\\\\\\\":\\\\\\\"default\\\\\\\",\\\\\\\"cdn\\\\\\\":107}}\\\"}\"},\"data\":{\"sd\":{\"main\":{\"flv\":\"https://pull-f5-va01.tiktokcdn.com/stage/stream-2993451946847764553_sd.flv\",\"hls\":\"https://pull-hls-f16-va01.tiktokcdn.com/stage/stream-2993451946847764553_sd/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-va01.tiktokcdn.com/stage/stream-2993451946847764553_sd/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":0,\\\"resolution\\\":\\\"480P\\\",\\\"vbitrate\\\":800000}\"}},\"ld\":{\"main\":{\"flv\":\"https://pull-f5-va01.tiktokcdn.com/stage/stream-2993451946847764553_ld.flv\",\"hls\":\"https://pull-hls-f16-va01.tiktokcdn.com/stage/stream-2993451946847764553_ld/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-va01.tiktokcdn.com/stage/stream-2993451946847764553_ld/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":0,\\\"resolution\\\":\\\"480P\\\",\\\"vbitrate\\\":500000}\"}},\"hd\":{\"main\":{\"flv\":\"https://pull-f5-va01.tiktokcdn.com/stage/stream-2993451946847764553_hd.flv\",\"hls\":\"https://pull-hls-f16-va01.tiktokcdn.com/stage/stream-2993451946847764553_hd/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-va01.tiktokcdn.com/stage/stream-2993451946847764553_hd/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":0,\\\"resolution\\\":\\\"540P\\\",\\\"vbitrate\\\":1000000}\"}},\"uhd\":{\"main\":{\"flv\":\"https://pull-f5-va01.tiktokcdn.com/stage/stream-2993451946847764553_uhd.flv\",\"hls\":\"https://pull-hls-f16-va01.tiktokcdn.com/stage/stream-2993451946847764553_uhd/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-va01.tiktokcdn.com/stage/stream-2993451946847764553_uhd/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":0,\\\"resolution\\\":\\\"720P\\\",\\\"vbitrate\\\":1000000}\"}},\"origin\":{\"main\":{\"flv\":\"https://pull-f5-va01.tiktokcdn.com/stage/stream-2993451946847764553_or4.flv\",\"hls\":\"https://pull-hls-f16-va01.tiktokcdn.com/stage/stream-2993451946847764553_or4/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-va01.tiktokcdn.com/stage/stream-2993451946847764553_or4/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":4,\\\"resolution\\\":\\\"or4\\\",\\\"vbitrate\\\":1000000}\"}}}}"
}
}, - "provider": 0,
- "push_urls": [
- "string"
], - "resolution_name": {
- "AUTO": "AUTO",
- "FULL_HD1": "1080p",
- "HD1": "720p",
- "ORIGION": "Original",
- "SD1": "360p",
- "SD2": "540p",
- "pm_mt_video_1080p60": "1080p60",
- "pm_mt_video_720p60": "720p60"
}, - "rtmp_pull_url_params": "{\"VCodec\":\"h264\"}",
- "rtmp_push_url": "",
- "rtmp_push_url_params": "",
- "stream_control_type": 0
}, - "title": "ðcrecer junt@s groowwwð",
- "top_fans": [
- {
- "fan_ticket": 251,
- "user": {
- "allow_find_by_contacts": false,
- "allow_others_download_video": false,
- "allow_others_download_when_sharing_video": false,
- "allow_share_show_profile": false,
- "allow_show_in_gossip": false,
- "allow_show_my_action": false,
- "allow_strange_comment": false,
- "allow_unfollower_comment": false,
- "allow_use_linkmic": false,
- "avatar_large": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "1080x1080/musically-maliva-obj/1665237534993413",
- "width": 0
}, - "avatar_medium": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "720x720/musically-maliva-obj/1665237534993413",
- "width": 0
}, - "avatar_thumb": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "100x100/musically-maliva-obj/1665237534993413",
- "width": 0
}, - "badge_image_list": [
- {
- "avg_color": "",
- "height": 0,
- "image_type": 26,
- "is_animated": false,
- "open_web_url": "",
- "uri": "",
- "url_list": [
- "string"
], - "width": 0
}
], - "badge_list": [
- {
- "OpenWebURL": "",
- "display": false,
- "display_type": 2,
- "priority_type": 40,
- "scene_type": 2,
- "text": {
- "default_pattern": "New gifter",
- "display_type": 2,
- "key": "pm_mt_live_ng_im",
- "pieces": [
- null
]
}
}
], - "bg_img_url": "",
- "bio_description": "",
- "block_status": 0,
- "border_list": [
- "string"
], - "comment_restrict": 0,
- "commerce_webcast_config_ids": [
- "string"
], - "constellation": "",
- "create_time": 0,
- "disable_ichat": 0,
- "display_id": "pabli0627",
- "enable_ichat_img": 0,
- "exp": 0,
- "fan_ticket_count": 0,
- "fold_stranger_chat": false,
- "follow_info": {
- "follow_status": 0,
- "follower_count": 422,
- "following_count": 2193,
- "push_status": 0
}, - "follow_status": 0,
- "ichat_restrict_type": 0,
- "id": 6820812090372244000,
- "id_str": "6820812090372244487",
- "is_follower": false,
- "is_following": false,
- "link_mic_stats": 1,
- "media_badge_image_list": [
- "string"
], - "modify_time": 1651738876,
- "need_profile_guide": false,
- "new_real_time_icons": [
- "string"
], - "nickname": "Pablo Borrego",
- "pay_grade": {
- "grade_banner": "",
- "grade_describe": "",
- "grade_icon_list": [
- "string"
], - "level": 0,
- "name": "",
- "next_name": "",
- "next_privileges": "",
- "score": 0,
- "screen_chat_type": 0,
- "upgrade_need_consume": 0
}, - "pay_score": 0,
- "pay_scores": 0,
- "push_comment_status": false,
- "push_digg": false,
- "push_follow": false,
- "push_friend_action": false,
- "push_ichat": false,
- "push_status": false,
- "push_video_post": false,
- "push_video_recommend": false,
- "real_time_icons": [
- "string"
], - "sec_uid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": 0,
- "share_qrcode_uri": "",
- "special_id": "",
- "status": 1,
- "ticket_count": 0,
- "top_fans": [
- "string"
], - "top_vip_no": 0,
- "user_attr": {
- "is_admin": false,
- "is_muted": false,
- "is_super_admin": false,
- "mute_duration": 0
}, - "user_role": 0,
- "verified": false,
- "verified_content": "",
- "verified_reason": "",
- "with_car_management_permission": false,
- "with_commerce_permission": false,
- "with_fusion_shop_entry": false
}
}
], - "use_filter": false,
- "user_count": 59,
- "user_share_text": "",
- "video_feed_tag": "",
- "webcast_sdk_version": 0,
- "with_draw_something": false,
- "with_ktv": false,
- "with_linkmic": true
}
], - "extra": {
- "now": 1656242863687
}, - "message": "",
- "status": "success",
- "status_code": 0
}
Get statistics for the current user live video, after it has ended.
room_id required | string Example: room_id=7112492061034646278 The Live room ID. You can find this using the Get profile information endpoint. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.stats({ room_id: "7112492061034646278" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "data": {
- "period_stats": {
- "decimal_num": 0,
- "stats_type": 4,
- "value": 12
}, - "room_stats": {
- "live_comment_ucnt": 389,
- "live_consume_ucnt": 556,
- "live_end_time": "2022-06-24 19:41:42",
- "live_like_cnt": 889,
- "live_new_fans_ucnt": 233,
- "live_pause_duration": 0,
- "live_start_time": "2022-06-24 19:40:38",
- "live_watch_ucnt": 1,
- "room_id": "7112893677857082117",
- "total_score": 0
}
}, - "extra": {
- "now": 1656099702534
}, - "message": "",
- "status": "success",
- "status_code": 0
}
Premium
Get real-time live chat, gifts, and other events for any live video.
room_id required | string Example: room_id=7112492061034646278 The Live room ID. You can find this using the Get profile information endpoint. |
nextCursor | string Returned in each response, should be included in the next requests to get the next chat events. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.chat({ room_id: "7112492061034646278" }); console.log(response?.json); while(response){ let nextCursor = response?.json?.nextCursor; console.log("Getting next items ", nextCursor); response = await Promise.resolve( response?.nextItems() ); } } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "message": "",
- "messagesList": [
- {
- "content": "Welcome to TikTok LIVE! Have fun interacting with others in real-time and remember to follow our Community Guidelines.",
- "createTime": "1656244591979",
- "isShowMsg": false,
- "messageType": "RoomMessage",
- "msgId": "1656244591979539523",
- "priorityScore": "0",
- "source": "0",
- "supprotLandscape": false
}
], - "nextCursor": "MTY1NjI0NDU5MTk5MV83MTEzNTE2MzUyNTIxODk3NzcyXzFfMS0tLXNwbGl0X2N1c3Jvci0tLWZldGNoX3RpbWU6MTY1NjI0NDU5MTk5MXxzdGFydF90aW1lOjE2NTYyNDQ0OTg1NjJ8YWNrX2lkczo3MTEzNTE1OTQ5OTIzNjUyNjEzX2ViOCw3MTEzNTE1OTU1NzQ5MzU4MzQyX2ViOCw3MTEzNTE1OTczMDQzNjIwNjEzX2VjMCw3MTEzNTE1OTg4NzU5NTk1NzgxX2VjOCw3MTEzNTE1OTkyMzYxMzU4MzQxX2VjYSw3MTEzNTE2MDAxMjgzMDE3NDc3X2VjZSw3MTEzNTE2MDAzMDM1NzQ1MDMwX2VjZSw3MTEzNTE2MDE4NTAwNzAwOTM0X2VkNCw3MTEzNTE2MDQ0NTM0NzQ4MTY2X2VlMiw3MTEzNTE2MDYwOTU2NjkzNTEwX2VlYSw3MTEzNTE2MDU3MTkyNzQ1Nzc0X2VlNiw3MTEzNTE2MDc4NzMwNjYwNjEzX2VmMCw3MTEzNTE2MDc5ODAwMjczNjY5X2VmMCw3MTEzNTE2MTAzODM3NTg2NDM4X2VmYyw3MTEzNTE2MTEzMzg5MDc5MzAyX2YwMCw3MTEzNTE2MTEzNjgxODQ3MzAxX2YwMiw3MTEzNTE2MTYzOTQyNjE4MTE4X2YxOCw3MTEzNTE2MTY3NjkyMDEyMjkzX2YxOCw3MTEzNTE2MjI4MjQ1MTQ2MzczX2YzNCw3MTEzNTE2MjMzMzc4NzMxMDE0X2YzOCw3MTEzNTE2MjQ5OTY3MTUxOTE4X2YzZSw3MTEzNTE2MjU4NDkwNzQ3NjU0X2Y0Miw3MTEzNTE2MjY4Mzc5OTgyNTk3X2Y0Niw3MTEzNTE2MjY5MzY2MDg2NDA1X2Y0Niw3MTEzNTE2MjY5MTg1Mjc0ODg1X2Y0OCw3MTEzNTE2Mjg4NzE0NDI3MTQyX2Y1MCw3MTEzNTE2MjkyNjY5NDc3ODk0X2Y1Miw3MTEzNTE2MzA5NDAwNzE4MDg2X2Y1YSw3MTEzNTE2MzQyMDQwMzgyMjEzX2Y2OCw3MTEzNTE2MjA5NTQyNjQ2NTM0X2Y2OHxmbGFnOjF8c2VxOjF8bmV4dF9jdXJzb3I6MTY1NjI0NDU5MTk5MV83MTEzNTE2MzUyNTIxODk3NzcyXzFfMXx3c3NfaW5mbzowLTE2NTYyNDQ1OTE5OTEtMC0w",
- "now": "1656244591991",
- "pushServer": "wss://webcast16-ws-useast1a.tiktok.com/webcast/im/push/",
- "status": "success"
}
Premium
This endpoint is only available to trusted customers.
Learn more about special endpoints
Send a chat message to any live video
room_id required | string The Live room ID. You can find this using the Get profile information endpoint. |
text required | string The chat text message |
{- "room_id": "7112492061034646278",
- "text": "A mí me gusta"
}
{- "data": {
- "content": "A mà me gusta",
- "fullscreen_text_color": "",
- "id": 7,
- "msg_id": 7113524577946914000,
- "msg_id_str": "7113524577946913547",
- "user": {
- "allow_find_by_contacts": false,
- "allow_others_download_video": false,
- "allow_others_download_when_sharing_video": false,
- "allow_share_show_profile": false,
- "allow_show_in_gossip": false,
- "allow_show_my_action": false,
- "allow_strange_comment": false,
- "allow_unfollower_comment": false,
- "allow_use_linkmic": false,
- "avatar_large": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "1080x1080/tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
- "width": 0
}, - "avatar_medium": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "720x720/tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
- "width": 0
}, - "avatar_thumb": {
- "avg_color": "",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "100x100/tos-maliva-avt-0068/9f25676d45ce0451d722997ef71f7804",
- "width": 0
}, - "badge_image_list": [
- "string"
], - "badge_list": [
- "string"
], - "bg_img_url": "",
- "bio_description": "",
- "block_status": 0,
- "border_list": [
- "string"
], - "comment_restrict": 0,
- "commerce_webcast_config_ids": [
- "string"
], - "constellation": "",
- "create_time": 0,
- "disable_ichat": 0,
- "display_id": "lilyachty",
- "enable_ichat_img": 0,
- "exp": 0,
- "fan_ticket_count": 0,
- "fold_stranger_chat": false,
- "follow_info": {
- "follow_status": 0,
- "follower_count": 3263,
- "following_count": 16,
- "push_status": 0
}, - "follow_status": 0,
- "ichat_restrict_type": 0,
- "id": 6845742198232106000,
- "id_str": "6845742198232105987",
- "is_follower": false,
- "is_following": false,
- "link_mic_stats": 1,
- "media_badge_image_list": [
- "string"
], - "modify_time": 1656083826,
- "need_profile_guide": false,
- "new_real_time_icons": [
- "string"
], - "nickname": "lilyachty",
- "pay_grade": {
- "grade_banner": "",
- "grade_describe": "",
- "grade_icon_list": [
- "string"
], - "level": 0,
- "name": "",
- "next_name": "",
- "next_privileges": "",
- "score": 0,
- "screen_chat_type": 0,
- "upgrade_need_consume": 0
}, - "pay_score": 0,
- "pay_scores": 0,
- "push_comment_status": false,
- "push_digg": false,
- "push_follow": false,
- "push_friend_action": false,
- "push_ichat": false,
- "push_status": false,
- "push_video_post": false,
- "push_video_recommend": false,
- "real_time_icons": [
- "string"
], - "sec_uid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "secret": 0,
- "share_qrcode_uri": "",
- "special_id": "",
- "status": 1,
- "ticket_count": 0,
- "top_fans": [
- "string"
], - "top_vip_no": 0,
- "user_attr": {
- "is_admin": false,
- "is_muted": false,
- "is_super_admin": false,
- "mute_duration": 0
}, - "user_role": 0,
- "verified": false,
- "verified_content": "",
- "verified_reason": "",
- "with_car_management_permission": false,
- "with_commerce_permission": false,
- "with_fusion_shop_entry": false
}
}, - "extra": {
- "now": 1656246547193
}, - "message": "",
- "status": "success",
- "status_code": 0
}
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.topics(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "data": {
- "game_hashtag": {
- "id": 5,
- "image": {
- "avg_color": "#DCDCFA",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "webcast-sg/5Gaming.png",
- "width": 0
}, - "namespace": 0,
- "title": "Gaming"
}, - "game_tag_list": [
- {
- "bundle_id": "1456547302",
- "full_name": "A Dance of Fire and Ice",
- "game_category": [
- {
- "game_type": 1,
- "title": "PC games"
}
], - "hashtag_id": [
- "string"
], - "hashtag_list": [
- {
- "id": 5,
- "namespace": 0,
- "title": "Gaming"
}
], - "id": 488,
- "landscape": 1,
- "package_name": "com.fizzd.connectedworlds",
- "short_name": "ADoFI",
- "show_name": "A Dance of Fire and Ice"
}
], - "hashtag": [
- {
- "id": 0,
- "image": {
- "avg_color": "#EBE1CE",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "webcast-sg/Lark20210330-181437_topic_none.png",
- "width": 0
}, - "namespace": 0,
- "title": "None"
}
], - "third_party_hashtag": [
- {
- "id": 5,
- "image": {
- "avg_color": "#F1FFEB",
- "height": 0,
- "image_type": 0,
- "is_animated": false,
- "open_web_url": "",
- "uri": "webcast-sg/5Gaming.png",
- "width": 0
}, - "namespace": 0,
- "title": "Gaming"
}
]
}, - "extra": {
- "now": 1662040301896
}, - "message": "",
- "status": "success",
- "status_code": 0
}
page | any Example: page=1 The list page number |
count | any Example: count=12 The items limit per page |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.transactionHistory(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "data": {
- "list_recharge_order": [
- {
- "amount": "7000",
- "back_type": "paypal",
- "bank_type": "paypal",
- "currency": "$",
- "date": "2022-11-09 02:48:43",
- "list_invoice_id": [
- {
- "invoice_id": 9652217
}
], - "method": 1000,
- "order_id": "10000077763842550246411057",
- "payment": "74.20",
- "safe_bank_card": "",
- "status": 1
}
], - "total_count": 158
}, - "extra": {
- "now": 1669127854245
}, - "message": "",
- "status": "success",
- "status_code": 0
}
query required | string Example: query=lilyachty The search keyword |
cursor | number The starting offset of items list. Returned in every response, should be included in the next request for iteration. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.search({ query: "lilyachty" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "backtrace": "",
- "cursor": 12,
- "data": [
- {
- "live_info": {
- "client_version": 300503,
- "cover": {
- "avg_color": "#523749",
- "uri": "webcast-sg/7260252377754181232",
}, - "id": 7260252377754182000,
- "id_str": "7260252377754181232",
- "like_count": 3758,
- "owner": {
- "avatar_large": {
- "uri": "1080x1080/tos-alisg-avt-0068/982fb1925741fd79ef960f887ba76e31",
}, - "avatar_medium": {
- "uri": "720x720/tos-alisg-avt-0068/982fb1925741fd79ef960f887ba76e31",
}, - "avatar_thumb": {
- "uri": "100x100/tos-alisg-avt-0068/982fb1925741fd79ef960f887ba76e31",
}, - "bio_description": "Hey there!",
- "display_id": "lilyachty",
- "follow_info": {
- "follower_count": 7027,
- "following_count": 1322
}, - "id": 7260252377754182000,
- "id_str": "7260252377754181232",
- "mint_type_label": [
- 7260252377754182000
], - "modify_time": 1690457390,
- "nickname": "lilyachty",
- "own_room": {
- "room_ids": [
- 7260252377754182000
], - "room_ids_str": [
- "7260252377754181232"
]
}, - "pay_grade": { },
- "sec_uid": "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud",
- "status": 1,
- "user_attr": { }
}, - "owner_user_id": 7260252377754182000,
- "room_info": {
- "has_commerce_goods": false,
- "is_battle": false
}, - "stats": {
- "total_user": 12664
}, - "status": 2,
- "stream_url": {
- "flv_pull_url_params": {
- "SD1": "{\"VCodec\":\"h264\"}",
- "SD2": "{\"VCodec\":\"h264\"}"
}, - "live_core_sdk_data": {
- "pull_data": {
- "options": {
- "default_quality": {
- "name": "Original",
- "sdk_key": "origin"
}
}, - "stream_data": "{\"common\":{\"session_id\":\"052-202307271213208CF7A409EABBC745FC71\",\"rule_ids\":\"{\\\"ab_version_trace\\\":null,\\\"sched\\\":\\\"{\\\\\\\"result\\\\\\\":{\\\\\\\"hit\\\\\\\":\\\\\\\"default\\\\\\\",\\\\\\\"cdn\\\\\\\":1337}}\\\"}\"},\"data\":{\"origin\":{\"main\":{\"flv\":\"https://pull-f5-sg01.fcdn.us.tiktokv.com/stage/stream-7260252377754181232_or4.flv\",\"hls\":\"https://pull-hls-f16-tt01.fcdn.us.tiktokv.com/stage/stream-7260252377754181232_or4/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-tt01.fcdn.us.tiktokv.com/stage/stream-7260252377754181232_or4/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"tile\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":4,\\\"resolution\\\":\\\"or4\\\",\\\"vbitrate\\\":1000000}\"}},\"sd\":{\"main\":{\"flv\":\"https://pull-f5-sg01.fcdn.us.tiktokv.com/stage/stream-7260252377754181232_sd.flv\",\"hls\":\"https://pull-hls-f16-tt01.fcdn.us.tiktokv.com/stage/stream-7260252377754181232_sd/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-tt01.fcdn.us.tiktokv.com/stage/stream-7260252377754181232_sd/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"tile\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":0,\\\"resolution\\\":\\\"480P\\\",\\\"vbitrate\\\":800000}\"}},\"ld\":{\"main\":{\"flv\":\"https://pull-f5-sg01.fcdn.us.tiktokv.com/stage/stream-7260252377754181232_ld.flv\",\"hls\":\"https://pull-hls-f16-tt01.fcdn.us.tiktokv.com/stage/stream-7260252377754181232_ld/index.m3u8\",\"cmaf\":\"https://pull-cmaf-f16-tt01.fcdn.us.tiktokv.com/stage/stream-7260252377754181232_ld/index.mpd\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"tile\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"gop\\\":0,\\\"resolution\\\":\\\"480P\\\",\\\"vbitrate\\\":500000}\"}}}}"
}
},
}, - "stream_url_filtered_info": { },
- "title": "Let's goo!!!",
- "user_count": 674
}
}
], - "extra": {
- "fatal_item_ids": [
- "string"
], - "logid": "202307271213208CF7A409EABBC745FC71",
- "now": 1690460000000,
- "search_request_id": ""
}, - "has_more": 1,
- "log_pb": {
- "impr_id": "202307271213208CF7A409EABBC745FC71"
}, - "message": "",
- "status": "success",
- "status_code": 0
}
days | number Default: 7 The days time frame for the analytics data |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.analytics(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "data": {
- "diamonds_detail": {
- "diamonds": {
- "Followers": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "Total": [
- {
- "Date": 1689724800,
- "Value": 0
}
]
}, - "gifter": {
- "Followers": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "Total": [
- {
- "Date": 1689724800,
- "Value": 0
}
]
}
}, - "follower_active_detail": {
- "follower_active_data_status": 3,
- "hourly_data": [
- {
- "Value": 3104,
- "hour": "01"
}
]
}, - "live_duration_detail": {
- "live_count": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "live_duration": [
- {
- "Date": 1689724800,
- "Value": 0
}
]
}, - "new_follower_detail": {
- "comment_uv": {
- "Followers": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "Total": [
- {
- "Date": 1689724800,
- "Value": 0
}
]
}, - "likes": {
- "Followers": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "Total": [
- {
- "Date": 1689724800,
- "Value": 0
}
]
}, - "new_followers": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "shares": {
- "Followers": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "Total": [
- {
- "Date": 1689724800,
- "Value": 0
}
]
}
}, - "summary_data": {
- "diamonds": 45336,
- "live_duration": 46827,
- "new_followers": 52,
- "total_views": 5485
}, - "view_detail": {
- "viewer_statics": {
- "anchor_live_acu": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "top_viewer_count": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "total_views": {
- "Followers": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "Total": [
- {
- "Date": 1689724800,
- "Value": 0
}
]
}, - "unique_viewers": {
- "Followers": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "Total": [
- {
- "Date": 1689724800,
- "Value": 0
}
]
}, - "watch_duration": {
- "Followers": [
- {
- "Date": 1689724800,
- "Value": 0
}
], - "Total": [
- {
- "Date": 1689724800,
- "Value": 0
}
]
}
}, - "viewers_ship_entry": {
- "following": 35,
- "live_recomm": 48,
- "others": 11,
- "share": 0,
- "video_recomm": 4
}
}, - "viewer_details": {
- "is_uv_valid": true,
- "viewers_age": [
- {
- "age_section": "13-17",
- "percent": 4
}
], - "viewers_gender": {
- "female_percent": 21,
- "male_percent": 79
}, - "viewers_region": {
- "others": 7,
- "top_viewers_region_list": [
- {
- "percent": 93,
- "region_name": "US"
}
]
}
}
}, - "extra": {
- "now": 1690458723602
}, - "message": "",
- "status": "success",
- "status_code": 0
}
count | number <= 30 Default: 30 Example: count=30 Maximum amount of items for one request |
offset | number The starting offset of items list. Returned in every response, should be included in the next request for iteration. |
sort | number Default: 0 Enum: 0 1 Example: sort=1 Sort results by ascending (1) or descending (0). Default is descending (0). |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.list(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "data": {
- "total": 578,
- "video_list": [
- {
- "diamonds": 76148,
- "duration": 4635,
- "end_time": 1686838466,
- "new_followers": 16,
- "room_id": "7244854653230273281",
- "start_time": 1686833831,
- "title": "Heyy",
- "views": 1058
}
]
}, - "extra": {
- "now": 1690458886733
}, - "hasMore": true,
- "message": "",
- "offset": 30,
- "status": "success",
- "status_code": 0
}
room_id required | string Example: room_id=7112492061034646278 The Live room ID. |
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); const User = new api.user({ accountKey: "DemoAccountKeyTokenSeHYGXDfd4SFD320Sc39Asd0Sc39A" }); (async function(){ try{ let response = await User.live.details({ room_id: "7112492061034646278" }); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "data": {
- "analytics": {
- "earnings": {
- "diamonds": 76148,
- "diamonds_details": {
- "gift_fan_tickets_percentage": 100,
- "multi_guest_fan_tickets_percentage": 0,
- "star_comment_fan_tickets_percentage": 0
}, - "gifters": 21
}, - "interaction": {
- "comment": 48,
- "likes": 16555,
- "new_followers": 16,
- "shares": 6
}, - "views": {
- "anchor_live_acu": 19,
- "average_watch_time": 55,
- "top_viewer_count": 148,
- "total_views": 1058,
- "unique_viewers": 825
}
}, - "average_watch_time": {
- "follower": 108,
- "non_follower": 37
}, - "detailed_metrics": {
- "commenter": {
- "follower": 26,
- "non_follower": 22
}, - "gifters": {
- "follower": 18,
- "non_follower": 3
}, - "viewers": {
- "follower": 216,
- "non_follower": 609
}
}, - "duration": 4635,
- "end_time": 1686838466,
- "pause_duration": 0,
- "start_time": 1686833831,
- "title": "Heyy",
- "views_by_setion": {
- "following": 19,
- "live_recomm": 49,
- "others": 26,
- "share": 0,
- "video_recomm": 4
}
}, - "extra": {
- "now": 1690459012358
}, - "message": "",
- "status": "success",
- "status_code": 0
}
import TikAPI from 'tikapi'; const api = TikAPI("myAPIKey"); (async function(){ try{ let response = await api.key(); console.log(response.json); } catch(err){ console.log(err?.statusCode, err?.message, err?.json) } })();
{- "accounts": [
- {
- "account_key": "XK4XF6DO91kSi7HDWzA0d1mBXmfivdsN",
- "active": true,
- "authorized": 1,
- "date_added": 1656279649,
- "tiktok_id": "6845742198232105989",
- "username": "demoapi"
}
], - "active": 1,
- "app": {
- "id": "c_1234567890",
- "name": "TikAPI",
- "trusted": 1,
}, - "bandwidth": {
- "consumed": 100315236,
- "extra": 5000000000,
- "included": 480000000000
}, - "credits": 779,
- "dark_mode": 0,
- "date_expiry": 1659088800,
- "has_expired": false,
- "id": 1,
- "logs": [
- {
- "date_added": 1656506436.4717357,
- "ip": "79.152.10.83",
- "is_valid": 1,
- "method": "GET",
- "path": "/public/check?username=lilyachty",
- "total_size": 9099
}
], - "logs_count": 4,
- "message": "",
- "plan_id": 3,
- "status": "success",
- "sub_id": 5,
- "subscription_active": 1
}