Post Transcript
A post's captions as text with their times.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
url?stringThe post's link.
id?stringThe post's id, instead of url.
language?stringA language to prefer, such as en or tr; the first available otherwise.
maxAge?integerHow old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.
Format
int64Range
0 <= valueThe answer.
application/json- response
One item, as every single-item endpoint answers: { "data": … }.
data*A TikTok post's captions as text.
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." } ] }}