# YouTube Channel Transcripts for RAG and ChatGPT

**Use case:** 

Pull the latest videos of a YouTube channel and get transcripts split into timestamp-linked chunks ready for embeddings, RAG pipelines or ChatGPT. Each chunk links back to the exact second in the video.

## Input

```json
{
  "urls": [
    "https://www.youtube.com/@minutephysics"
  ],
  "languages": [
    "en"
  ],
  "track": "any",
  "format": "segments",
  "includeMetadata": true,
  "maxConcurrency": 50,
  "expandCollections": true,
  "maxVideosPerChannel": 10,
  "max_results": 1000,
  "timeoutSecs": 8,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  },
  "includeExtendedMetadata": false,
  "maxVideosPerSearch": 20,
  "includeChunks": true,
  "chunkUnit": "tokens",
  "chunkSize": 300,
  "chunkOverlap": 50,
  "includeMarkdown": true,
  "includeChapters": true,
  "minAttemptsForSuccessRatio": 200,
  "maxConsecutiveFailures": 500,
  "maxRunSecs": 3000,
  "maxListingSources": 200,
  "searchInTranscripts": [],
  "searchContextWords": 12,
  "onlyVideosWithMatches": false,
  "onlyNewVideos": false
}
```

## Output

```json
{
  "inputIndex": {
    "label": "inputIndex",
    "format": "integer"
  },
  "videoId": {
    "label": "videoId",
    "format": "string"
  },
  "status": {
    "label": "status",
    "format": "text"
  },
  "language": {
    "label": "language",
    "format": "string"
  },
  "trackKind": {
    "label": "trackKind",
    "format": "text"
  },
  "translationStatus": {
    "label": "translationStatus",
    "format": "text"
  },
  "text": {
    "label": "text",
    "format": "string"
  },
  "retryable": {
    "label": "retryable",
    "format": "boolean"
  },
  "errorCode": {
    "label": "errorCode",
    "format": "string"
  },
  "errorDetail": {
    "label": "errorDetail",
    "format": "string"
  },
  "reused": {
    "label": "reused",
    "format": "boolean"
  }
}
```

## How it works

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

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

### 2. Start the "YouTube Channel Transcripts for RAG and ChatGPT" task

The YouTube Transcript API — RAG, Markdown, Chapters Actor will start running based on the input automatically. You can also change all the input fields, like video or collection urls, preferred languages, and more, to match your specific use case.

### 3. Receive the "YouTube Channel Transcripts for RAG and ChatGPT" 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 inputindex, videoid, status, 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 Channel Transcripts for RAG and ChatGPT" task via API](https://apify.com/smartlinks/youtube-transcript-api.md).

## FAQ

### What is a chunk?

A window of transcript text (words, characters or estimated tokens) with start/end times and a link to that moment in the video, ready to embed.

### Is the token count exact?

It is an estimate (characters / 4), not a model tokenizer. Use words or characters if you need exact sizing.

### Can I get only new uploads?

Use publishedAfter with a date, or reuse a previous dataset with previousDatasetId so already-fetched videos are skipped and free.

## About this Actor

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