# YouTube transcripts for ChatGPT, LLM and RAG

**Use case:** 

Turn YouTube videos into clean text for ChatGPT, Claude, LLM fine-tuning or RAG pipelines. Each result has the full transcript text plus timestamped segments to chunk, embed and cite back to the exact moment. This example pulls two Andrej Karpathy talks on LLMs. Call it from the Apify API or any MCP client.

## Input

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=zjkBMFhNj_g",
    "https://www.youtube.com/watch?v=kCc8FmEb1nY"
  ],
  "language": "en"
}
```

## Output

```json
{
  "videoId": {
    "label": "Video id",
    "format": "string"
  },
  "title": {
    "label": "Title",
    "format": "string"
  },
  "language": {
    "label": "Language",
    "format": "string"
  },
  "autoGenerated": {
    "label": "Auto generated",
    "format": "boolean"
  },
  "text": {
    "label": "Text",
    "format": "string"
  },
  "error": {
    "label": "Error",
    "format": "string"
  }
}
```

## How it works

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

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

### 2. Start the "YouTube transcripts for ChatGPT, LLM and RAG" task

The YouTube Transcript Scraper API Actor will start running based on the input automatically. You can also change all the input fields, like videos and language, to match your specific use case.

### 3. Receive the "YouTube transcripts for ChatGPT, LLM 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 video id, title, language, 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 transcripts for ChatGPT, LLM and RAG" task via API](https://apify.com/api_harbor/youtube-transcript-scraper.md).

## FAQ

### How do I feed YouTube transcripts to ChatGPT or Claude with this task?

The YouTube transcripts for LLM task returns the full text field, ready to paste into ChatGPT or Claude, or to send through their APIs as context.

### How do I use the output in a RAG pipeline?

The YouTube transcripts for LLM task gives timestamped segments. Chunk and embed them in your vector database, and keep start times to cite the exact moment.

### Can an AI agent call this task through MCP?

The YouTube transcripts for LLM task is callable from Claude, Cursor or ChatGPT through the Apify MCP server at mcp.apify.com with your Apify token.

### Do I need a YouTube account or API key?

No. The YouTube transcripts for LLM task reads public captions, so no login, cookies, YouTube Data API key or Google Cloud quota are needed.

### Can I call it via API, on a schedule or from Make, Zapier or n8n?

The YouTube transcripts for LLM task runs from the Apify API, Python and JavaScript clients, Make, Zapier, n8n or a schedule, and from MCP clients like Claude or Cursor.

### How much does it cost?

The YouTube transcripts for LLM task costs $1 per 1,000 transcripts ($0.001 each) plus $0.00005 per run. Videos without captions return an error row that is never charged.

## About this Actor

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