Video Transcript
GET/v1/tiktok/video/transcript1 credit
Returns the transcript of a TikTok video as WebVTT from its captions, or as plain text from AI speech-to-text when you allow the fallback.
01Query parameters
| Name | Type | Description |
|---|---|---|
| urlrequired | string | The video's URL (`tiktok.com/@user/video/<id>` or a short share link). |
| languageoptional | string | Two-letter language code (e.g. `en`) of the captions to return. Without it, the auto-generated captions are preferred, else the first available. |
| use_ai_as_fallbackoptional | boolean | When the video has no captions, transcribe its audio with AI speech-to-text.Default: false |
| allow_long_transcriptionoptional | boolean | Allow the AI fallback on videos longer than 120 seconds, at 10 credits per started minute.Default: false |
02Pricing
1 credit when captions are returned. No captions and no AI fallback: 0 credits. AI fallback: 1 credit for videos up to 120 seconds; longer videos need `allow_long_transcription=true` and cost 10 credits per started minute. An AI run that finds no speech costs 0.
03Request
curl "https://api.scrapesocial.ai/v1/tiktok/video/transcript?url=https%3A%2F%2Fwww.tiktok.com%2F%40tiktok%2Fvideo%2F7683195368279985438" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
04Responses
Real answers from the API. Lists are shortened to 2 items.
GET /v1/tiktok/video/transcript?url=https%3A%2F%2Fwww.tiktok.com%2F%40tiktok%2Fvideo%2F7683195368279985438
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"id": "7683195368279985438",
"url": "https://www.tiktok.com/@tiktok/video/7683195368279985438",
"transcript": "WEBVTT\n\n\n00:00:00.100 --> 00:00:00.820\nWait,\n\n00:00:00.821 --> 00:00:06.501\nthere's basically an entire hard techno rave hiding inside TikTok Live?\n\n00:00:06.502 --> 00:00:08.621\nHi, my name is Palina LA Diva.\n\n00:00:08.622 --> 00:00:12.021\nI'm a hard techno music producer and DJ.\n\n00:00:12.022 --> 00:00:15.661\nYou might have seen me playing eggs in Tokyo\n\n00:00:15.662 --> 00:00:17.201\nall the way…"
}Common to every endpoint
Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.
GET /v1/cosmos/profile?handle=design
{
"success": false,
"message": "Invalid API key"
}05Notes
The answer is `id`, `url` and `transcript`: a WebVTT string from captions, plain text from the AI fallback, or null when there is nothing. A video longer than 120 seconds without `allow_long_transcription=true` gets a free 400 when the AI fallback is needed. Photo posts have no audio to transcribe (404). An unknown video is a free 404.
06Errors & credits
Every error has success: false, a real HTTP status and costs no credits.
400missing_parameter
A required parameter is missing or invalid.
403private_account
The account is private or age-restricted.
404not_found
No such account.
503upstream_error
The platform did not answer; retry shortly.