# TikTok Transcript Extractor (`akash9078/tiktok-transcript-extractor`) Actor

Extract transcripts, captions and metadata from TikTok videos without an API key. Returns TikTok's own WebVTT captions with timestamps, or transcribes the audio when no captions exist.

- **URL**: https://apify.com/akash9078/tiktok-transcript-extractor.md
- **Developed by:** [Akash Kumar Naik](https://apify.com/akash9078) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 66.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 transcripts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## TikTok Transcript Extractor

Extract transcripts and captions from TikTok videos. No API key, no login, no cookies.

Point it at one video or a list of videos and get back a clean transcript with timestamps. Where a video has TikTok's own captions, it uses them, which is both cheaper and more accurate than transcribing audio. Where it does not, it transcribes the audio instead.

### What it does

- **Reads TikTok's own captions** when the video has them, including auto-generated and machine-translated tracks, with segment timestamps
- **Transcribes the audio** when a video has no captions, using Groq Whisper
- **Handles every TikTok URL shape**: full video links, `vm.tiktok.com` and `vt.tiktok.com` short links, `/t/` links, or a bare numeric video id
- **Returns rich metadata**: creator, description, upload date, duration, thumbnail, and play, like, comment and share counts
- **Rejects cleanly**: photo posts, private videos and feed pages get a specific error, not a generic failure

### Input

```json
{
  "videoUrls": [
    { "url": "https://www.tiktok.com/@nasa/video/7692161454694206733" }
  ]
}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `videoUrls` | array | Yes | One or more TikTok video links, or bare numeric video ids |

That is the whole input. Bare strings are also accepted, so a plain JSON body works as well as the UI's link list.

### Output

One row per video.

```json
{
  "success": true,
  "video_id": "7692161454694206733",
  "video_url": "https://www.tiktok.com/@nasa/video/7692161454694206733",
  "author_username": "nasa",
  "author_nickname": "NASA",
  "description": "It was a big week in low Earth orbit at NASA!",
  "uploaded_at": "2026-10-02T19:55:24+00:00",
  "duration_seconds": 136,
  "thumbnail_url": "https://p16-sign.tiktokcdn-us.com/...",
  "stats": {
    "play_count": 368800,
    "like_count": 15000,
    "comment_count": 413,
    "share_count": 473
  },
  "transcript_engine": "captions",
  "transcript_language": "eng",
  "transcript": "This week, NASA's work in low earth orbit took center stage, from crew rotations to spacecraft development...",
  "transcript_segments": [
    { "start": 0.14, "end": 3.54, "text": "This week, NASA's work in low earth orbit took center stage," },
    { "start": 3.54, "end": 5.7, "text": "from crew rotations to spacecraft development." }
  ],
  "word_count": 368,
  "segment_count": 44,
  "extraction_time": 0.7,
  "error": null
}
```

Failed rows keep `success: false` with a populated `error`, plus whatever metadata was recovered before the failure. That means a private video still tells you who posted it and when, which is usually what you want from a failed run.

### How it works

Extraction climbs a ladder, cheapest first:

1. **Read the video page** directly. TikTok embeds a hydration JSON script in the page holding the caption track URL, media URLs and metadata. No browser, no proxy.
2. **Retry through an Apify residential proxy** when the direct fetch is blocked or rate-limited, rotating the exit IP between attempts.
3. **Read the caption track** (WebVTT) and parse it into timed segments, merging the rolling duplicate lines TikTok's auto-captions produce.
4. **Transcribe the audio** when there is no caption track, through Groq's Whisper endpoint.

Direct connections go first on purpose. Residential proxy bandwidth costs roughly 100 times more than a datacenter request, so it is only spent when the free path fails.

For the audio step, Groq fetches the media from TikTok's own CDN URL, so the actor never downloads the video. That keeps memory flat regardless of video length and removes the slowest step from the ASR path.

### Captions vs audio transcription

| | Captions | Audio transcription |
| --- | --- | --- |
| Cost per video | Very low | Higher |
| Speed | Under a second | A few seconds |
| Punctuation and casing | TikTok's own | Model-generated |
| Availability | Most talking-head and edited videos | Any video with speech |

Captions are always tried first. Audio transcription is the fallback, so it only runs when there is nothing else to read.

### Configuration

The actor needs one optional setting for the audio path.

| Variable | Purpose |
| --- | --- |
| `GROQ_API_KEY` | Groq API key, used only when a video has no captions |

Set it as a **secret** environment variable on the actor in Apify Console. It is read from the environment, never from actor input, so it cannot leak into a dataset or a log line. Without it, videos that have captions still work; videos without them return a clear error naming the missing variable.

A free Groq key is at https://console.groq.com/keys. The default model is `whisper-large-v3-turbo`; set `GROQ_WHISPER_MODEL` to `whisper-large-v3` for higher accuracy.

### Limitations

- **Photo and slideshow posts are rejected.** They have no video to transcribe.
- **Private, deleted or region-blocked videos cannot be read.** TikTok returns a non-zero status code for these.
- **Caption URLs expire quickly.** A run reads them immediately after extracting the page, so queue length does not matter.
- **Live streams are not supported.** Only published videos have a stable page.
- **Caption coverage is not universal.** Plenty of videos have no caption track, which is exactly why the audio path exists.
- **Captions are machine-translated on some videos.** Those carry a `MT` source marker and read slightly worse than human-authored captions. Nothing to fix, just worth knowing.

### Pricing

Pay per event. You are charged only for transcripts actually delivered.

| Event | Price | When |
| --- | --- | --- |
| `transcript` | $0.01 | A transcript was successfully extracted |

Failed runs that produce no transcript are not charged the `transcript` event. Residential proxy bandwidth is not a separate event: it is covered by the `transcript` price.

### Tips

- **Batch by creator.** A list of videos from one account keeps the page shape consistent and makes failures obvious.
- **Check the `transcript_engine` field.** It tells you which path ran, which is the fastest way to explain a quality difference between two rows.
- **Use `transcript_segments` for anything timing-aware.** The plain `transcript` is for reading and for LLM input.

### Privacy and terms

This actor reads publicly available TikTok pages. It does not log in, does not use cookies and does not bypass access controls. You are responsible for complying with TikTok's terms of service and with the privacy and copyright rules that apply to your use of the extracted transcripts.

# Actor input Schema

## `videoUrls` (type: `array`):

Paste one or more TikTok video links. Full links, vm.tiktok.com short links and bare video ids all work.

## Actor input object example

```json
{
  "videoUrls": [
    {
      "url": "https://www.tiktok.com/@nasa/video/7692161454694206733"
    }
  ]
}
```

# Actor output Schema

## `transcripts` (type: `string`):

Transcripts with author, description, engagement stats, plain text, timestamped segments and SRT subtitles.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videoUrls": [
        {
            "url": "https://www.tiktok.com/@nasa/video/7692161454694206733"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("akash9078/tiktok-transcript-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "videoUrls": [{ "url": "https://www.tiktok.com/@nasa/video/7692161454694206733" }] }

# Run the Actor and wait for it to finish
run = client.actor("akash9078/tiktok-transcript-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videoUrls": [
    {
      "url": "https://www.tiktok.com/@nasa/video/7692161454694206733"
    }
  ]
}' |
apify call akash9078/tiktok-transcript-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,akash9078/tiktok-transcript-extractor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Mm4frcK4ZBuSym8dx/builds/ckU6LOJlEB0SGqZah/openapi.json
