TikTok Video Transcript (native captions) API
Returns the caption track TikTok published for one video, as a WebVTT text with timestamps. It needs a TikTok video or photo post URL. If the video has no caption track, the call succeeds and returns found: false.
Use cases
- Pull the spoken words from a news clip to quote or search them.
- Index captions from many videos to find which ones mention a brand, product or topic.
- Read the caption
language to sort videos by spoken language before further analysis.
- Feed the caption text into a summary or sentiment pipeline without downloading the video.
Request
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/video-transcript" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.tiktok.com/@washingtonpost/video/7609177768793787679"}'
The result is returned in outputs[0].data.
Parameters
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"id": "7609177768793787679",
"language": "en",
"transcript": "WEBVTT\n\n\n00:00:00.020 --> 00:00:01.540\nYour tariffs are illegal. They're not.\n\n0โฆ",
"url": "https://www.tiktok.com/@washingtonpost/video/7609177768793787679"
},
"found": true
}
Response fields
Notes
- Pass a full video URL such as
https://www.tiktok.com/@<user>/video/<id>, a /photo/<id> URL, or a vm.tiktok.com, vt.tiktok.com or tiktok.com/t/ share link. Profile links and video file links are refused as invalid input.
- Set
requireFields to ["language"] to make sure the serving source returns data.language. This can change the price of the call.
- The text is TikTok's own transcription, so names and uncommon words can be wrong. If the track is missing or must be accurate, use the full transcription API
tiktok.video_transcript_full.
Pricing
Billed at the actual cost of each call, about $0.0011 for the request above. Failed calls are not charged.