# TikTok Transcript Scraper (`lanternlab318/tiktok-transcript`) Actor

Public TikTok videos as text: platform captions, in-container speech recognition when there are none.

- **URL**: https://apify.com/lanternlab318/tiktok-transcript.md
- **Developed by:** [Lantern Lab](https://apify.com/lanternlab318) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 1,000 caption 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 Scraper — Captions + Speech-to-Text for Videos Without Them

Turn public TikTok videos into text. The Actor reads **TikTok's own caption
track** when the video has one, and when it does not, it **transcribes the audio
with open-source Whisper inside the Actor** — so a video with no captions still
comes back as text, which caption-only scrapers return empty.

One row per video: the whole transcript as plain text (ready to paste into an
LLM), timed segments, the language, and the video's public facts. No login, no
cookies, no account of yours.

**Price: $2.49 per 1,000 transcripts read from TikTok's captions, plus $0.0299 per audio minute for the videos that need speech recognition. No start fee.** See [Pricing](#pricing).

Input:

```json
{
  "videoUrls": [
    "https://www.tiktok.com/@bbcnews/video/7623948383312465174",
    "https://www.tiktok.com/@myrealfood/video/7238693788384840987"
  ],
  "language": "",
  "preferPlatformCaptions": true,
  "allowAsr": true,
  "includeSegments": true,
  "maxDurationSec": 600
}
```

Output — one row per video. Real row from a real run, shortened:

```json
{
  "recordType": "transcript",
  "platform": "tiktok",
  "videoId": "7623948383312465174",
  "awemeId": "7623948383312465174",
  "url": "https://www.tiktok.com/@bbcnews/video/7623948383312465174",
  "title": "Nasa's first crewed mission around the Moon in more than 50 years has taken off from Florida.",
  "hashtags": ["Nasa", "Artemis", "Rocket", "Space", "Moon", "ArtemisII", "USNews", "BBCNews"],
  "authorName": "BBC News",
  "authorHandle": "bbcnews",
  "publishedAt": "2026-04-02T00:13:44+00:00",
  "durationSec": 32,
  "playCount": 9500000,
  "likeCount": 967600,
  "transcriptSource": "platform_caption",
  "captionSource": "asr",
  "captionFormat": "webvtt",
  "availableCaptionLanguages": ["en-US"],
  "language": "en-US",
  "asrModel": null,
  "text": "Oh, my goodness! Wow! Oh, my goodness! That is spectacular! ...",
  "wordCount": 46,
  "segments": [{ "start": 0.0, "end": 2.48, "text": "Oh, my goodness!" }],
  "segmentCount": 8,
  "collectedAt": "2026-10-24T10:03:00+00:00",
  "partial": false,
  "partialReason": null,
  "statusText": "Transcript of 46 word(s), from TikTok's own caption track."
}
```

Limits:

- **Public videos only.** Only what TikTok shows a signed-out visitor. No login, no cookies, no private or age-restricted video.
- **Bring video links.** An `@handle` is accepted, but TikTok shows a profile's video grid only to signed-in visitors, so a handle is reported as `profile_not_listed` — never as "no videos".
- **A video with no transcript says why.** `partial: true` with a reason; those rows are free.
- **Captions are TikTok's, not ours.** A caption row reproduces the words in the caption file TikTok serves, including its typos, and `captionSource` says whether TikTok's recognition, the creator or a translation produced it.
- **Speech recognition is a machine transcript.** It is as good as the audio: music, crosstalk and heavy accents cost accuracy. TikTok's own caption track is preferred for exactly this reason.

### Memory

**2 GB is the default and enough for everything**, including speech
recognition: a forced-recognition run at 2 GB peaked at 1471 MB with the model
loaded next to the browser (measured on Apify 2026-10-25). More memory buys
more CPU, so recognition finishes sooner, but it does not change what a
transcript costs. A run with `allowAsr` on and less than 2 GB says so in the
log.

### What it does

1. Opens each public video page as a signed-out visitor and reads the page's own data: caption tracks, duration, caption text, author handle and display name, publish time, plays and likes.
2. Reads the caption track — TikTok's auto-generated one (`captionSource: "asr"`), the creator's own (`creator`), or a translation of either (`machine_translation`) — and turns the WebVTT or `creator_caption` file into plain text plus timed segments. `language` picks a track when the video has several; without it the spoken original wins over a translation.
3. For a video with **no** caption track, downloads what the page plays, decodes the audio inside the container and transcribes it with Whisper `tiny`. Nothing is sent to any speech service; the model weights ship inside the image.
4. Writes one row per video and a `RUN_SUMMARY` row: how many transcripts came from captions, how many from recognition, which videos had none and why, requests sent, recognition speed.

### What it does not do

- **No profile, hashtag or search listing.** Video links, short links or video IDs.
- **No login-only content**, no comments, no video or audio files in the output — only text.
- **No translation of its own.** It returns the language of the track it read, or the language recognition detected; it never translates for you.
- **No personal data.** The creator's public display name and @handle, nothing else: no user IDs, no bios, no follower counts, no commenters.

### Input

| Field | Default | Meaning |
| --- | --- | --- |
| `videoUrls` | – | Video links (`https://www.tiktok.com/@user/video/…`), short links (`https://vm.tiktok.com/…`) or numeric video IDs, one per line. An `@handle` is accepted but reported as not collected (see Limits). |
| `language` | – | Language to prefer, e.g. `en`, `es`, `zh`. Picks a caption track when the video has several, and hints recognition. Empty = the language actually spoken, detected automatically. |
| `preferPlatformCaptions` | `true` | Read TikTok's caption track first. Cheapest and most accurate. Off = transcribe the audio even when captions exist. |
| `allowAsr` | `true` | Transcribe videos that have no caption track. Off = those videos come back `partial` with `asr_disabled`. |
| `includeSegments` | `true` | Include `segments` (start, end, text) next to the plain text. |
| `maxDurationSec` | `600` | Videos longer than this are skipped by recognition and marked `duration_over_limit`. Caption tracks are read whatever the length. |
| `maxItems` | `50` | Per input line: the most videos one line may stand for. |
| `asrModel` | `tiny` | The only model offered: measured at about 2x faster than the audio plays, and within a few words of TikTok's own captions on 7 of 8 test videos. |
| `maxUpstreamRequests` | derived | Hard ceiling on requests to TikTok for the whole run — page visits, caption files and audio downloads. |
| `proxyConfiguration` | off | Not needed: TikTok serves these public pages to the platform's own IP. Switch Apify Proxy on if you want a particular country's exit. |

### Output

| Field | Meaning |
| --- | --- |
| `videoId` / `awemeId` | TikTok's own ID for the video, twice: under the name the web page uses and the one its API uses. |
| `url` | Canonical video URL. |
| `title` / `desc` | The caption without its hashtags, and the caption exactly as published. TikTok has no separate title. |
| `hashtags` | Hashtags from the caption, in order, without `#`. |
| `authorName` / `authorHandle` | The creator's public display name and @handle. |
| `publishedAt` / `collectedAt` | TikTok's publish time, and our own collection time. Both **UTC**, ISO 8601. The video page shows the publish date in *your* timezone, so the calendar day can differ by one — the value here is TikTok's own `createTime`, unchanged. |
| `durationSec`, `playCount`, `likeCount` | As the page reported them at `collectedAt`. |
| `transcriptSource` | `platform_caption` or `asr`. `null` when there is no transcript. |
| `captionSource` | For a caption row: `asr` (TikTok generated it), `creator` (a person wrote it) or `machine_translation`. |
| `captionFormat` | `webvtt` or `creator_caption`. |
| `availableCaptionLanguages` | Every caption language the page listed, whichever one was used. |
| `language` / `languageRaw` | Language of the transcript, normalised (`en-US`, `es`) and exactly as the platform or the model reported it. |
| `languageProbability` | Recognition's confidence in the language it detected. `null` on caption rows. |
| `asrModel` | The Whisper model that produced an `asr` transcript. `null` on caption rows. |
| `asrAudioSeconds` / `asrMinutesCharged` | Seconds of audio recognition read, and the audio minutes the row was charged as (rounded up). `null` on caption rows. |
| `text` | The whole transcript as plain text. `null` when there is none — `partialReason` says why. |
| `wordCount` | Words in `text`; characters for Chinese, Japanese and Korean, which are written without spaces. |
| `segments` / `segmentCount` | Timed segments `{start, end, text}` in seconds, and how many. |
| `partial` / `partialReason` | `true` plus one of: `video_unavailable`, `video_private`, `page_not_rendered`, `blocked`, `profile_not_listed`, `no_transcript_available`, `asr_disabled`, `duration_over_limit`, `caption_fetch_failed`, `caption_file_empty`, `audio_unavailable`, `audio_download_failed`, `asr_failed`, `asr_no_speech`, `upstream_request_cap`, `charge_limit_reached`, `max_items_reached`, `not_collected`. |
| `statusText` | The same thing in a sentence, so the dataset explains itself without the log. |

The last row is `recordType: "RUN_SUMMARY"` — videos processed, transcripts from captions and from recognition, videos without a transcript by reason, caption hit rate, recognition speed, requests sent and whether the run stopped early. The same object is in the run's key-value store under `RUN_SUMMARY`.

#### Partial is not empty

A video with music and no speech is an **empty result**: `asr_no_speech`, free, and it says so. A video the Actor could not read — removed, region-locked, challenged, or cut off by one of your limits — is **partial**, also free, and never reported as a video without speech.

### Pricing

Pay per event, no start fee. The two sources cost very different amounts to
produce, so they are priced separately — and recognition is priced per minute of
audio it reads, because a ten-minute video costs twenty times a thirty-second one
to transcribe:

| Event | Price | Charged for |
| --- | --- | --- |
| `transcript` | $0.00249 ($2.49 per 1,000) | One video transcribed from TikTok's own caption track. |
| `asr-audio-minute` | $0.0299 per audio minute | Each minute of audio speech recognition read, rounded up per video, for videos with no caption track. A 40-second video is one minute; the row says how many were charged in `asrMinutesCharged`. |

In the test set of 8 public videos (English and Spanish, 20–68 s), **8 of 8 had a
TikTok caption track**, so the caption price is what most runs pay; recognition
is the fallback that makes the remainder come back as text instead of empty.

Rows without a transcript, and the run summary, are free. Set a maximum charge for the run and the Actor stops before going over it.

# Actor input Schema

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

Public TikTok videos, one per line: a video link (https://www.tiktok.com/@user/video/...), a short link (https://vm.tiktok.com/...) or a numeric video ID. An @handle is accepted too, but TikTok only shows a profile's video grid to signed-in visitors, so a handle is reported as not collected rather than silently empty - bring video links.

## `language` (type: `string`):

Language code to prefer, for example en, es, zh. Used to pick a caption track when the video has several, and as the language hint for speech recognition. Leave empty to take the language actually spoken and let recognition detect it.

## `preferPlatformCaptions` (type: `boolean`):

Read the video's caption track when TikTok has one. This is the cheapest and most accurate source. Turn it off to transcribe the audio even for videos that have captions.

## `allowAsr` (type: `boolean`):

Run speech recognition on videos TikTok has no caption track for. Open-source Whisper runs inside this Actor; no audio leaves it and no speech service is called. Charged as a separate, higher-priced event than a caption transcript.

## `includeSegments` (type: `boolean`):

Include the segments array (start, end, text) next to the plain-text transcript.

## `maxDurationSec` (type: `integer`):

Videos longer than this are skipped by speech recognition and reported as partial instead. Caption tracks are read whatever the length.

## `maxItems` (type: `integer`):

Per input: how many recent videos are taken from each @handle, and the most videos one input may stand for. A run collects at most this many videos per line of the input above.

## `asrModel` (type: `string`):

Whisper model used for videos without captions. Only tiny is offered: measured on Apify 2026-10-24 (one CPU core) it transcribes about 2x faster than the audio plays and tracked TikTok's own captions within a few words on 7 of 8 test videos. Larger weights ran slower than real time without reading those samples any better.

## `maxUpstreamRequests` (type: `integer`):

Hard ceiling on requests this run may send to TikTok: page visits, caption files and audio downloads. Leave empty to derive it from the input. Reaching it stops collection and is reported on the videos that were not collected.

## `settleSecs` (type: `integer`):

How long the first page is left running before anything else is requested.

## `proxyConfiguration` (type: `object`):

Optional. TikTok serves these public pages to the platform's own IP, so no proxy is needed by default. Switch Apify Proxy on if you want a particular country's exit.

## `captureRaw` (type: `boolean`):

Diagnostics: keep the first 15 video pages' own JSON in the run's key-value store. Off by default.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.tiktok.com/@bbcnews/video/7623948383312465174",
    "https://www.tiktok.com/@myrealfood/video/7238693788384840987"
  ],
  "language": "",
  "preferPlatformCaptions": true,
  "allowAsr": true,
  "includeSegments": true,
  "maxDurationSec": 600,
  "maxItems": 50,
  "asrModel": "tiny",
  "settleSecs": 8,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "captureRaw": false
}
```

# Actor output Schema

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

No description

## `runSummary` (type: `string`):

No description

# 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": [
        "https://www.tiktok.com/@bbcnews/video/7623948383312465174",
        "https://www.tiktok.com/@myrealfood/video/7238693788384840987"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lanternlab318/tiktok-transcript").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": [
        "https://www.tiktok.com/@bbcnews/video/7623948383312465174",
        "https://www.tiktok.com/@myrealfood/video/7238693788384840987",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("lanternlab318/tiktok-transcript").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": [
    "https://www.tiktok.com/@bbcnews/video/7623948383312465174",
    "https://www.tiktok.com/@myrealfood/video/7238693788384840987"
  ]
}' |
apify call lanternlab318/tiktok-transcript --silent --output-dataset

```

## MCP server setup

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

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/Wh5hsEj3eSgdo6q2K/builds/oKUDYgj261iYzfnxM/openapi.json
