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

Transcribe TikTok and YouTube videos and Shorts. Uses captions 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-youtube-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 & YouTube Transcript Scraper

Get a clean **transcript** from any **TikTok** or **YouTube** video or Short, and the field other transcript tools miss: the **on-screen text** burned into the frames. Paste video URLs (or a channel or profile URL) 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.

This Actor uses the platform caption when a video has one, and falls back to on-device speech recognition when it does not, so it returns a transcript even for videos that have no captions at all.

### What this Actor does

- Transcribes **TikTok** and **YouTube** videos and **Shorts** in one run.
- Uses the **caption track** when present (fast and exact), and **speech recognition** when the video has no caption.
- Reads the **on-screen text** with OCR, the captions and titles baked into the video that no subtitle file contains.
- 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 and duration.
- Expands a **YouTube channel or playlist URL** into its recent videos.
- Exports to JSON, CSV, Excel, or straight to the Apify API.

### What data can you extract?

| Group | Fields |
| --- | --- |
| Video | platform, id, url, title or caption text, duration, thumbnail |
| Author | name, profile URL, channel id |
| Engagement | view count, like count, comment count, share count |
| Transcript | source (caption or speech recognition), language, full text, hook, timed segments |
| On-screen text | text read from frames, per frame and combined |

### How to get a transcript

1. Paste TikTok or YouTube video URLs into **Video URLs**. You can also paste a YouTube channel or playlist URL.
2. Leave **Preferred language** as `en` or set another two-letter code, or clear it to auto-detect.
3. Turn on **Read on-screen text** if you want the words shown in the frames, not just the spoken ones.
4. Click **Start**, then export the results as JSON, CSV or Excel.

### Where the transcript comes from

Every row says how it was produced in the `transcript.source` field:

- **caption**: the video's own caption track, which is exact and fast.
- **asr**: on-device speech recognition, used when the video has no caption.

On-screen text is separate. Short-form video often carries the message as text burned into the frame rather than spoken aloud, so the on-screen text pass reads those words with OCR and returns them per frame and combined.

### 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 videos** costs about **$5**. Adding on-screen text for those 1,000 videos costs about **$40** more, because reading the frames is heavier than reading a caption. Tier discounts lower both for higher-volume plans, and the Apify free plan includes monthly credits to test the output.

### Input example

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" },
    { "url": "https://www.tiktok.com/@cnn/video/7688426985072119054" }
  ],
  "includeOnScreenText": true,
  "language": "en"
}
```

### Output example

```json
{
  "platform": "tiktok",
  "id": "7688426985072119054",
  "url": "https://www.tiktok.com/@cnn/video/7688426985072119054",
  "author": { "name": "cnn" },
  "durationSecs": 124,
  "viewCount": 18400,
  "transcript": {
    "source": "caption",
    "language": "eng-US",
    "wordCount": 246,
    "hook": "The girls told me he. He went taking a walk around the pond",
    "text": "The girls told me he. He went taking a walk around the pond, but I...",
    "segments": [{ "start": 0.5, "end": 3.74, "text": "The girls told me he." }]
  },
  "onScreenText": {
    "text": "CALEB FLYNN'S DAUGHTERS APPEARED 'NERVOUS' AFTER SPEAKING WITH HIM",
    "frames": [{ "time": 0.5, "text": "CALEB FLYNN'S DAUGHTERS APPEARED" }]
  }
}
```

### Who uses this Actor

- **Creative and content teams** reverse-engineering what works, and sorting on the hook.
- **Agencies** building swipe libraries of ads and top-performing videos.
- **AI teams** that need short-form video as clean text for retrieval and training.
- **Researchers and analysts** studying trends across TikTok and YouTube.

### Related scrapers

- **TikTok Transcript Scraper** for TikTok only.
- **YouTube Shorts Transcript Scraper** for Shorts only.
- An **Instagram Reels Transcript Scraper** is on the way.

### Frequently asked questions

#### Do I need to log in or supply an API key?

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

#### What if a video has no captions?

The Actor runs speech recognition on the audio and returns that transcript, marked with `source: asr`. If a video has neither speech nor captions, turn on on-screen text to read what is shown in the frames.

#### Which languages are supported?

Captions come back in the language the video provides. Speech recognition auto-detects the language, or you can set a preferred one. On-screen text works for any language the frames show.

#### Can I transcribe a whole channel?

Yes. Paste a YouTube channel or playlist URL and it expands into the recent videos, up to your max videos limit.

#### 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-youtube-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.youtube.com/watch?v=dQw4w9WgXcQ"
    },
    {
      "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.youtube.com/watch?v=dQw4w9WgXcQ"
        },
        {
            "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-youtube-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.youtube.com/watch?v=dQw4w9WgXcQ" },
        { "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-youtube-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.youtube.com/watch?v=dQw4w9WgXcQ"
    },
    {
      "url": "https://www.tiktok.com/@cnn/video/7688426985072119054"
    }
  ],
  "maxVideos": 100,
  "language": "en"
}' |
apify call headply/tiktok-youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,headply/tiktok-youtube-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/fYW7pCYuO0tP5hkEQ/builds/WguHm7KREvAvbGhtv/openapi.json
