# TikTok Subtitles Generator (SRT & VTT) (`x402farm/tiktok-subtitles`) Actor

Generates SRT and WebVTT subtitle files for TikTok videos by transcribing the actual spoken audio with Whisper large-v3. TikTok publishes no caption track, so subtitles are produced from the audio itself, not scraped. Also returns plain text and timestamped segments. Any language. $0.004/min.

- **URL**: https://apify.com/x402farm/tiktok-subtitles.md
- **Developed by:** [Laurent Halbrun](https://apify.com/x402farm) (community)
- **Categories:** Videos, Social media, AI
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 minute of audio transcribeds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## TikTok Subtitles Generator — SRT & VTT from real audio

Generates **SRT and WebVTT subtitle files** for TikTok videos.

TikTok publishes no caption track, so subtitles cannot be scraped — they have
to be produced. This transcribes the actual audio with Whisper large-v3 and
returns `srt` and `vtt` fields ready to load into any player or editor.

### What it handles that caption-readers don't

- **Videos with no subtitles at all** — the majority of TikTok and Instagram.
- **TikTok and Instagram**, not just YouTube.
- **Any language**, auto-detected, including videos whose captions are only
  available in one language.
- **Auto-generated captions you don't trust** — this reads the audio directly.

### Pricing

**$0.004 per minute of audio transcribed.** Rounded up to the minute.

That is roughly 6× cheaper than other actors that run real speech recognition
(they charge $0.025–$0.05 per minute), because transcription runs on dedicated
GPUs instead of inside the Actor.

You are **not charged** when there is nothing to transcribe — a silent video, a
photo post, or a carousel returns a labelled row at no cost.

### Input

```json
{
  "urls": [
    "https://www.tiktok.com/@nasa/video/7670721000471891214",
    "https://www.instagram.com/nasa/reel/Dbn-XJhk0_-/",
    "https://www.youtube.com/watch?v=aircAruvnKk"
  ],
  "language": null,
  "includeSegments": true,
  "maxDurationSeconds": 3600
}
```

| Field | Meaning |
|---|---|
| `urls` | Video URLs. YouTube, TikTok, Instagram. |
| `language` | ISO code (`en`, `fr`, `es`…). Leave empty to auto-detect — detection is reliable and free. |
| `includeSegments` | Sentence-level segments with start/end times. |
| `maxDurationSeconds` | Skip anything longer. Guards against transcribing a multi-hour stream by accident. |
| `instagramCookies` | **Instagram only.** See below. |

#### Instagram requires a session

Instagram returns an empty media response to anonymous requests — every public
post, no exceptions. Export cookies from a logged-in browser (Netscape format)
and pass them in `instagramCookies`. They are written to a temporary file and
deleted when the run ends; they are never stored.

YouTube and TikTok need no credentials.

### Output

```json
{
  "url": "https://www.tiktok.com/@nasa/video/7670721000471891214",
  "platform": "tiktok",
  "videoId": "7670721000471891214",
  "title": "There's nothing like watching humanity leave Earth.",
  "uploader": "nasa",
  "durationSeconds": 29.93,
  "language": "en",
  "languageConfidence": 0.962,
  "transcript": "Booster ignition and lift off, the crew of Artemis 2 now bound for the moon…",
  "segments": [{ "debut": 0.0, "fin": 4.2, "texte": "Booster ignition and lift off" }],
  "source": "audio-asr",
  "scrapedAt": "2026-08-06T04:10:18.295Z"
}
```

`source` is always `audio-asr` — it is there so you can verify the text came
from speech recognition rather than from a caption file.

Rows that could not be transcribed carry `errorType`:

| `errorType` | Meaning |
|---|---|
| `no_audio_track` | Silent video, or the post is a photo / carousel. Not charged. |
| `extraction_failed` | The video could not be downloaded — private, deleted, or region-locked. |

### Notes

Long videos are fine: a 19-minute YouTube video returns 257 timestamped
segments. Very long recordings are limited by `maxDurationSeconds`, which you
can raise.

Residential proxies are recommended for TikTok and Instagram, which rate-limit
datacenter IP ranges.

### Frequently asked questions

**How do I get the subtitles of a TikTok video?**
Paste the video URL into `urls` and run the actor. No account, no API key and no
cookies are required for public videos.

**What if the video has no captions?**
That is the normal case, and it changes nothing here. This actor never reads a
caption track — it downloads the audio and runs speech recognition on it, so a
video without captions returns exactly the same quality of result.

**Which languages are supported?**
Whisper large-v3 covers 100+ languages, including French, Spanish, Portuguese,
German, Italian, Arabic, Hindi and Japanese. Language is auto-detected by
default; set `language` to force one.

**How much does it cost?**
$0.004 per minute of audio actually transcribed, rounded up. A 45-second video
costs $0.004, and 1 000 short videos cost about $4. Silent videos, photo posts
and failed downloads are not billed at all.

**Can I process a whole account or playlist?**
Yes — pass every video URL in `urls`. Pair it with any profile or playlist
scraper to collect those URLs first.

**What do people use it for?**
Content and competitor research, hook analysis, subtitle production,
repurposing short video into written content, making video libraries
full-text searchable, and building speech datasets.

# Actor input Schema

## `urls` (type: `array`):

Tiktok-subtitles video URLs. The audio is transcribed with Whisper — captions are never used, so videos with no subtitles work exactly the same. YouTube, TikTok and Instagram URLs are all accepted.

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

ISO code such as en, fr, es. Leave empty to auto-detect — detection is reliable and costs nothing extra.

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

Return sentence-level segments with start/end times, in addition to the full text.

## `maxDurationSeconds` (type: `integer`):

Guard against accidentally transcribing a multi-hour stream.

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

Required for Instagram only: Instagram returns an empty media response to anonymous requests. Export cookies from a logged-in browser session. Stored in a temporary file and deleted at the end of the run.

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

Leave off unless you hit rate limits. Measured 2026-08-06: TikTok BLOCKS Apify's residential proxy pool (those IPs are burned) and demands a login, while it works fine from Apify's own datacenter IPs. Residential only helps if you bring your own clean IPs.

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

Internal — whisper-large-v3-turbo (fast, cheap) or whisper-large-v3 (slightly better, 2.8x the price).

## `transcriptionEndpoints` (type: `array`):

Internal — GPU transcription services. Several entries enable parallel processing and automatic failover: a node that fails twice in a row is taken out of rotation for 60 s, then retried.

## `concurrencyPerEndpoint` (type: `integer`):

Internal — in-flight transcriptions per GPU. Raising it past what the card can hold only adds latency, not throughput.

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

Internal — kept for single-GPU setups. Ignored when transcriptionEndpoints is set.

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

Internal — bearer token for the transcription service.

## Actor input object example

```json
{
  "urls": [
    "https://www.tiktok.com/@nasa/video/7670721000471891214"
  ],
  "includeSegments": true,
  "maxDurationSeconds": 3600,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "groqModel": "whisper-large-v3-turbo",
  "concurrencyPerEndpoint": 2
}
```

# 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 = {
    "urls": [
        "https://www.tiktok.com/@nasa/video/7670721000471891214"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("x402farm/tiktok-subtitles").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 = { "urls": ["https://www.tiktok.com/@nasa/video/7670721000471891214"] }

# Run the Actor and wait for it to finish
run = client.actor("x402farm/tiktok-subtitles").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 '{
  "urls": [
    "https://www.tiktok.com/@nasa/video/7670721000471891214"
  ]
}' |
apify call x402farm/tiktok-subtitles --silent --output-dataset

```

## MCP server setup

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

```

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/9QiqKYrioFfXKOS0r/builds/u0qMpWJyX3DuhX4bd/openapi.json
