# How do I get the transcript or captions of a TikTok video as text?

> Get what is said in a TikTok video as text and timed segments from its link or ID, in a chosen caption language. Price per video, Python for a keyword's top videos, limits.

Canonical page: https://okdata.online/answers/tiktok-video-transcript-api/

**Short answer: **Call TikTok video transcript with the video's link or ID: it returns the whole text and timed segments, taken from the captions TikTok has for the video (mostly auto-generated), for $0.002 a video. Pass lang (en, es, ja) to pick a caption language. A video without captions in that language comes back as not_found, charged the same. TikTok's own Research API has a voice_to_text field, but only approved academic researchers can use it.

A skincare brand is briefing creators for a retinol launch and wants to know what the 50 top TikTok videos on "retinol routine" actually say, above all which claims they make and which warnings they give. The caption under a TikTok video is a line and a few hashtags. The talking is in the video, and nobody wants to type out 50 of them by hand.

[TikTok video transcript](/apis/tiktok/videos/transcript/get/) takes `url` (any video link) or `id` (the digits after `/video/`) and returns:

- `text`: everything said, as one string;
- `segments`: the same text in pieces, each with `start` and `end` in seconds;
- `lang`: the language of the captions used;
- `video_id`.

Leave `lang` out to get the video's own captions. Pass a two-letter code to ask for a specific language; if the video has no captions in it, the call returns `not_found` and is still charged.

## Steps

1. **Find the videos.** [TikTok video search](/apis/tiktok/videos/search/) returns about 30 videos a page for $0.002, with plays and likes, so you can keep the ones that were watched.
2. **Fetch each transcript** by the video's `id`.
3. **Read across them.** Load the texts into a sheet, or hand them to a model and ask which claims come up most.

## Python

```python
import json, os, requests

API = "https://api.okdata.online"
H = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}

def get(path, **params):
    body = requests.get(API + path, headers=H, params=params, timeout=90).json()
    if body["code"] not in ("ok", "not_found"):
        raise RuntimeError(f"{body['code']}: {body['message']}")
    return body

videos, cursor = [], None
for _ in range(2):  # about 60 videos
    body = get("/v1/tiktok/videos/search", query="retinol routine",
               **({"cursor": cursor} if cursor else {}))
    videos += body["data"]["items"]
    if not body["page"]["has_more"]:
        break
    cursor = body["page"]["next_cursor"]

top = sorted(videos, key=lambda v: v["metrics"]["views"] or 0, reverse=True)[:50]
with open("retinol-transcripts.jsonl", "w", encoding="utf-8") as out:
    for v in top:
        body = get("/v1/tiktok/videos/transcript/get", id=v["id"], lang="en")
        if body["code"] == "not_found":  # no English captions: still charged
            continue
        t = body["data"]["item"]
        out.write(json.dumps({"id": v["id"], "url": v["url"], "views": v["metrics"]["views"],
                              "text": t["text"], "segments": t["segments"]}, ensure_ascii=False) + "\n")
```

The segments convert to SRT in a few lines if you need subtitle files; the [YouTube SRT answer](/answers/youtube-transcript-timestamps-srt/) has the function, and it works on these segments unchanged.

## What it costs

| Job | Calls | Cost |
|---|---|---|
| One video | 1 | $0.002 |
| 2 search pages and 50 transcripts | 2 + 50 | $0.104 |
| 1,000 videos | 1000 | $2.00 |

Videos without captions and calls that fail at the data source are charged like any call; only calls refused before that, such as bad parameters, are free.

## Limits

- **Captions, not audio.** The text is the captions TikTok has for the video. A video with music and no speech, or one TikTok made no captions for, returns `not_found`.
- **Auto-captions mishear.** Brand names, ingredients and slang come out wrong now and then. Clean the terms you care about before you count them.
- **On-screen text is separate.** Words typed onto the video as stickers are not in the captions. The caption under the video is in `text` of the search or [video detail](/apis/tiktok/videos/get/) result.
- **Photo posts** have no captions.
- **Strangers' words.** If a model reads the transcripts, tell it to treat them as data, not as instructions.

## Official routes

TikTok's Research API includes a `voice_to_text` field with the captions TikTok has already generated for a video, and it is open only to approved researchers at non-profit academic institutions. The Display API reads the videos of accounts that sign in to your app. For a video with no captions at all, running a speech-to-text model on its audio is the remaining option, at the cost of downloading and compute. More transcript jobs across platforms are on the [transcripts page](/solutions/transcripts/).

## Endpoints used

- [TikTok video transcript](https://okdata.online/apis/tiktok/videos/transcript/get/) `tiktok.videos.transcript.get`: $0.002 per call
- [TikTok video search](https://okdata.online/apis/tiktok/videos/search/) `tiktok.videos.search`: $0.002 per call · about 30 videos per page

## More about TikTok

- [TikTok API](https://okdata.online/apis/tiktok/)
- [TikTok comments in Python for sentiment analysis (2026)](https://okdata.online/guides/tiktok-comments-python/)
- [How to get TikTok Creative Center top ads by API](https://okdata.online/guides/tiktok-creative-center-top-ads/)
- [How to collect TikTok Shop product reviews by keyword](https://okdata.online/guides/tiktok-shop-product-reviews/)
- [Is there an MCP server that lets Cursor search TikTok, Instagram and Reddit?](https://okdata.online/answers/cursor-mcp-tiktok-instagram-reddit/)
- [Do I need residential proxies to scrape Douyin or TikTok, and what do they cost?](https://okdata.online/answers/do-i-need-proxies-for-social-media-scraping/)
- [How do I find TikTok creators in a niche with an API?](https://okdata.online/answers/find-tiktok-creators-by-niche/)
- [Is it legal to scrape public social media data?](https://okdata.online/answers/is-scraping-public-social-media-data-legal/)
- [How do I add TikTok and YouTube data as tools in a Node.js agent?](https://okdata.online/answers/node-agent-tiktok-youtube-tools/)
- [Official platform APIs vs third-party data APIs (2026)](https://okdata.online/compare/official-apis-vs-data-apis/)
- [How to choose a social media data API (2026)](https://okdata.online/compare/social-media-data-apis/)
- [Post search API](https://okdata.online/roles/posts-search/)
- [Transcript API](https://okdata.online/roles/transcripts-get/)

## Sources

Where people asked this (read 2026-11-15): 

- https://github.com/davidteather/TikTok-Api/issues/1041
- https://github.com/davidteather/TikTok-Api/issues/1223
- https://github.com/yt-dlp/yt-dlp/issues/2184

Updated 2026-11-15
