TikTok transcript API

One authenticated GET request extracts a public TikTok video's existing caption track as JSON — full text, language, and timed segments for your application.

  • One REST Endpoint
  • Structured JSON Output
  • Timed Caption Segments
  • Language Preference
  • Extract Before Transcribing
  • Clear Unavailability Signal

Request examples

curl "https://api.agentbody.io/v1/tiktok/transcript?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ&language=en" \
  -H "Authorization: Bearer <YOUR_AGENTBODY_API_KEY>"

Response examples

Documented responses from the OpenAPI specification.

Existing captions or explicitly requested audio transcription.

{
  "caption_type": "manual",
  "language": "example_value",
  "segments": [],
  "text": "example_value",
  "video_id": "example_value"
}

Features

Use the TikTok Transcript API to extract existing caption tracks from public TikTok videos as structured JSON for research pipelines, content analysis, and video-aware products.

One REST Endpoint

Call GET /v1/tiktok/transcript with a bearer API key and a public TikTok video URL. The TikTok transcript API returns the video's existing caption track through a documented HTTP request, so applications add caption extraction without maintaining a browser-driven scraper or an unofficial client SDK.

Structured JSON Output

Receive caption_type, language, video_id, complete transcript text, and timed segments in a predictable JSON response. This structure fits services that store transcripts, index text, build video-aware search, or pass caption data into an analysis pipeline.

Timed Caption Segments

Each segment includes caption text with timing information. Link a search result, quote, or generated reference back to the exact moment in the original public video instead of treating the TikTok video transcript as an unstructured block of text.

Language Preference

Pass the optional language parameter with a BCP 47 tag such as en or zh to request a preferred caption language. Omit it to accept the source language. The API reads tracks the video publishes — it does not translate or synthesize unavailable languages.

Extract Before Transcribing

The API contract is explicit: try this existing-caption operation before any separately billed audio transcription. Caption extraction is the cheap, honest first step; transcription is a distinct operation you request deliberately, never a silent fallback.

Clear Unavailability Signal

When a public video has no caption track, the API returns 422 rather than inventing text. Treat it as a final availability signal for that URL — select another resource or get explicit approval for a transcription workflow instead of retrying unchanged.

How to use

Follow these six steps to call the TikTok Transcript API, pass a public video URL, and process caption text with timed segments in your application.

01

Create An API Key

Create an AgentBody account and generate an API key in the console. Keep the key in your server environment or an approved secret store and send it as a bearer token. Never place a live key in browser code, public repositories, or client-side bundles.

02

Choose A Public Video

Pick the public TikTok video whose captions you need and copy its full URL. The video must have a published caption track; private videos, deleted videos, and captionless videos return an unavailability signal rather than a transcript.

03

Build The GET Request

Send an authenticated GET request to /v1/tiktok/transcript with the URL query parameter. The generated examples on this page show the request in curl, JavaScript, Python, Java, and Go, so you can adopt the language and HTTP client your service already uses.

04

Select A Language

Add the optional language parameter with a BCP 47 value such as en or zh when you want a preferred caption language. The API returns only tracks the submitted video publishes — it does not create translations or unavailable language tracks.

05

Parse The JSON Response

Read the returned caption_type, language, video_id, complete text, and segments. Preserve segment timing when you need traceable quotes, timestamped search results, or RAG context. Store only the fields your product needs and align retention with your privacy policy.

06

Handle 422 Correctly

A 422 response means the video has no available caption track. Do not retry the unchanged URL — the response is not a temporary failure. Select another public resource, or obtain explicit approval before invoking a separately billed transcription operation for that video.

Frequently asked questions

What is the TikTok Transcript API?

The TikTok Transcript API is an authenticated GET endpoint, /v1/tiktok/transcript, that extracts an existing caption track from a public TikTok video. Send a public video URL and optionally a preferred language; a successful response provides caption metadata, complete text, and timed segments as JSON.

Does the TikTok video transcript API generate captions when none exist?

No. This endpoint extracts caption tracks the video already publishes. When no caption track exists it returns 422 as a final signal. Audio transcription — actually listening to the audio and generating text — is a separately billed operation that must be explicitly requested, never a silent fallback.

How is this different from a TikTok transcript scraper?

A TikTok transcript scraper typically drives a browser session and parses rendered captions. This API is a documented REST endpoint returning stable JSON fields, so there is no browser automation, proxy rotation, or parsing code to maintain. It reads public caption data only.

Can I request a specific caption language?

Yes. Pass the optional language parameter with a BCP 47 tag such as en or zh. The API returns a track the submitted video actually publishes; it does not translate captions or create a language track the source video does not provide.

What does a 422 response mean?

422 means captions are unavailable for that video. It is a final signal, not a transient error — retrying the same URL unchanged will not produce a transcript. Select another public video, or obtain explicit approval to use a separately billed transcription operation instead.

How should I handle other API errors?

Fix 400 responses by correcting the request shape and 401 responses by configuring a valid bearer key. For temporary 502, 503, and 504 failures, retry with backoff. Log the status and error code before retrying so your pipeline can distinguish availability problems (422) from transient upstream issues.