# Get transcripts of a YouTube channel for AI and RAG

**Use case:** 

Transcribes the latest videos of a YouTube channel from its captions and splits each transcript into chunks of about 400 tokens, one row per chunk. Every chunk has a stable ID, start and end time, a deep link to that moment in the video and the video facts, ready to load into Pinecone, Qdrant, Chroma or pgvector.

## Input

```json
{
  "urls": [
    "https://www.youtube.com/@3blue1brown"
  ],
  "searchQueries": [
    "how large language models work",
    "home espresso tutorial"
  ],
  "maxVideosPerSource": 5,
  "maxTranscripts": 0,
  "channelContentTypes": [
    "videos"
  ],
  "searchSort": "relevance",
  "languages": [
    "en"
  ],
  "fallbackToAnyLanguage": true,
  "captionType": "any",
  "outputFormats": [
    "segments",
    "text"
  ],
  "includeWordTimestamps": false,
  "removeSoundTags": false,
  "includeDescription": false,
  "includeErrorItems": true,
  "oneRowPerChunk": true,
  "chunkSizeTokens": 400,
  "chunkOverlapTokens": 40,
  "onlyNewVideos": false,
  "monitorName": "default",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true,
  "maxConcurrency": 10,
  "maxRetries": 5
}
```

## Output

```json
{
  "chunkId": {
    "label": "Chunk",
    "format": "string"
  },
  "title": {
    "label": "Video",
    "format": "string"
  },
  "timestamp": {
    "label": "Starts at",
    "format": "string"
  },
  "tokenEstimate": {
    "label": "Tokens",
    "format": "integer"
  },
  "text": {
    "label": "Text",
    "format": "string"
  },
  "url": {
    "label": "Deep link",
    "format": "string"
  }
}
```

## How it works

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

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

### 2. Start the "Get transcripts of a YouTube channel for AI and RAG" task

The YouTube Transcript Scraper: Subtitles, Channels, Search Actor will start running based on the input automatically. You can also change all the input fields, like youtube urls or ids, search queries, and more, to match your specific use case.

### 3. Receive the "Get transcripts of a YouTube channel for AI and 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 chunk, video, starts at, 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 transcripts of a YouTube channel for AI and RAG" task via API](https://apify.com/zhtech/youtube-transcript-scraper.md).

## FAQ

### What does the YouTube channel transcripts for RAG task return?

The YouTube channel transcripts for RAG task returns one row per transcript chunk with chunk ID, text, start and end time, token estimate, a timestamped link to the video and the video title, channel and date.

### How do I index another channel or more videos?

Replace the channel in the YouTube channel transcripts for RAG task with any channel, playlist or video URL, and raise the max videos limit. Chunk size and overlap are adjustable.

### Does the YouTube channel transcripts for RAG task charge per chunk?

The YouTube channel transcripts for RAG task charges once per video with a transcript, however many chunk rows it produces. Videos without captions are free.

### Can I run the YouTube channel transcripts for RAG task on a schedule or through the API?

Save the YouTube channel transcripts for RAG task to your Apify account, then add it to an Apify Schedule (for example daily) or start it from the Apify API, webhooks, Zapier, Make, n8n or the Apify MCP server for AI agents.

### How much does the YouTube channel transcripts for RAG task cost?

The YouTube channel transcripts for RAG task is pay per event: a small start fee per run plus a fee per transcript saved. Videos without captions, private videos and blocked requests are free. Prices are on the Pricing tab.

## About this Actor

This example demonstrates how to use [YouTube Transcript Scraper: Subtitles, Channels, Search](https://apify.com/zhtech/youtube-transcript-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/zhtech/youtube-transcript-scraper.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/zhtech/youtube-transcript-scraper.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`).
