GET /tiktok/transcript
Parameters and response fields.
- GET
/api/v1/tiktok/transcriptTranscript for one TikTok video.Credits on success only - GET
/api/v1/tiktok/jobs/{id}Status and result of a speech-to-text job.Charged once, on completion - GET
/api/v1/usageCredits remaining.0 credits
curl -s "https://api.example.com/api/v1/tiktok/transcript?url=TIKTOK_VIDEO_URL" \
-H "Authorization: Bearer $TTA_API_KEY"{
"success": true,
"video_id": "7683891628230315295",
"transcript": "First line. Second line.",
"language_code": "en",
"segments": [ { "start": 3.22, "end": 4.32, "text": "First line." } ]
}Draft notice
Owner check needed: endpoint, parameter, limit and error names here come from the planning spec, not from the live service. Confirm them against the real API before launch.
Overview
One endpoint returns the transcript of one TikTok video. This page lists what you send and what you get back.
- One GET endpoint, four query parameters.
- JSON with segments, or SRT, VTT, TXT.
- Names are illustrative; confirm against the live API.
Request
GET https://api.example.com/api/v1/tiktok/transcript?url=TIKTOK_URL&lang=en&format=json&ai_fallback=true
Authorization: Bearer tta_your_key| Parameter | Required | Meaning |
|---|---|---|
url | Yes | Full TikTok video link, short link (vm., vt., tiktok.com/t/) or the 19-digit video ID. |
lang | No | Two-letter language code. Default en. If that language is not available you get language_unavailable with the languages that are. |
format | No | json (default), srt, vtt or txt. |
ai_fallback | No | Default true: for a video with no caption track, try speech-to-text, which can return 202 and a job. false returns no_transcript instead. |
Parameter names are illustrative and to be confirmed; they follow the planning spec and the owner’s scraper, which also has options for AI duration limits, moments and proxies that are not documented here.
JSON response
{
"success": true,
"video_id": "7000000000000000001",
"transcript": "Okay, three tips for a small garden. ...",
"transcript_source": "captions",
"language_code": "en",
"available_languages": ["eng-US", "spa-ES"],
"segments": [
{ "start": 0.5, "end": 2.4, "text": "Okay, three tips for a small garden." }
],
"credits_charged": 1,
"credits_remaining": 14999
}| Field | Meaning |
|---|---|
transcript | The full text as one string. |
segments | Timed pieces: start, end in seconds, and text. |
transcript_source | captions for a TikTok caption track. A speech-to-text result carries a different value (the mock uses speech_to_text; real value to be confirmed). |
language_code, available_languages | The language returned, and the tracks TikTok exposes for the video (for example eng-US). |
credits_charged, credits_remaining | Credit bookkeeping (to be confirmed). |
The owner’s scraper also returns post details (author, counts, hashtags, timestamps). Whether the public API passes them through is to be confirmed, so they are not documented here.
Other formats
srt, vtt and txt return plain text with Content-Type: text/plain. See formats.
When speech-to-text is needed
A video without captions may return HTTP 202 and a job. Poll it as described in async jobs.
Run against the local mock in tools/mock-api, which follows the assumed contract on these pages. It is not the real API, and the output is captured from that mock.
Ready to call it from your code?
Get API key