# Get a YouTube channel's transcripts for RAG

**Use case:** 

Pull transcripts for a channel's newest videos, split into timestamped chunks of about 500 words that are ready for embeddings, a vector database or an LLM. This example uses Veritasium; paste any channel handle, URL or playlist.

## Input

```json
{
  "urls": [
    "@veritasium"
  ],
  "maxVideosPerSource": 5,
  "channelContent": "videos",
  "languages": [
    "en"
  ],
  "fallbackToOriginalLanguage": true,
  "preferManualCaptions": true,
  "allLanguages": false,
  "maxLanguages": 30,
  "includeSegments": true,
  "subtitleFormat": "none",
  "includeDescription": true,
  "includeChapters": true,
  "includeMostReplayed": false,
  "chunkWords": 500,
  "onlyNew": false,
  "maxVideos": 0,
  "dryRun": false
}
```

## Output

```json
{
  "url": {
    "label": "Video",
    "format": "string"
  },
  "title": {
    "label": "Title",
    "format": "string"
  },
  "channelName": {
    "label": "Channel name",
    "format": "string"
  },
  "publishDate": {
    "label": "Publish date",
    "format": "string"
  },
  "language": {
    "label": "Language",
    "format": "string"
  },
  "captionType": {
    "label": "Caption type",
    "format": "string"
  },
  "wordCount": {
    "label": "Word count",
    "format": "integer"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "text": {
    "label": "Transcript",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The YouTube Transcript, Subtitles & Captions Scraper Actor is ready to run with the inputs already set for "Get a YouTube channel's transcripts for RAG". [Sign up or log in](https://console.apify.com/create-task-from-example/wg5mXF4hfxsWldiwK) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Get a YouTube channel's transcripts for RAG" task

The YouTube Transcript, Subtitles & Captions Scraper Actor will start running based on the input automatically. You can also change all the input fields, like videos, shorts, channels or playlists, max videos per channel / playlist / search, and more, to match your specific use case.

### 3. Receive the "Get a YouTube channel's transcripts for RAG" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as video, title, channel name, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Get a YouTube channel's transcripts for RAG" task via API](https://apify.com/verbatim-labs/youtube-transcript.md).

## FAQ

### Am I charged for videos without captions?

Videos with no captions, private or deleted videos come back from the channel RAG transcript task as free rows with a status and errorCode. Only rows with status ok are billed.

### What does each row contain?

Each row has the video title, channel, publish date, language, caption type, word count and the full transcript text, plus optional timestamped segments, chapters and SRT/VTT.

### How big are the chunks?

The channel RAG transcript task splits each transcript into chunks of about chunkWords words (300-800 suits most RAG setups), each with start and end timestamps so answers can link to the moment in the video.

### Can I use the transcripts with an AI agent or n8n?

The channel RAG transcript task works over the Apify API, MCP, Make, n8n and Zapier. Every row has stable status and errorCode fields, so a workflow can branch without parsing error text.

## About this Actor

This example demonstrates how to use [YouTube Transcript, Subtitles & Captions Scraper](https://apify.com/verbatim-labs/youtube-transcript.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/verbatim-labs/youtube-transcript.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/verbatim-labs/youtube-transcript.md

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`).
