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

Transcribe TikTok videos. Uses the caption when present, on-device speech recognition when not, plus on-screen text OCR and a hook field. No login. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/headply/tiktok-transcript-scraper.md
- **Developed by:** [Mayowa Ogedengbe](https://apify.com/headply) (community)
- **Categories:** Videos, AI, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 video transcripts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

Get a clean **transcript** from any **TikTok** video, and the field other TikTok tools miss: the **on-screen text** burned into the frames. Paste TikTok video URLs and get back the spoken words, the words shown on screen, and a hook field for the opening seconds. No login, no cookies, no API key.

Most TikTok videos now carry an auto-generated caption, which this Actor reads directly. When a video has no caption, it falls back to on-device speech recognition, so you get a transcript either way.

### What this Actor does

- Transcribes any **TikTok** video from its URL.
- Uses the video's **caption track** when present, and **speech recognition** when it is not.
- Reads the **on-screen text** with OCR, the captions and titles baked into the video that no subtitle file carries.
- Returns a **hook** field: the words from the opening seconds, which is what creative teams sort on.
- Gives timed **segments**, full text, language, author, view count, likes and duration.
- Exports to JSON, CSV, Excel, or straight to the Apify API.

### How to get a TikTok transcript

1. Paste TikTok video URLs (tiktok.com/@user/video/...) into **Video URLs**.
2. Set **Preferred language** or clear it to auto-detect.
3. Turn on **Read on-screen text** to also read the words shown in the frames.
4. Click **Start** and export the results.

### Where the transcript comes from

Each row records its source in `transcript.source`: **caption** for the video's own track, or **asr** for on-device speech recognition when there is no caption. On-screen text is returned separately, per frame and combined, because short-form video often shows the message as text rather than speaking it.

### How much does it cost?

Pay-per-event pricing, so you pay for the results you receive.

| Event | Price |
| --- | --- |
| Video transcript | $0.005 |
| On-screen text | $0.04 |

A transcript for **1,000 TikToks** costs about **$5**. Adding on-screen text costs about **$40** more per 1,000, because reading frames is heavier than reading a caption. Tier discounts lower both, and the Apify free plan includes credits to test it.

### Input example

```json
{
  "startUrls": [{ "url": "https://www.tiktok.com/@cnn/video/7688426985072119054" }],
  "includeOnScreenText": true
}
```

### Related scrapers

- **YouTube Transcript Scraper** for YouTube videos and Shorts.
- **TikTok & YouTube Transcript Scraper** to transcribe both in one run.

### Frequently asked questions

#### Do I need to log in?

No. There is no login, cookie or API key. You only need an Apify account.

#### What if a TikTok has no caption?

The Actor runs speech recognition on the audio and returns that transcript, marked `source: asr`. If a video shows text rather than speaking, turn on on-screen text.

#### What formats can I export?

JSON, CSV, Excel, XML and RSS, plus the Apify API and integrations such as Google Sheets, Make and Zapier.

# Changelog

This Actor's version history is a separate document: https://apify.com/headply/tiktok-transcript-scraper/changelog.md

# Actor input Schema

## `startUrls` (type: `array`):

TikTok video URLs (tiktok.com/@user/video/...), YouTube video or Shorts URLs, or YouTube channel and playlist URLs (expanded to their recent videos).

## `maxVideos` (type: `integer`):

Upper bound on how many videos to process, including videos expanded from a channel or playlist URL.

## `includeOnScreenText` (type: `boolean`):

Recognize the text burned into the video frames (captions, titles, callouts) with OCR. This is the field no caption track carries. It samples frames and costs more per video.

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

Two-letter language code for the transcript, for example <b>en</b>. Leave empty to auto-detect and use the video's own caption language.

## `hookSeconds` (type: `integer`):

How many opening seconds to pull into a separate hook field, which is what creative teams sort on.

## `ocrFrameInterval` (type: `integer`):

Seconds between sampled frames when reading on-screen text. Lower catches more text but costs more.

## `ocrMaxFrames` (type: `integer`):

Safety cap on frames read per video.

## `concurrency` (type: `integer`):

How many videos to fetch in parallel.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.tiktok.com/@cnn/video/7688426985072119054"
    }
  ],
  "maxVideos": 100,
  "includeOnScreenText": false,
  "language": "en",
  "hookSeconds": 5,
  "ocrFrameInterval": 3,
  "ocrMaxFrames": 24,
  "concurrency": 4
}
```

# Actor output Schema

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

One item per video with transcript and optional on-screen text.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.tiktok.com/@cnn/video/7688426985072119054"
        }
    ],
    "maxVideos": 100,
    "language": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("headply/tiktok-transcript-scraper").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 = {
    "startUrls": [{ "url": "https://www.tiktok.com/@cnn/video/7688426985072119054" }],
    "maxVideos": 100,
    "language": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("headply/tiktok-transcript-scraper").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 '{
  "startUrls": [
    {
      "url": "https://www.tiktok.com/@cnn/video/7688426985072119054"
    }
  ],
  "maxVideos": 100,
  "language": "en"
}' |
apify call headply/tiktok-transcript-scraper --silent --output-dataset

```

## MCP server setup

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

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/6d1lmnUTTLac7moXq/builds/VAW9JsCa0bt4NxAIg/openapi.json
