Skip to Content

TikTok API

22 endpoints for profiles, posts and transcripts.

Every TikTok endpoint, by group. Each is a GET under /v1/tiktok.

Quick Reference

PropertyValue
Base path/v1/tiktok
Endpoints22
CreditsSee Below
GuideTikTok

Accounts

Posts

Discovery

Example 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" });
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
    }
  }
}

Errors

A call that fails costs nothing. See Errors for every code.