Tutorial · TikTok · cURL, Python, Node.js, PHP, Go, Ruby

Get a TikTok video transcript with the API

Transcript of a TikTok video from its auto-captions. Complete code for GET /v1/tiktok/posts/{post}/transcript in six languages and both official SDKs, each tested against the documented response.

Short answer. GET /v1/tiktok/posts/{post}/transcript returns a video's transcript from its captions: the full text, timed segments in seconds and the caption languages available. A video without captions answers available: false and is still billed.

Facts checked 2 December 2026. Prices change: follow the links before you decide.

Why call it

  • AI agents and LLM apps: summarise, tag or search TikTok videos as text.
  • Clipping platforms: find the moment a phrase is said from each segment's start and end.
  • Social listening: catch brand mentions spoken in a video, not only in its caption text or comments.

The request

GET https://api.handlehaul.com/v1/tiktok/posts/{post}/transcript with your key in the X-Api-Key header. Transcript of a TikTok video from its auto-captions. Transcript of a TikTok video from its auto-captions. 1 credit. Docs: https://api.handlehaul.com/docs/tiktok-transcript-api

Parameters for Transcript of a TikTok video from its auto-captions
ParameterInDescription
post requiredpathTikTok post id, or a tiktok.com/@user/video/<id> URL (URL-encoded).
langqueryCaption language code, e.g. en (default: the video's original language).
freshquerytrue skips the cache (full price).

Code in 6 languages

Each sample is a complete program: it reads the key from HANDLEHAUL_API_KEY, waits and retries when the API answers 429 (using Retry-After), stops with the error code on anything else. The SDK versions do the retries for you.

tiktok-transcript.sh

# Transcript of a TikTok video from its auto-captions. --retry waits out a 429 using its Retry-After header;
# --fail exits with code 22 on any other error (drop it to read the error JSON).
curl -sS --fail --retry 3 -G "https://api.handlehaul.com/v1/tiktok/posts/7300000000000000123/transcript" \
  -H "X-Api-Key: $HANDLEHAUL_API_KEY" \
  --data-urlencode "lang=en"
Generated from the OpenAPI spec (2026-12-02); every sample was syntax-checked and run against a local mock serving the response below. Language guides: Python, Node.js, PHP, Go, Ruby, cURL.

Response

One object in data and meta with what the call cost. Example values, from the API docs. Lists are cut to two rows here.

200 · application/json
{
  "data": {
    "video_id": "7300000000000000123",
    "available": true,
    "language": "en",
    "languages": [
      "en"
    ],
    "is_auto_generated": true,
    "text": "Hi, this is a sample caption. Post 0123 talks about coffee. Thanks for watching!",
    "segments": [
      {
        "start": 0,
        "end": 1.58,
        "text": "Hi, this is a sample caption."
      },
      {
        "start": 1.581,
        "end": 3.421,
        "text": "Post 0123 talks about coffee."
      },
      {
        "start": 3.422,
        "end": 5,
        "text": "Thanks for watching!"
      }
    ]
  },
  "meta": {
    "request_id": "req_…",
    "cached": false,
    "cache_age_seconds": 0,
    "credits_charged": 1,
    "credits_remaining": 26943
  }
}

Cost, cache and limits

  • 1 credit per call. At $1.40 to $0.80 per 1,000 calls. Cache hits, failed calls and 429 answers are free; meta.credits_charged says what each call cost.
  • Cache. Identical calls that arrive while an answer is cached are served from it. Add fresh=true to force a live call (billed).
  • Speed. Over your plan's requests-per-second limit the API answers 429 rate_limited with Retry-After; the samples wait that long and retry.
  • Private accounts. Public data only: a private account answers 403 private_account, and that call is free.
  • Testing. A kd_test_ key returns sample data in this exact shape at no cost, so you can run the code before you spend anything.

Things to know

  • A video without captions still costs 1 credit and answers available: false. Check has_captions on the post first to skip those calls.
  • lang asks for one caption language (default: the video's original language). If it is missing, available is false and languages lists what exists.
  • Photo posts and videos without speech usually have no captions. Most captions are auto-generated by TikTok: see is_auto_generated.
  • A no-caption answer is cached 1 hour instead of 24, since TikTok can add captions shortly after upload.

Same answer, other routes

These routes return the same object as GET /v1/tiktok/posts/{post}/transcript, so they share this page. Pick the one that matches the input you have.

Alias routes
RouteUse it whenSDK
GET /v1/tiktok/post/transcriptTranscript of a TikTok video, by url or id in the querytiktok.transcriptByUrl() (Node), tiktok.transcript_by_url() (Python)
Alias routes
curl -sS --fail --retry 3 -G "https://api.handlehaul.com/v1/tiktok/post/transcript" \
  -H "X-Api-Key: $HANDLEHAUL_API_KEY" \
  --data-urlencode "url=https://www.tiktok.com/@river_wren29/video/7300000000000000123"

Next steps

TikTok transcript API: questions

Can I get a TikTok transcript from the video link?
Yes. Use the alias GET /v1/tiktok/post/transcript?url=<the TikTok link> (or ?id=). It returns the same answer as the path route.
Is the TikTok transcript API speech recognition?
No. It reads the captions TikTok publishes for the video. When TikTok has none, available is false.

Run it on real data

One key for Instagram and TikTok. $1.40 to $0.80 per 1,000 calls; failed calls and cache hits are free.

Want to test first? Sandbox keys are free and unlimited, with sample data in the live schema.