TikTok Transcript API: Extract Captions from Any Video
Need the text from a TikTok video? Whether you're repurposing content, doing research, or building an app—getting TikTok transcripts manually is tedious.
A TikTok transcript API extracts the spoken words from any video automatically. Here's how it works and why it's useful.
What is a TikTok Transcript?
A TikTok transcript is the text version of everything said in a video. It includes:
- Spoken words - What the creator says
- Auto-captions - TikTok's automatic subtitles
- Timestamps - When each word/phrase appears
- Language detection - What language is spoken
Think of it as turning a video into a document you can read, search, and analyze.
Why Extract TikTok Transcripts?
Content Repurposing
Turn viral TikToks into blog posts, tweets, or LinkedIn content. Extract the transcript, clean it up, and you have a content outline.
Research & Analysis
Analyze what top creators are saying. Find common phrases, topics, and hooks that perform well.
Accessibility
Create captions for videos that don't have them. Make content accessible to deaf/hard-of-hearing viewers.
SEO & Discovery
Video text isn't searchable—but transcripts are. Use transcripts to understand what content ranks for certain topics.
AI & Automation
Feed transcripts into AI tools for summarization, translation, or content generation.
How to Get TikTok Transcripts
Option 1: Manual (Slow)
- Open the TikTok video
- Turn on captions (if available)
- Pause and type out each line
- Repeat for every video
Time required: 5-10 minutes per video
Option 2: TikTok Transcript API (Fast)
Make one API call, get the full transcript:
const response = await fetch(
'https://api.sociavault.com/v1/scrape/tiktok/transcript?url=https://tiktok.com/@user/video/123',
{ headers: { 'x-api-key': 'YOUR_API_KEY' } }
);
const data = await response.json();
console.log(data.data.transcript);
Time required: 2-3 seconds
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | TikTok video URL |
language | string | No | 2-letter language code (en, es, fr, de, it, ja, ko, zh) |
use_ai_as_fallback | boolean | No | Use AI fallback if transcript not found (adds 10 credits to base cost) |
Credit Cost: 1 credit (or 10 credits with AI fallback enabled)
What You Get Back
The transcript is returned in WEBVTT format — a standard subtitle format with timestamps:
{
"success": true,
"data": {
"id": "7499229683859426602",
"url": "https://www.tiktok.com/@stoolpresidente/video/7499229683859426602",
"transcript": "WEBVTT\n\n\n00:00:00.120 --> 00:00:01.840\nAlright, pizza review time.\n\n00:00:01.841 --> 00:00:03.761\nSal's Pizza Factory. Oh,\n\n00:00:03.762 --> 00:00:05.721\nit's Fucking Corn. We're in Charlotte.\n\n..."
},
"credits_used": 1,
"endpoint": "tiktok/transcript"
}
Use Cases
1. Turn TikToks into Blog Posts
async function tiktokToBlog(videoUrl) {
const res = await fetch(`https://api.sociavault.com/v1/scrape/tiktok/transcript?url=${encodeURIComponent(videoUrl)}`, {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const { data } = await res.json();
// Extract plain text from WEBVTT
const plainText = data.transcript
.split('\n')
.filter(line => !line.match(/^(WEBVTT|\d{2}:\d{2}|\s*$)/))
.join(' ');
return {
videoId: data.id,
videoUrl: data.url,
content: plainText
};
}
2. Find Viral Hooks
Analyze the first 3 seconds of top-performing videos:
function parseWebVTT(vtt) {
const segments = [];
const lines = vtt.split('\n');
for (let i = 0; i < lines.length; i++) {
const match = lines[i].match(/(\d{2}:\d{2}:\d{2}\.\d{3}) --> (\d{2}:\d{2}:\d{2}\.\d{3})/);
if (match && lines[i + 1]) {
const toSeconds = t => t.split(':').reduce((s, v, j) => s + parseFloat(v) * [3600, 60, 1][j], 0);
segments.push({ start: toSeconds(match[1]), end: toSeconds(match[2]), text: lines[i + 1] });
}
}
return segments;
}
async function analyzeHooks(videoUrls) {
const hooks = [];
for (const url of videoUrls) {
const res = await fetch(`https://api.sociavault.com/v1/scrape/tiktok/transcript?url=${encodeURIComponent(url)}`, {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const { data } = await res.json();
const segments = parseWebVTT(data.transcript);
// Get text from first 3 seconds
const hook = segments.filter(s => s.start < 3).map(s => s.text).join(' ');
hooks.push(hook);
}
return hooks;
}
3. Create Subtitles for Other Platforms
The transcript is already in WEBVTT format, which is supported by most video platforms. To convert to SRT:
function webvttToSRT(vtt) {
const segments = parseWebVTT(vtt);
return segments.map((seg, i) => {
const fmt = t => {
const h = Math.floor(t / 3600).toString().padStart(2, '0');
const m = Math.floor((t % 3600) / 60).toString().padStart(2, '0');
const s = (t % 60).toFixed(3).padStart(6, '0').replace('.', ',');
return `${h}:${m}:${s}`;
};
return `${i + 1}\n${fmt(seg.start)} --> ${fmt(seg.end)}\n${seg.text}\n`;
}).join('\n');
}
### 4. Search Within Videos
Build a searchable database of video content:
```javascript
async function buildSearchIndex(videoUrls) {
const index = [];
for (const url of videoUrls) {
const res = await fetch(`https://api.sociavault.com/v1/scrape/tiktok/transcript?url=${encodeURIComponent(url)}`, {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const { data } = await res.json();
// Extract plain text from WEBVTT
const plainText = data.transcript
.split('\n')
.filter(line => !line.match(/^(WEBVTT|\d{2}:\d{2}|\s*$)/))
.join(' ')
.toLowerCase();
index.push({
videoId: data.id,
url: data.url,
text: plainText
});
}
// Search: index.filter(v => v.text.includes('keyword'))
return index;
}
Python Example
import requests
API_KEY = 'your_api_key'
def get_tiktok_transcript(video_url, language='en', use_ai=False):
response = requests.get(
'https://api.sociavault.com/v1/scrape/tiktok/transcript',
params={
'url': video_url,
'language': language,
'use_ai_as_fallback': str(use_ai).lower()
},
headers={'x-api-key': API_KEY}
)
return response.json()
# Usage
result = get_tiktok_transcript('https://tiktok.com/@user/video/123')
print(result['data']['transcript'])
# With AI fallback (10 credits)
result = get_tiktok_transcript('https://tiktok.com/@user/video/123', use_ai=True)
Limitations
- No audio = no transcript - Videos with only music won't have spoken text
- Accuracy varies - Heavy accents or background noise can affect quality
- Language support - Works best with major languages (English, Spanish, etc.)
Getting Started
- Sign up at sociavault.com
- Get 50 free credits to test
- Copy your API key
- Extract transcripts using the examples above
Frequently Asked Questions
Can I get transcripts from any TikTok video?
Yes, as long as the video is public and contains spoken words. Videos with only music or sound effects won't have meaningful transcripts.
How accurate are TikTok transcripts?
Accuracy is typically 90-95% for clear speech in supported languages. Background music, accents, or poor audio quality can reduce accuracy.
What languages are supported?
Major languages including English, Spanish, French, German, Portuguese, and more. The API detects the language automatically.
Can I get timestamps for each word?
Yes, the API returns segments with start and end timestamps, allowing you to sync text with specific moments in the video.
Is this the same as TikTok's auto-captions?
Similar, but our API works even if the creator didn't enable captions. We process the audio directly.
Related guides:
Found this helpful?
Share it with others who might benefit
Ready to Try SociaVault?
Start extracting social media data with our powerful API. No credit card required.