All tutorials

How to scrape TikTok transcripts with Python, Node.js or curl (2026)

A walkthrough for GET /v1/tiktok/videos/transcript, with the same request in curl, Node.js and Python. Copy the snippet, run it, then read the JSON.

GET /v1/tiktok/videos/transcript · 1 credit

You'll pull a TikTok transcript from a public video URL and see the text you get back.

Typical job: a brand monitor that collects TikTok video links and needs what was said in them, for keyword alerts or an AI search index. The video's own captions come back as WebVTT in data.transcript. Set useAiFallback=true to transcribe videos with no captions using AI; that adds 10 credits, and only when AI produced the text.

Get ready

Create a Social Fetch API key, then get curl, Node.js or Python ready. New accounts include 100 free credits.

The API Keys page in the Social Fetch app. The New API key form is labelled: type a name, then click Create key.
Open API Keys, name the key and click Create key. The full key is shown only once, so copy it straight away.
  • API key. Create a Social Fetch account, open API Keys and create a key. New accounts include 100 free credits.

  • curl. Any shell with curl. Set SOCIALFETCH_API_KEY to your key (export SOCIALFETCH_API_KEY=sfk_…) before you run the sample.

  • Node.js. Node 18 or later, which has fetch built in. Save the sample as an .mjs file so top-level await works, and set SOCIALFETCH_API_KEY to your key.

  • Python. Python 3 with requests installed (pip install requests). Set SOCIALFETCH_API_KEY to your key.

When you're done, SOCIALFETCH_API_KEY is set in your shell.

Make the request

Pick curl, Node.js or Python, copy the sample and run it. It calls GET /v1/tiktok/videos/transcript with your key in the x-api-key header, using this example: /v1/tiktok/videos/transcript?url=https%3A%2F%2Fwww.tiktok.com%2F%40mkbhd%2Fvideo%2F7690995691849567501.

Request

Each sample prints the JSON response with data and meta. On an error status, the Python sample stops at raise_for_status() and the Node.js sample throws with the error body, because it checks response.ok first. curl prints the error JSON; add --fail-with-body to make it exit non-zero.

Read the response

The response is JSON with two parts: data holds the transcripts and meta holds creditsCharged and requestId. The sample below is a trimmed copy of a real response; the endpoint page lists every field. Credits are charged on completed lookups, not on failed requests.

The Social Fetch Playground running GET /v1/tiktok/videos/transcript for a public MKBHD video. The url field, the transcript block of the response and the 1 credit charge are labelled.
The same request in the Playground. transcript.format says webvtt, so transcript.content is the caption track with a timestamp on each line.
Request
Sample response

Check data.lookupStatus first when the response has one. Keep meta.requestId in case a row looks wrong.

lookupStatus not_found means there's no transcript, and the base credit is still charged. Photo carousels aren't videos and fail with transcript_target_not_video. The optional language is a preference, not a guarantee.

You finished

The Playground, the docs and your code all call the same endpoint at the same price. Pick a next step below.

Common questions

Do I need an official TikTok developer account?

No. Social Fetch authenticates with your Social Fetch API key. You call GET /v1/tiktok/videos/transcript and we handle the lookup. You still need to follow each platform's terms for how you use public data.

What does the TikTok transcripts endpoint return?

JSON with two parts: data holds the transcripts and meta holds creditsCharged and requestId. The endpoint page and the API docs describe every field.

When should I set useAiFallback on TikTok transcripts?

When you need text from videos that have no caption track. The base cost is 1 credit; the AI charge of 10 more (11 in total) applies only when AI produced the transcript, so captioned videos stay at 1. AI covers videos up to 2 minutes; add allowLongTranscription=true for longer ones, at 10 credits per started minute.

What URL formats does the TikTok transcript route accept?

Public /@user/video/… links and vm.tiktok.com short links. Photo carousel links return transcript_target_not_video. Check lookupStatus before you read data.transcript.

How much does a successful request cost?

1 credit. +10 credits when AI transcribes the audio (useAiFallback). +10 credits per started minute of AI transcript, replacing the flat +10 (allowLongTranscription). Max 601 credits. 1 credit for transcript_target_not_video (HTTP 400). Service failures are free.

Is this okay for production?

Yes. It's the same API the Playground and the docs use: typed errors, a requestId on every response, and credits charged only on completed lookups. New accounts get 100 free credits.

Any curl-specific tips for this request?

Yes. Pass the key with -H "x-api-key: $SOCIALFETCH_API_KEY", and wrap the full URL in double quotes so the shell doesn't split it at the & between query parameters. -sS hides the progress meter but still shows connection errors. curl doesn't treat an HTTP error status as a failure, so read the error JSON it prints, or add --fail-with-body.

Any Node.js-specific tips for this request?

Yes. Native fetch doesn't throw on 4xx or 5xx responses, so check response.ok (or status) before parsing JSON. Keep meta.requestId from the body in case you need support with a row.

Any Python-specific tips for this request?

Yes. Call response.raise_for_status() before response.json(), set a timeout on requests.get, and keep response.json()["meta"]["requestId"] when a row looks wrong.