# YouTube Transcript Scraper — Fast, Any Language (`alluring_tamarack/youtube-transcripts`) Actor

Get YouTube video transcripts (captions) as clean text and timestamped segments, plus title, channel, duration and views. Any language, manual or auto-generated. Pay only for transcripts delivered — videos without captions are free.

- **URL**: https://apify.com/alluring\_tamarack/youtube-transcripts.md
- **Developed by:** [Oleksandr Aleksandrov](https://apify.com/alluring_tamarack) (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 $4.00 / 1,000 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

## YouTube Transcript Scraper — Fast, Any Language

Get the transcript (captions) of any YouTube video as clean text **and** timestamped segments, together with title, channel, duration and view count.

### Why this one

- **You pay only for transcripts delivered.** Videos without captions, private or removed videos are returned with a status and are **not charged**.
- **Reliable.** Automatic fallback to residential IPs when YouTube shows its "confirm you're not a bot" wall. In our tests: 12/12 videos with captions succeeded.
- **Any language.** Pick your preferred languages in order; creator-made captions are preferred over auto-generated ones (configurable). Every result lists all available caption languages.
- **Any link format.** `watch?v=`, `youtu.be/`, `shorts/`, `live/`, `embed/` or a plain 11-character video ID.
- **Fast.** Videos are processed in parallel: 14 links took ~23 seconds.

### Input

```json
{
  "videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw", "https://youtu.be/dQw4w9WgXcQ"],
  "languages": ["en", "es"],
  "preferManual": true,
  "includeSegments": true
}
```

### Output

```json
{
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "title": "Me at the zoo",
  "channelName": "jawed",
  "channelId": "UC4QobU6STFB0P71PMvOGN5A",
  "durationSeconds": 19,
  "viewCount": 438955592,
  "availableLanguages": [
    {
      "code": "en",
      "name": "English",
      "isAutoGenerated": false
    },
    {
      "code": "de",
      "name": "German",
      "isAutoGenerated": false
    }
  ],
  "status": "OK",
  "language": "en",
  "isAutoGenerated": false,
  "text": "All right, so here we are, in front of the elephants the cool thing about these guys is that they have really... really really long trunks and that's cool (baaaaaaaaaaahhh!!) and that's pretty much all there is to say",
  "wordCount": 39,
  "segments": [
    {
      "start": 1.2,
      "duration": 2.16,
      "text": "All right, so here we are, in front of the elephants"
    },
    {
      "start": 5.318,
      "duration": 2.656,
      "text": "the cool thing about these guys is that they have really..."
    }
  ]
}
```

Videos without a transcript:

```json
{
  "videoId": "aqz-KE-bpKQ",
  "status": "NO_TRANSCRIPT",
  "error": "This video has no captions/transcript."
}

```

### Use cases

- Feed videos into **LLMs / RAG pipelines**, summarizers and AI agents.
- **Content repurposing**: turn videos into blog posts, threads and newsletters.
- **Research & monitoring**: analyze what competitors, creators or experts say.
- **SEO**: extract keywords and topics from top-ranking videos.

### Notes

- Works only for videos that have captions (creator-made or auto-generated). It does not transcribe audio.
- `status` is `OK`, `NO_TRANSCRIPT` or `ERROR`. Only `OK` items are charged.

# Actor input Schema

## `videos` (type: `array`):

YouTube video URLs or IDs (watch, youtu.be, shorts, live and embed links all work).

## `languages` (type: `array`):

Language codes in order of preference, e.g. en, es, de. If none is available, the first available track is used.

## `preferManual` (type: `boolean`):

Use creator-uploaded captions over auto-generated ones when both exist.

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

Return start time and duration for every caption line, in addition to the full text.

## `maxConcurrency` (type: `integer`):

How many videos to process in parallel.

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

Apify Proxy is recommended.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "languages": [
    "en"
  ],
  "preferManual": true,
  "includeSegments": true,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One item per video: full text, timestamped segments and video metadata.

# 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 = {
    "videos": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("alluring_tamarack/youtube-transcripts").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 = {
    "videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("alluring_tamarack/youtube-transcripts").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 '{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call alluring_tamarack/youtube-transcripts --silent --output-dataset

```

## MCP server setup

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

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/6Fq57Vta2nudhs5ed/builds/zJYIQ8IsAxlqxMKyZ/openapi.json
