# YouTube Search to Transcripts & Chapters API

**Use case:** 

Search YouTube by keyword and automatically extract clean transcripts, chapter-aligned Markdown, and overlapping RAG chunks from top matching videos. Ideal for AI research agents, n8n, and Make flows.

## Input

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "searchQueries": [
    "python asyncio tutorial"
  ],
  "maxVideos": 3,
  "languages": [
    "en"
  ],
  "allowAutoTranslation": true,
  "includeTimestamps": false,
  "includeMetadata": true,
  "includeRagChunks": true,
  "ragChunkTokens": 400,
  "ragChunkOverlapTokens": 50,
  "stripSoundMarkers": true,
  "concurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

## Output

```json
{
  "videoId": {
    "label": "Video ID",
    "format": "string"
  },
  "title": {
    "label": "Title",
    "format": "string"
  },
  "channelName": {
    "label": "Channel",
    "format": "string"
  },
  "language": {
    "label": "Language",
    "format": "string"
  },
  "isAutoGenerated": {
    "label": "Auto-Generated",
    "format": "boolean"
  },
  "wordCount": {
    "label": "Words",
    "format": "integer"
  },
  "durationSeconds": {
    "label": "Duration (s)",
    "format": "integer"
  },
  "ragChunkCount": {
    "label": "RAG Chunks",
    "format": "integer"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "url": {
    "label": "URL",
    "format": "string"
  }
}
```

## How it works

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

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

### 2. Start the "YouTube Search to Transcripts & Chapters API" task

The YouTube Transcript Scraper — Subtitles, Chapters & RAG (MCP) Actor will start running based on the input automatically. You can also change all the input fields, like youtube urls or video ids, youtube search queries (optional), and more, to match your specific use case.

### 3. Receive the "YouTube Search to Transcripts & Chapters API" 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 id, title, channel, 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 "YouTube Search to Transcripts & Chapters API" task via API](https://apify.com/datapipestudio/youtube-transcript-rag.md).

## FAQ

### What output fields does this task provide?

The YouTube Search to Transcripts & Chapters API provides videoId, title, channelName, language, isAutoGenerated, wordCount, durationSeconds, ragChunkCount, status, and url.

### What does the RAG chunk count represent?

The ragChunkCount field indicates the number of overlapping token-sized chunks extracted from the video, ready for use in AI applications.

### How does this task handle unavailable or captionless videos?

This task charges $0 for unavailable or captionless videos, ensuring fair billing without unexpected costs.

### What metadata can be included with the output?

Optional rich video metadata includes title, channelName, channelId, viewCount, likeCount, durationSeconds, publishDate, category, keywords, thumbnailUrl, and description.

### Can this task be scheduled to run automatically?

This task supports automatic scheduling to run through the Apify Console.

### Is this task compatible with AI agents?

The YouTube Search to Transcripts & Chapters API is ready to connect with AI agents via the Apify MCP server.

## About this Actor

This example demonstrates how to use [YouTube Transcript Scraper — Subtitles, Chapters & RAG (MCP)](https://apify.com/datapipestudio/youtube-transcript-rag.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/datapipestudio/youtube-transcript-rag.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/datapipestudio/youtube-transcript-rag.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`).
