# YouTube Transcript Scraper (Videos, Playlists, Channels) (`ahmad_mahameed/youtube-transcript-scraper`) Actor

Get YouTube transcripts and subtitles in bulk from videos, playlists, channels or search: full text, timestamps, SRT, 100+ languages and video metadata. Pay only for transcripts found: $2 per 1,000.

- **URL**: https://apify.com/ahmad_mahameed/youtube-transcript-scraper.md
- **Developed by:** [Ahmad Mahameed](https://apify.com/ahmad_mahameed) (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 $2.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

### What does YouTube Transcript Scraper do?

It gets the **transcript (captions) of YouTube videos in bulk**, as clean text, timestamped segments and SRT subtitles, together with the video's title, channel, views, duration and description.

- 🎬 Works with **videos, Shorts, playlists, whole channels and YouTube search**. Paste any mix of URLs.
- 🌍 **100+ languages**: pick your preferred languages; human captions win over auto-generated ones
- ⏱️ Full text, **timestamped segments** and optional **SRT** file per video
- 💲 **$2 per 1,000 transcripts**, and **you pay only when a transcript is found**. Videos without captions, private or deleted videos cost nothing.
- ⚡ No API key, no login, no setup. Reliable at scale.

### Use cases

- Feed videos into **ChatGPT, Claude or your RAG / AI agent** for summaries, Q\&A and notes
- Turn a channel or playlist into **blog posts, newsletters or course notes**
- **SEO and content research**: what competitors say in their videos
- Build datasets for NLP, sentiment and topic analysis
- Create subtitles (SRT) for re-editing videos

### Input

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://www.youtube.com/playlist?list=PLoROMvodv4rMiGQp3WXShtMGgzqpfVfbU",
    "https://www.youtube.com/@mkbhd"
  ],
  "searchQueries": ["how to make sourdough"],
  "maxVideosPerSource": 50,
  "languages": "en, es",
  "includeTimestamps": true,
  "includeSrt": false
}
```

Channels return their newest videos first. **Max videos per playlist, channel or search** caps how many videos each one adds.

### Output

```json
{
  "videoId": "aircAruvnKk",
  "url": "https://www.youtube.com/watch?v=aircAruvnKk",
  "title": "But what is a neural network? | Deep learning chapter 1",
  "channelName": "3Blue1Brown",
  "channelId": "UCYO_jab_esuFRV4b17AJtAw",
  "durationSeconds": 1120,
  "viewCount": 24852838,
  "keywords": ["neural networks", "machine learning"],
  "description": "What are the neurons, why are there layers...",
  "availableLanguages": ["ar", "de", "en", "es", "fr"],
  "language": "en",
  "languageName": "English",
  "isAutoGenerated": false,
  "wordCount": 3357,
  "transcript": "This is a 3. It's sloppily written and rendered at an extremely low resolution...",
  "segments": [
    { "start": 4.22, "duration": 1.18, "text": "This is a 3." }
  ],
  "error": null
}
```

When a video has no captions, the row still lists its metadata with `error` explaining why, and it is **not charged**.

Export as JSON, CSV, Excel or HTML, or call it from Make, Zapier, n8n, LangChain or any MCP client through the Apify API.

### Pricing

**$0.002 per transcript found** ($2 per 1,000). Platform and proxy costs are included. Videos without a transcript are free.

### Notes

- The transcript comes from the captions YouTube shows for the video (made by the creator or auto-generated). Videos without any captions have no transcript.
- Age-restricted, private and members-only videos can't be read.

### More tools from this developer

- [YouTube Scraper](https://apify.com/ahmad_mahameed/youtube-scraper): videos, Shorts, channels and search with views, likes and dates
- [YouTube Comments Scraper](https://apify.com/ahmad_mahameed/youtube-comments-scraper): comments and replies, $1 per 1,000
- [Google Trends Scraper](https://apify.com/ahmad_mahameed/google-trends-scraper): interest over time, regions, rising queries
- [Google News Scraper](https://apify.com/ahmad_mahameed/google-news-scraper): news articles with real publisher URLs

### Feedback

Need another field or format? Open an issue on the Issues tab and it will be added quickly.

# Actor input Schema

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

Video, Shorts, playlist or channel URLs (or plain video IDs). Playlists and channels are expanded into their videos.

## `searchQueries` (type: `array`):

Optional. Search YouTube and get transcripts of the top videos for each query.

## `maxVideosPerSource` (type: `integer`):

How many videos to take from each playlist, channel (newest first) or search query.

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

Comma-separated language codes in order of preference, for example en, es, de. Human-made captions win over auto-generated ones in the same language. If none match, the video's own language is used.

## `includeTimestamps` (type: `boolean`):

Add a list of segments with start time, duration and text.

## `includeSrt` (type: `boolean`):

Add the transcript as an SRT subtitle file in the 'srt' field.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=aircAruvnKk"
  ],
  "maxVideosPerSource": 50,
  "languages": "en",
  "includeTimestamps": true,
  "includeSrt": false
}
```

# Actor output Schema

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

No description

# 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.youtube.com/watch?v=aircAruvnKk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmad_mahameed/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 = { "urls": ["https://www.youtube.com/watch?v=aircAruvnKk"] }

# Run the Actor and wait for it to finish
run = client.actor("ahmad_mahameed/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 '{
  "urls": [
    "https://www.youtube.com/watch?v=aircAruvnKk"
  ]
}' |
apify call ahmad_mahameed/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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