Skip to Content

Post Transcript

A post's captions as text with their times.

GET
/v1/tiktok/post/transcript

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: Authorization: Bearer sapi_….

Query Parameters

url?string

The post's link.

id?string

The post's id, instead of url.

language?string

A language to prefer, such as en or tr; the first available otherwise.

maxAge?integer

How old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.

Formatint64
Range0 <= value

Response Body

The answer.

application/json
  1. response

One item, as every single-item endpoint answers: { "data": … }.

data*

A TikTok post's captions as text.

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