TikTok Transcript API — Captions and Timings by Video

Get a video’s transcript

The transcript TikTok publishes for a video, by id or URL: full text plus timed segments, and usually an English translation beside a non-English original. About two thirds of videos have one; a video without one is a normal 200 with available false, not an error.

POST /video-transcript Videos
https://api.fetchlayer.dev/tiktok/video-transcript
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

video string required

A video URL or a numeric video id. Shortened share links are rejected — resolve them first.

format string optional

json or markdown, lowercase; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON. (default: json)

timeoutMs integer optional

Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. Left out, the request runs as long as it needs.

Response Fields

video-transcript

Get a video’s transcript

transport string

The data source: always the platform id, "tiktok".

notes string[]

Caveats you can act on — a private account, comments turned off, a list that ran out early, paging that has gone as deep as it goes. Empty when there are none. An empty result always comes with a note explaining it, never as an unexplained empty array.

pagesFetched number

Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed.

videoId string

The video the transcript belongs to.

videoUrl string

Canonical link to the video.

transcript.available boolean

Whether TikTok publishes a transcript for this video: 68% of 185 videos measured across 14 languages had one, and a photo carousel or a video with no speech never does. False is a normal 200, billed as 1 credit like any other, with tracks empty and the note "No transcript is published for this video. TikTok transcribes spoken audio for most videos but not all, and never for a video with no speech." Do not retry it.

transcript.originalLanguage string

BCP-47 tag for the language spoken in the video, or null when there is no transcript. Conventionally cased: language lowercase, script Titlecase, region UPPERCASE.

transcript.durationSeconds number

Length of the video in seconds. Filled in even when available is false.

transcript.tracks object[]

One entry per track, the spoken language first. Empty when no transcript is published. A non-English video usually carries an English track alongside its original at no extra cost: a Spanish video comes back as es-ES plus en-US, with the same timings.

transcript.tracks[].language string

BCP-47 tag for this track, e.g. en-US or es-ES, conventionally cased (TikTok’s eng-US arrives as en-US). Compare case-insensitively anyway.

transcript.tracks[].isOriginalLanguage boolean

True on the track in the language actually spoken in the video. The translation alongside it is false.

transcript.tracks[].isAutoGenerated boolean

True when TikTok generated the captions rather than the account supplying them.

transcript.tracks[].source string

Always "captions": the transcript TikTok publishes.

transcript.tracks[].text string

The whole track, one caption line per newline.

transcript.tracks[].segments object[]

Time-coded lines, each with start, end and text, in seconds from the start of the video. null rather than absent when a track carries no timings.

Request

curl -X POST "https://api.fetchlayer.dev/tiktok/video-transcript" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"video":"7685115221458930957"}'

Response

{
  "transport": "tiktok",
  "notes": [],
  "pagesFetched": 1,
  "videoId": "7685115221458930957",
  "videoUrl": "https://www.tiktok.com/@_/video/7685115221458930957",
  "transcript": {
    "available": true,
    "originalLanguage": "en-US",
    "durationSeconds": 82,
    "tracks": [
      {
        "language": "en-US",
        "isOriginalLanguage": true,
        "isAutoGenerated": false,
        "source": "captions",
        "text": "NASA's future depends on the people,\nmissions, and the networks that connect them.\nThis week had all three. Here's what's new in your NASA minute.\n…",
        "segments": [
          {
            "start": 0.3,
            "end": 2.14,
            "text": "NASA's future depends on the people,"
          },
          {
            "start": 2.141,
            "end": 4.22,
            "text": "missions, and the networks that connect them."
          },
          {
            "start": 4.221,
            "end": 7.88,
            "text": "This week had all three. Here's what's new in your NASA minute."
          }
        ]
      }
    ]
  }
}
Product overviewTikTok API: what it returns, pricing and use cases