TikTok API
22 endpoints for profiles, posts and transcripts.
Every TikTok endpoint, by group. Each is a GET under /v1/tiktok.
Quick Reference
| Property | Value |
|---|---|
| Base path | /v1/tiktok |
| Endpoints | 22 |
| Credits | See Below |
| Guide | TikTok |
Accounts
GETProfile
/v1/tiktok/profileA profile with its exact follower and like counts.1 creditGETProfile Followers/v1/tiktok/profile/followersAn account's followers, newest first, 30 a page.1 creditGETProfile Following/v1/tiktok/profile/followingThe accounts an account follows, when it shows them.1 creditGETProfile Liked/v1/tiktok/profile/likedPosts an account liked, when its likes are public.1 creditGETProfile Playlists/v1/tiktok/profile/playlistsThe playlists an account made.1 creditGETProfile Posts/v1/tiktok/profile/postsAn account's posts, newest first, 30 a page.1 creditGETProfile Reposts/v1/tiktok/profile/repostsOther people's posts an account reposted.1 creditGETLive/v1/tiktok/liveWhether an account is live, and its room.1 creditPosts
GETPlaylist Posts
/v1/tiktok/playlist/postsThe posts of a playlist, 30 a page.1 creditGETPost/v1/tiktok/postOne post with its counts, media and sound.1 creditGETPost Comments/v1/tiktok/post/commentsA post's top-level comments, 50 a page.1 creditGETPost Comment Replies/v1/tiktok/post/comment/repliesThe replies to one comment, 50 a page.1 creditGETPost Related/v1/tiktok/post/relatedPosts TikTok recommends beside one post.1 creditGETPost Transcript/v1/tiktok/post/transcriptA post's captions as text with their times.10 creditsDiscovery
GETCollection Posts
/v1/tiktok/collection/postsThe posts of a public saved collection, 30 a page.1 creditGETHashtag/v1/tiktok/hashtagA hashtag with its post and view counts.1 creditGETHashtag Posts/v1/tiktok/hashtag/postsPosts under a hashtag, 30 a page.1 creditGETSearch/v1/tiktok/searchPosts matching a query, 30 a page.1 creditGETSearch Users/v1/tiktok/search/usersAccounts matching a query.1 creditGETSound/v1/tiktok/soundA sound, and how many posts use it.1 creditGETSound Posts/v1/tiktok/sound/postsPosts that use a sound, 30 a page.1 creditGETTrending/v1/tiktok/trendingWhat the explore page shows now, by category.5 creditsExample Request
Every TikTok endpoint is called this way: its path, and what to read as query parameters.
import { SocialAPI } from "@socialapihq/sdk";
const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });
const { data } = await client.tiktok.profile({ handle: "nike" });{
"data": {
"id": "208464585232822272",
"username": "nike",
"displayName": "Nike",
"bio": "Just Do It.",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e0b0ac7b6ad6447a8e923fd1eb162f2c~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=c73b1f8a&x-expires=1795730400&x-signature=WFCAToitWtbkgo5qXRwrQmcX%2FZY%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my",
"url": "https://www.tiktok.com/@nike",
"verified": true,
"private": false,
"followers": 9440793,
"following": 94,
"likes": 51312842,
"posts": 1131,
"externalUrl": "http://empli.fi/niketiktok",
"createdAt": null,
"ext": {
"secUid": "MS4wLjABAAAA_3ndMt8d_tECTdpKgCxcx238tOnQZX-20wqN01aMui5zQ7hsqSdff-jC5qYC-Cl_",
"friends": 47,
"liked": 0,
"category": "Sports, Fitness & Outdoors",
"seller": false,
"likesPublic": false,
"roomId": null
}
}
}Errors
A call that fails costs nothing. See Errors for every code.