# TikTok Subtitles Extractor - Download Captions from Any Video (`linen_snack/tiktok-subtitles-extractor---download-captions-from-any-video`) Actor

Extract and download subtitles and captions from any public TikTok video. Converts TikTok captions to text or SRT format with support for multiple languages. Perfect for content creators, researchers, and accessibility needs. Simply paste a TikTok URL and get accurate transcripts in seconds.

- **URL**: https://apify.com/linen_snack/tiktok-subtitles-extractor---download-captions-from-any-video.md
- **Developed by:** [ius iyb](https://apify.com/linen_snack) (community)
- **Categories:** Social media
- **Security:** Limited permissions
- **Stats:** 325 total users, 3 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 subtitle extracteds

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 Subtitles Extractor

### 🚀 Extract Subtitles and Captions from Any TikTok Video

This Apify Actor allows you to easily extract captions and subtitles from TikTok videos in various formats. Whether you need plain text transcripts or properly formatted SRT subtitle files, this tool makes it simple to access this valuable content.

![TikTok Subtitles Extractor](https://images.apifyusercontent.com/6UcgmOnrxvx_3hqomxR-aDC81e11CHuFbDMQBGJ5o6Y/rs:fill:250:250/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vdGs1c2ZRekVjbldGUm9Gb0stYWN0b3ItREpnbUlHM2FrQVdPTlJ6djMtY29ZQXpkNE1Ccy04YmI3YjAxZS02M2ViLTRlYTUtODE3MS03ZWVmYjYyZjQ1OGQuanBlZw.webp)

### 📋 Features

- **Extract Subtitles** from any public TikTok video
- **Multiple Format Support**: Get subtitles as plain text or SRT format
- **Language Selection**: Choose from available language options when videos have multiple subtitle tracks
- **Reliable Extraction**: Uses robust methods to handle TikTok's structure
- **Easy to Use**: Simple configuration with just a TikTok URL required

### 🔍 Use Cases

- **Content Analysis**: Extract spoken content from TikTok videos for research or analysis
- **Accessibility**: Create accurate subtitles for repurposing TikTok content
- **Data Collection**: Gather transcript data from multiple TikTok videos
- **Translation**: Extract subtitles for translation into other languages
- **SEO Enhancement**: Use transcripts to improve searchability of repurposed content

### ⚙️ Input Configuration

The Actor accepts the following input parameters:

| Field | Type | Description |
|-------|------|-------------|
| `url` | String | **REQUIRED** - The URL of the TikTok video to extract subtitles from |
| `type` | String | Output format: `text` (default) for plain text or `srt` for subtitle format |
| `language` | String | Language code (e.g., `eng-US`) - leave empty to use the default language |

### 📊 Output

The Actor saves results to the default dataset, with data structured as follows:

```json
{
  "success": true,
  "format": "text",
  "subtitle": "This is the extracted subtitle text from the TikTok video...",
  "availableLanguages": [
    {
      "code": "eng-US",
      "name": "eng"
    }
  ]
}
```

### 🔄 How It Works

1. The Actor fetches the TikTok video page using the provided URL
2. It extracts subtitle information from the page metadata
3. The subtitle content is downloaded and processed according to the selected format
4. Results are saved to the Apify dataset with metadata about available languages

### 💡 Tips for Best Results

- Always use the direct video URL from TikTok (formats like `https://www.tiktok.com/@username/video/1234567890123456789`)
- If you're not getting results, check if the video actually has captions/subtitles enabled
- For videos with multiple language options, you can specify the exact language code after an initial run

### 🔒 Limitations

- Works only with public TikTok videos that have captions enabled
- Subject to TikTok's platform changes - will be regularly updated to maintain compatibility
- Rate limiting may apply based on TikTok's policies

### 👨‍💻 Technical Details

This Actor uses modern JavaScript with Axios for HTTP requests and careful parsing of TikTok's response structure. It handles various TikTok URL formats and provides appropriate error messages for invalid inputs or missing subtitles.

# Actor input Schema

## `url` (type: `string`):

The URL of the TikTok video you want to extract subtitles from.

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

The format of subtitles you want to extract. Options are 'text' for plain text or 'srt' for subtitle format.

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

Language code for the subtitles (e.g., 'eng-US'). Leave empty to use the default language.

## Actor input object example

```json
{
  "url": "https://www.tiktok.com/@username/video/1234567890123456789",
  "type": "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 = {
    "url": "https://www.tiktok.com/@username/video/1234567890123456789"
};

// Run the Actor and wait for it to finish
const run = await client.actor("linen_snack/tiktok-subtitles-extractor---download-captions-from-any-video").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 = { "url": "https://www.tiktok.com/@username/video/1234567890123456789" }

# Run the Actor and wait for it to finish
run = client.actor("linen_snack/tiktok-subtitles-extractor---download-captions-from-any-video").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 '{
  "url": "https://www.tiktok.com/@username/video/1234567890123456789"
}' |
apify call linen_snack/tiktok-subtitles-extractor---download-captions-from-any-video --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,linen_snack/tiktok-subtitles-extractor---download-captions-from-any-video"
        }
    }
}
```

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/DJgmIG3akAWONRzv3/builds/wfloA6yqDXN4676iV/openapi.json
