TEST SITE: not indexed, not the live website. Placeholder button URLs in use: signup, login, dashboard, playground, api_base.
Docs menu

GET /tiktok/transcript

Parameters and response fields.

  • 2 min read
  • Last verified
Request
curl -s "https://api.example.com/api/v1/tiktok/transcript?url=TIKTOK_VIDEO_URL" \
  -H "Authorization: Bearer $TTA_API_KEY"
Response (illustrative values)
{
  "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

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
ParameterRequiredMeaning
urlYesFull TikTok video link, short link (vm., vt., tiktok.com/t/) or the 19-digit video ID.
langNoTwo-letter language code. Default en. If that language is not available you get language_unavailable with the languages that are.
formatNojson (default), srt, vtt or txt.
ai_fallbackNoDefault 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

200 response, shortened (illustrative values)
{
  "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
}
FieldMeaning
transcriptThe full text as one string.
segmentsTimed pieces: start, end in seconds, and text.
transcript_sourcecaptions 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_languagesThe language returned, and the tracks TikTok exposes for the video (for example eng-US).
credits_charged, credits_remainingCredit 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
Get API keyDocs