Skip to Content

Platforms

TikTok

Read TikTok profiles and their lists, posts, comments and replies, transcripts, hashtags, sounds, playlists, live rooms, search and trending.

Read profiles and every list on them, posts with their comments and captions, and what TikTok shows by hashtag, sound, search and trend.

Quick Reference

PropertyValue
Endpoints22
Accounts byhandle, url or secUid
Posts byurl, id or a share link
Posts a page30
Comments a page50, with replies
Transcripts10 credits
CountsExact

Accounts

EndpointReturnsCredits
profileA profile with its exact follower and like counts.1
profile/followersAn account's followers, newest first, 30 a page.1
profile/followingThe accounts an account follows, when it shows them.1
profile/likedPosts an account liked, when its likes are public.1
profile/playlistsThe playlists an account made.1
profile/postsAn account's posts, newest first, 30 a page.1
profile/repostsOther people's posts an account reposted.1
liveWhether an account is live, and its room.1

Read a Profile

import { SocialAPI } from "@socialapihq/sdk";

const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });

const { data } = await client.tiktok.profile({ handle: "nike" });
Response
{
  "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
    }
  }
}

Every count is exact: followers, following, likes and posts.

After a Rename

An account's ext.secUid stays the same when its handle changes. Pass it as secUid to read the account by it.

Hidden Lists

  • Following returns 403 PRIVATE when the account hides it.
  • Liked posts are an empty list when its likes are private. Its ext.likesPublic says which.
  • A private account's posts and lists return 403 PRIVATE, at no cost.

Live Rooms

Read a room by its account, or by roomId. By its id, the room also says how many entered and when it ended.

Posts

EndpointReturnsCredits
playlist/postsThe posts of a playlist, 30 a page.1
postOne post with its counts, media and sound.1
post/commentsA post's top-level comments, 50 a page.1
post/comment/repliesThe replies to one comment, 50 a page.1
post/relatedPosts TikTok recommends beside one post.1
post/transcriptA post's captions as text with their times.10

Post Fields

  • The text on the video is in ext.screenText.
  • TikTok's guess of the caption's language is in ext.language.
  • The caption tracks are in ext.subtitles.

Comments and Replies

Comments come 50 a page. Read a comment's replies with the post and its id as commentId.

Transcripts

import { SocialAPI } from "@socialapihq/sdk";

const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });

const { data } = await client.tiktok.postTranscript({ url: "https://www.tiktok.com/@nike/video/7711414040114892045" });
Response
{
  "data": {
    "postId": "7711414040114892045",
    "language": "eng-US",
    "source": "ASR",
    "text": "Pole or podium?\nPodium. Podium.\nPole. Podium.\nUh, podium. Podium.\nStart soft. Transition of hard. Hard.\nHard or do it.\nHe knows him more than I do.\nUh, let's go soft.\nGotta be fast. Soft.\nGoing for the win. The win.\nEasy. The win,\nthe win. I mean,\nthe win is the win. But like if you got the fastest lap.\nI'm a stats girl. And you can wave that around and be like,\nwell, I was faster.\nUh. Oh, rain.\nI…",
    "cues": [
      {
        "startSeconds": 0.02,
        "endSeconds": 1.2,
        "text": "Pole or podium?"
      },
      {
        "startSeconds": 1.74,
        "endSeconds": 2.9,
        "text": "Podium. Podium."
      },
      {
        "startSeconds": 2.901,
        "endSeconds": 4.121,
        "text": "Pole. Podium."
      }
    ]
  }
}
  • The captions are TikTok's own, generated or the author's.
  • A post without tracks returns 404, at no cost.
  • A transcript costs 10 credits and is kept 30 days.

Discovery

EndpointReturnsCredits
collection/postsThe posts of a public saved collection, 30 a page.1
hashtagA hashtag with its post and view counts.1
hashtag/postsPosts under a hashtag, 30 a page.1
searchPosts matching a query, 30 a page.1
search/usersAccounts matching a query.1
soundA sound, and how many posts use it.1
sound/postsPosts that use a sound, 30 a page.1
trendingWhat the explore page shows now, by category.5
  • Trending takes the explore page's category, such as comedy or daily-life.
  • Without one, it reads all.
  • Each call outside the cache gives a fresh set of about 30 posts.

Hashtags, Sounds and Playlists

  • A hashtag is named by name (fyp, without #), id or url.
  • A sound, playlist or collection is named by id or url.

Share links work wherever a url does: vm.tiktok.com/…, vt.tiktok.com/… and tiktok.com/t/….

  • Each is followed once and cached for a day.
  • A link to the wrong kind of thing returns 400 INVALID_REQUEST.