# Youtube Transcript Scraper (`mcdowell/yt-transcript`) Actor

🎥 Need a dependable way to extract transcripts from YouTube videos?

Meet YouTube-Transcript-Scraper — a practical tool designed to make transcript extraction quick, simple, and efficient. 🚀
Start scraping and turn YouTube content into valuable, accessible data! 🚀

- **URL**: https://apify.com/mcdowell/yt-transcript.md
- **Developed by:** [McDowell](https://apify.com/mcdowell) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 transcripts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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

## YouTube Transcript Scraper

**Extract clean, timestamped transcripts from public YouTube videos and turn video content into structured JSON for AI, RAG, SEO, research, and content automation.**

YouTube Transcript Scraper retrieves available captions from a public YouTube video and converts them into structured transcript segments containing the spoken text and precise timing information.

Whether you're building an AI knowledge base, indexing videos for RAG, analyzing hours of research material, or turning videos into written content, this Actor gives you the transcript data in a format that's easy to process programmatically.

## Key features

- 🎯 **Timestamped transcripts** — Every segment includes its start time and duration.
- 🤖 **AI-ready output** — Designed for LLM applications, RAG pipelines, vector databases, and AI agents.
- 🌍 **Multiple languages** — Request captions using an ISO 639-1 language code.
- ⚡ **Fast extraction** — Transcript retrieval typically completes within seconds.
- 📦 **Structured JSON** — Receive clean, predictable data instead of raw caption markup.
- 🔗 **Simple input** — Provide a YouTube video URL and target language.
- 🔑 **No YouTube API key required** — The Actor handles transcript extraction for you.
- 📚 **Suitable for batch workflows** — Use it as part of larger automated data pipelines.

## Why use YouTube Transcript Scraper?

YouTube contains an enormous amount of educational, informational, and entertainment content, but video isn't always convenient for automated processing.

This Actor converts that spoken content into text that software can understand.

Instead of manually watching videos, copying captions, or dealing with caption formats, you can retrieve the transcript and immediately send it to your next workflow.

### Built for AI applications

The transcript output is particularly useful for applications that need to process video content without actually watching the video.

For example:

```
YouTube video
     ↓
Transcript Scraper
     ↓
Timestamped JSON
     ↓
Chunking / preprocessing
     ↓
Embeddings
     ↓
Vector database
     ↓
RAG / AI Agent
```

This makes it possible to build systems that can search and reason over large collections of YouTube videos.

## Use cases

### AI agents

Give an AI agent access to the contents of YouTube videos as a callable data source.

An agent could retrieve a transcript and answer questions such as:

> "What does this video say about database optimization?"

### RAG pipelines

Index YouTube transcripts in a vector database and use them as a retrieval source for question-answering systems.

The timestamp information can also be preserved as metadata, allowing retrieved passages to be connected back to their location in the original video.

### Content repurposing

Turn long-form video into other content formats, including:

- Blog posts
- Newsletters
- Social media posts
- Video summaries
- Podcast notes
- Content briefs
- Short-form video scripts

### SEO research

Extract spoken content from videos to analyze topics, keywords, terminology, and content coverage.

This can help content teams understand what competitors, educators, creators, or industry experts are discussing.

### Research and analysis

Process large numbers of interviews, lectures, presentations, podcasts, and educational videos without manually transcribing each one.

### Accessibility and localization

Use retrieved captions as source material for subtitle processing, translation, accessibility workflows, or multilingual content generation.

## Input parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `videoUrls` | String | Yes | A list of complete URLs of public YouTube videos. |
| `language` | String | Yes | ISO 639-1 language code for the requested transcript. |

### Supported language codes

Examples include:

| Code | Language |
| --- | --- |
| `en` | English |
| `es` | Spanish |
| `fr` | French |
| `de` | German |
| `pt` | Portuguese |
| `it` | Italian |
| `ja` | Japanese |
| `zh` | Chinese |
| `hi` | Hindi |
| `ar` | Arabic |
| `ru` | Russian |
| `ko` | Korean |
| `nl` | Dutch |
| `tr` | Turkish |
| `id` | Indonesian |

Availability depends on the captions provided by the YouTube video.

## Example input

```json
{
	"videoUrls": [
		{
			"url": "https://www.youtube.com/watch?v=rUypXMNCccU"
		}
	],
	"language": "en"
}
```

## Output

The Actor produces a dataset item containing the transcript segments for the requested video.

### Example

```json
{
	"transcript": [
		{
			"text": "After 30 years",
			"duration": 6400,
			"offset": 0,
			"language": "en"
		},
		{
			"text": "uh Keefe D has been convicted for being",
			"duration": 5920,
			"offset": 2240,
			"language": "en"
		},
		{
			"text": "for orchestrating",
			"duration": 3160,
			"offset": 6400,
			"language": "en"
		},
		{
			"text": ">> So, he wasn't the person",
			"duration": 2040,
			"offset": 8160,
			"language": "en"
		}
  ],
  "videoId": "rUypXMNCccU",
	"title": "Keefe D CONVICTED For Tupac's Murder + Your Ego Will Be Your Downfall",
	"lengthSeconds": "365",
	"keywords": [
		"andrew schulz",
		"andrew schultz",
		"comedy",
		"comedian",
		"stand up",
		"brilliant idiots",
		"flagrant 2",
		"sports",
		"pop culture",
		"commentary",
		"comedy club",
		"near me",
		"jokes",
		"charlamagne",
		"charlemange",
		"breakfast club",
		"interviews",
		"wax",
		"paige",
		"taylor",
		"alexx",
		"alexxmedia",
		"entertainment"
	],
	"channelId": "UC5CabcpNWGijRHVfpwG4FEA",
	"isOwnerViewing": false,
	"shortDescription": "Watch Full Episode Here: Idiots In The Stream https://youtu.be/W8x13cslMGU?si=Yvks99mtYGjwwFQe\n\nThe Brilliant Idiots is a comedy podcast from the Loud Speakers Network featuring Charlamagne tha God, host of Power 105.1’s radio show, The Breakfast Club and a New York Times bestseller author with “Black Privilege”, “Shook One” and now “Get Honest or Die Lying”. Charlamagne tha God is a recurring host on “The Daily Show” on Comedy Central.  \n\nAndrew Schulz is a world touring stand up comedian known for his comedy specials “Infamous”, “Schulz Saves America”, “Views from the Cis” & “4:4:1” as well as appearing in films “You People”, “White Men Can’t Jump”, “The Underdogs” and “Upgraded”.\n\nThe Brilliant Idiots is a podcast just as unpredictable as its hosts. From music, comedy, relationships, to pop culture, politics and current events, everything is on the table for analysis. But take what you hear with a grain of salt, because while their perspectives are often brilliant, they're liable to be idiotic too.\n\nCharlamagne tha God\nInstagram - https://www.instagram.com/cthagod/\nTwitter - https://x.com/cthagod\nBreakfast Club YouTube - https://www.youtube.com/@BreakfastClubPower1051FM\n\nAndrew Schulz\nInstagram - https://www.instagram.com/andrewschulz/\nTwitter - https://x.com/andrewschulz\nFacebook - https://www.facebook.com/AndrewSchulzNY\n\nAlexxMedia\nBook Studio Time - https://www.wtfmediastudios.com/\nInstagram - https://www.instagram.com/alexxmedia/\nTwitter - https://twitter.com/alexxmedia\nFacebook - https://www.facebook.com/alexxandersonmedia\n\nJoin the discussion on the Idiots subreddit:\nhttp://bit.ly/2XGmsou\n\n#daejonlove #49ers #investments",
	"isCrawlable": true,
	"thumbnail": {
		"thumbnails": [
			{
				"url": "https://i.ytimg.com/vi_webp/rUypXMNCccU/default.webp",
				"width": 120,
				"height": 90
			},
			{
				"url": "https://i.ytimg.com/vi_webp/rUypXMNCccU/mqdefault.webp",
				"width": 320,
				"height": 180
			},
			{
				"url": "https://i.ytimg.com/vi_webp/rUypXMNCccU/hqdefault.webp",
				"width": 480,
				"height": 360
			},
			{
				"url": "https://i.ytimg.com/vi_webp/rUypXMNCccU/sddefault.webp",
				"width": 640,
				"height": 480
			}
		]
	},
	"allowRatings": true,
	"viewCount": "64",
	"author": "Brilliant Idiots Clips",
	"isPrivate": false,
	"isUnpluggedCorpus": false,
	"isLiveContent": false,
	"isTvfilmVideo": false
}
```

## Using the output

The resulting JSON can be consumed by virtually any application that can process structured data.

For an AI/RAG workflow, a common processing pipeline might look like:

1. Run the Actor with a YouTube URL.
2. Retrieve the transcript from the dataset.
3. Combine or re-segment transcript entries into suitable chunks.
4. Generate embeddings for the chunks.
5. Store the embeddings in your vector database.
6. Retrieve relevant transcript sections when answering user questions.
7. Preserve `start` timestamps as metadata for source attribution.

### Pricing

This Actor is billed via the Apify platform's usage-based pricing. See the pricing panel at the top of this page for current rates.

## API usage

The Actor can be integrated into an automated workflow using the Apify API.

### Start an Actor run

```
curl -X POST \
  "https://api.apify.com/v2/acts/mcdowell~yt-transcript/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "videoUrl": "https://www.youtube.com/watch?v=VIDEO_ID",
    "targetLanguage": "en"
  }'
```

Replace `YOUR_APIFY_TOKEN` with your Apify API token.

### Retrieve the dataset

After the run completes, the resulting dataset can be consumed through the Apify API or connected to downstream Apify integrations and automations.

## Example workflow

### Single video

```
Video URL
   ↓
Run Actor
   ↓
Transcript JSON
   ↓
Application / Script
```

### Multiple videos

```
YouTube URLs
     ↓
Actor runs
     ↓
Dataset
     ↓
Transcript processing
     ↓
Search / AI / Analytics
```

### AI knowledge base

```
YouTube videos
       ↓
Transcript extraction
       ↓
Text chunking
       ↓
Embeddings
       ↓
Vector database
       ↓
RAG application
```

## Timestamp-aware processing

Unlike a plain text transcript, the output retains timing information for every segment.

This allows downstream applications to:

- Link an answer to a point in the source video.
- Create custom transcript chunks.
- Build searchable video indexes.
- Generate chapter markers.
- Extract specific time ranges.
- Synchronize generated subtitles or annotations.
- Display transcript text alongside video playback.

For example, an application can store the transcript text together with its `start` value and later use that timestamp to navigate directly to the relevant part of the video.

## Limitations

The Actor relies on captions being available for the requested video and language.

A transcript may therefore be unavailable when:

- The video does not have captions.
- Captions are not available in the requested language.
- The video is not publicly accessible.
- YouTube does not provide usable caption data for the video.

The Actor extracts available caption content; it does not generate a new speech-to-text transcription from the video's audio when captions are unavailable.

## Best practices

### Use the appropriate language

Set `language` to the language you want to process. For multilingual workflows, you can run the Actor separately for each required language where captions are available.

### Preserve timestamps

When building AI or search applications, keep the `offset` and `duration` fields alongside the text rather than converting the entire transcript into one plain string.

This makes later source attribution and video navigation much easier.

### Chunk before embedding

For RAG applications, consider combining transcript segments into semantic chunks before generating embeddings. Individual caption segments can be very short and may not provide enough context on their own.

### Prefer use of proxis

To prevent possible blocking use `RESIDENTIAL` proxies when processing bulk videos.

## Frequently asked questions

### Does it work with any YouTube video?

It works with **public YouTube videos that have usable captions available** in the requested language.

### Does it require a YouTube API key?

No. You only need to provide the video URL and target language to the Actor.

### Does it support auto-generated captions?

Yes, where YouTube makes those captions available for the requested video and language.

### Are timestamps included?

Yes. Each transcript segment includes its starting position and duration.

### Can I use the output for RAG?

Yes. The structured transcript is well suited for preprocessing, chunking, embedding, and indexing in a RAG pipeline.

### Can I process videos in languages other than English?

Yes, provided captions are available in the requested language. Use the corresponding ISO 639-1 language code.

### Does it download the video?

No. The Actor is designed to retrieve transcript/caption data rather than download the video's media.

## Built for automation

YouTube Transcript Scraper works especially well as one component in a larger automation pipeline.

Combine transcript extraction with your existing AI, data processing, search, or content-generation workflow to transform video libraries into structured, searchable information.

**From video to usable data — automatically.**

# Actor input Schema

## `videoUrls` (type: `array`):

Videos that will be parsed for Transcripts

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

Choose the preferred language for the transcript (fallsback to englinsh if exists)

## `proxyConfig` (type: `object`):

Configure proxies to localize results and prevent limiting

## Actor input object example

```json
{
  "videoUrls": [
    {
      "url": "https://www.youtube.com/watch?v=RosSRBy0FYY"
    }
  ],
  "language": "en"
}
```

# 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 = {
    "videoUrls": [
        {
            "url": "https://www.youtube.com/watch?v=RosSRBy0FYY"
        }
    ],
    "language": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("mcdowell/yt-transcript").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 = {
    "videoUrls": [{ "url": "https://www.youtube.com/watch?v=RosSRBy0FYY" }],
    "language": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("mcdowell/yt-transcript").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 '{
  "videoUrls": [
    {
      "url": "https://www.youtube.com/watch?v=RosSRBy0FYY"
    }
  ],
  "language": "en"
}' |
apify call mcdowell/yt-transcript --silent --output-dataset

```

## MCP server setup

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

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/L67IuXcISw6sgT2Zn/builds/coLkjwHdh3JS3Lsg9/openapi.json
