How to Get the Transcript of a TikTok Video
Get the transcript of a TikTok video from its captions as text, timed JSON, SRT or VTT: short links, languages, videos without captions, and code to automate.
To get the transcript of a TikTok video, you read the captions TikTok already stores for it: the auto-captions TikTok generates for most spoken videos, the captions a creator uploaded, or a translation of one of them. With an API this is one request: send the video ID, get back plain text, timed JSON, SRT or WebVTT. This guide shows how to do it from the command line, Python and JavaScript, and how to handle the cases that trip people up: short links, missing captions and languages.
Where a TikTok transcript comes from
TikTok does not publish a transcript page the way YouTube does. What it has are caption tracks attached to a video, the same ones you see when you turn captions on in the app. There are three kinds:
- Auto-captions: TikTok's own speech recognition. Most videos with clear speech in a supported language get them. In the API they have
source: "asr". - Creator captions: text the creator typed or edited in the TikTok editor before posting.
- Translations: machine translations of a track into other languages, with
source: "translation".
Two consequences follow. First, a transcript is only as good as the captions: auto-captions miss names, slang and lyrics, exactly as they do in the app. Second, a video with no captions at all (music only, no speech, or a creator who turned captions off) has no transcript to read. FetchTranscript does not run its own speech-to-text on TikTok videos, so for those videos you get a clear "not found" answer instead of a guess, and you are not billed for it.
Get a transcript in one request
The endpoint is GET /v1/tiktok/videos/{video_id}/transcript. The video ID is the long number after /video/ in a TikTok URL: for https://www.tiktok.com/@scout2015/video/6718335390845095173 it is 6718335390845095173. You need an API key, which you can create for free after you sign up; the first 100 calls every month are free.
curl -H "X-API-Key: yt_your_api_key" \
"https://api.fetchtranscript.com/v1/tiktok/videos/6718335390845095173/transcript?format=json"The JSON answer holds the full text and the timed segments:
{
"video_id": "6718335390845095173",
"language": "en",
"source": "asr",
"text": "so today I want to show you how I make cold brew at home ...",
"segments": [
{ "text": "so today I want to show you", "start": 0.12, "duration": 1.84 },
{ "text": "how I make cold brew at home", "start": 1.96, "duration": 2.1 }
],
"available_languages": [
{ "language": "en", "source": "asr" },
{ "language": "es", "source": "translation" }
]
}start and duration are in seconds. available_languages lists every caption track the video has, which is useful when you want a different language on the next call. The response above is illustrative: the text depends on the video.
Pick the format you need
The format parameter changes what goes into text:
| format | What you get | Typical use |
|---|---|---|
json (default) | text plus segments with timings | Analysis, search, clipping by timestamp |
text | Plain text only, segments is null | Summaries, LLM prompts, notes |
srt | An SRT subtitle file in text | Video editors, re-uploading with subtitles |
vtt | A WebVTT file in text | HTML5 video players |
Every format costs the same: 1 credit per successful call. If you only need the words for an LLM prompt, format=text keeps the payload small.
Python example
The request is a plain HTTP GET, so requests is enough. This function returns the plain text, or None when the video has no captions:
import requests
API = "https://api.fetchtranscript.com/v1"
HEADERS = {"X-API-Key": "yt_your_api_key"}
def tiktok_transcript(video_id: str, lang: str | None = None) -> str | None:
params = {"format": "text"}
if lang:
params["lang"] = lang
r = requests.get(f"{API}/tiktok/videos/{video_id}/transcript", headers=HEADERS, params=params, timeout=60)
if r.status_code == 404:
detail = r.json()["detail"]
if detail["error"] == "transcript_not_found":
return None # no captions on this video: not billed
raise RuntimeError(detail["message"])
r.raise_for_status()
return r.json()["text"]
print(tiktok_transcript("6718335390845095173"))If you prefer the official SDK (pip install fetchtranscript), client.tiktok.transcript() takes an ID or a full video URL and returns the same dictionary:
from fetchtranscript import FetchTranscriptClient
client = FetchTranscriptClient(api_key="yt_your_api_key")
result = client.tiktok.transcript("https://www.tiktok.com/@scout2015/video/6718335390845095173", format="srt")
print(result["text"])JavaScript example
In Node 18 or later, fetch is built in:
// Node 18+ as an ES module (a .mjs file, or "type": "module"), for the top-level await
const API = 'https://api.fetchtranscript.com/v1';
const headers = { 'X-API-Key': 'yt_your_api_key' };
async function tiktokTranscript(videoId, format = 'json') {
const res = await fetch(`${API}/tiktok/videos/${videoId}/transcript?format=${format}`, { headers });
const body = await res.json();
if (!res.ok) throw new Error(`${body.detail.error}: ${body.detail.message}`);
return body;
}
const t = await tiktokTranscript('6718335390845095173');
for (const s of t.segments) console.log(s.start.toFixed(1), s.text);Short links and other URL shapes
People rarely paste a clean ID. Links shared from the app look like https://vm.tiktok.com/ZMabc123/ or https://vt.tiktok.com/..., and they only redirect to the real video. The GET /v1/tiktok/resolve endpoint follows them for you and tells you what the link points to:
curl -G -H "X-API-Key: yt_your_api_key" \
--data-urlencode "url=https://vm.tiktok.com/ZMabc123/" \
"https://api.fetchtranscript.com/v1/tiktok/resolve"The answer has a type (video or user), the video_id or username, and the canonical url. A URL that is not TikTok's answers 400 invalid_parameter; a link that leads nowhere answers 404 not_found. Resolving is a call of its own (1 credit), so if your input is already a full /video/ URL, extract the number yourself and skip it. In Python the SDK does the same with client.tiktok.resolve(url).
Languages
Without lang, you get the video's original captions. To ask for another track, pass its code, for example lang=es or a regional code like lang=en-US. If the video does not have that language, the API answers 404 language_not_found, and the error's detail.available_languages lists what it does have, so you can retry with a valid code without an extra lookup:
r = requests.get(f"{API}/tiktok/videos/{video_id}/transcript", headers=HEADERS, params={"lang": "de"}, timeout=60)
if r.status_code == 404 and r.json()["detail"]["error"] == "language_not_found":
options = r.json()["detail"]["available_languages"]
print("Available:", [o["language"] for o in options])Translations are machine output: fine for search and classification, not for quoting someone.
Check captions before you spend a call
When you process many videos, for example every video of a creator, it pays to know which ones have captions first. GET /v1/tiktok/videos/{video_id} returns the video's metadata (description, hashtags, author, music, views, likes) together with has_captions and caption_languages. And the videos listed by GET /v1/tiktok/users/{username}/videos each carry has_captions too, so one page of a profile tells you which of its videos are worth a transcript call. The TikTok API page covers those endpoints in detail.
Errors and limits worth handling
Failed calls never cost credits, so the main job of your error handling is to decide whether to retry:
- 404
transcript_not_found,language_not_found,video_not_found,video_private: do not retry, record the reason. - 429
rate_limit_exceeded: more than 500 requests per minute. Wait the seconds in theRetry-Afterheader. - 503
source_blocked: TikTok is refusing requests for the moment. It also carriesRetry-After; back off and try again later.
Every successful answer carries X-Credits-Used and X-Credits-Remaining headers, so a batch job can stop cleanly before the balance runs out. The full list is on the errors page.
What you can build with TikTok transcripts
- Content research: search what creators in a niche actually say, not just their hashtags.
- Repurposing: turn a creator's videos into blog drafts, newsletters or subtitles in another language.
- Brand monitoring: find spoken mentions of a product that never appear in the caption text.
- Datasets for LLMs: short, timestamped spoken text is ideal for classification and retrieval. The same chunking ideas from our guide on YouTube transcripts for RAG apply.
If you work with both platforms, the same API key also reads YouTube: see how to get a YouTube transcript with Python or the TikTok Transcript API page for a summary of the TikTok side.
Frequently asked questions
Can I get a transcript of a TikTok video without captions?
Not from FetchTranscript: the API reads TikTok's own caption tracks and does not run speech-to-text. A video without captions answers 404 transcript_not_found and is not billed, so you can send it to a speech-to-text service of your choice instead.
How accurate are TikTok auto-captions?
They are the same captions you see in the app, produced by TikTok's speech recognition (source: "asr"). They are usually good for clear speech and weaker on names, slang, accents and music; creator-edited captions are more reliable.
Does it work with vm.tiktok.com short links?
Yes. Send the short link to GET /v1/tiktok/resolve, which returns the video_id, then request the transcript with that ID.
How much does a TikTok transcript cost?
One credit per successful call, whatever the format. The first 100 calls each month are free, then it is $1 per 1,000 calls; see pricing.
Can I download TikTok subtitles as SRT?
Yes: add format=srt (or format=vtt for WebVTT) and the subtitle file comes back in the text field, with the same timings as the JSON segments.
Do I need a TikTok account or login?
No. The API reads public videos only, with no TikTok login; private videos answer 404 video_private.
Try it on your own videos
100 free calls every month, no credit card. Then $1 per 1,000 calls, only for the calls that succeed.
Related guides
- How to Get a YouTube Transcript with Python
Fetch the transcript of any YouTube video in Python: timestamps, plain text and SRT, languages, errors and batches, with requests or the official SDK.
- How to Download YouTube Subtitles as SRT or VTT
Download the subtitles of a YouTube video as SRT, VTT or text, pick the language, tell manual captions from auto-generated ones, and batch it with code.
- YouTube Transcripts for RAG: Chunking and Embeddings
Turn YouTube videos into a searchable knowledge base: timestamped transcript chunks, chunk size and overlap, embeddings and citations to the exact second.