# Extract YouTube Video Transcripts To Text

**Use case:** 

Extract timestamped captions and full text from YouTube videos to build training datasets for AI models and RAG pipelines. Returns full_text, duration_seconds, and transcript_language. Modify the videoUrls input array and outputFormat to adapt the task for your custom corpus.

## Input

```json
{
  "mode": "videos",
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/9bZkp7q19f0"
  ],
  "maxVideosPerChannel": 50,
  "maxVideosPerPlaylist": 50,
  "language": "en",
  "includeAutoGenerated": true,
  "useWhisper": true,
  "whisperModel": "base",
  "includeWordTimings": false,
  "proxyCountry": "US",
  "outputFormat": "text_only"
}
```

## Output

```json
{
  "video_id": {
    "label": "Video id"
  },
  "canonicalUrl": {
    "label": "Canonical url"
  },
  "title": {
    "label": "Title"
  },
  "channel_name": {
    "label": "Channel name"
  },
  "channel_id": {
    "label": "Channel id"
  },
  "channelHandle": {
    "label": "Channel handle"
  },
  "publishedAt": {
    "label": "Published at"
  },
  "full_text": {
    "label": "Full text"
  },
  "transcript_language": {
    "label": "Transcript language"
  },
  "transcript_language_name": {
    "label": "Transcript language name"
  },
  "is_auto_generated": {
    "label": "Is auto generated"
  },
  "was_translated": {
    "label": "Was translated"
  },
  "segment_count": {
    "label": "Segment count"
  },
  "duration_seconds": {
    "label": "Duration seconds"
  },
  "views": {
    "label": "Views"
  },
  "published_date": {
    "label": "Published date"
  },
  "segments": {
    "label": "Segments"
  },
  "wordTimings": {
    "label": "Word timings"
  },
  "srt": {
    "label": "Srt"
  },
  "vtt": {
    "label": "Vtt"
  },
  "available_languages": {
    "label": "Available languages"
  },
  "captionTracks": {
    "label": "Caption tracks"
  },
  "chapters": {
    "label": "Chapters"
  },
  "heatmap": {
    "label": "Heatmap"
  },
  "transcript_source": {
    "label": "Transcript source"
  },
  "transcript_available": {
    "label": "Transcript available"
  },
  "accessStatus": {
    "label": "Access status"
  },
  "success": {
    "label": "Success"
  },
  "errorCode": {
    "label": "Error code"
  },
  "inputUrl": {
    "label": "Input url"
  },
  "scrapedAt": {
    "label": "Scraped at"
  }
}
```

## How it works

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

The YouTube Caption & Whisper AI Transcript Extractor Actor is ready to run with the inputs already set for "Extract YouTube Video Transcripts To Text". [Sign up or log in](https://console.apify.com/create-task-from-example/Xx7cIX66ASU6ZJ2uY) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Extract YouTube Video Transcripts To Text" task

The YouTube Caption & Whisper AI Transcript Extractor Actor will start running based on the input automatically. You can also change all the input fields, like mode, video urls, and more, to match your specific use case.

### 3. Receive the "Extract YouTube Video Transcripts To Text" 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, canonical url, title, 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 "Extract YouTube Video Transcripts To Text" task via API](https://apify.com/nimbryxo-studio/youtube-caption-and-whisper-ai-transcript.md).

## About this Actor

This example demonstrates how to use [YouTube Caption & Whisper AI Transcript Extractor](https://apify.com/nimbryxo-studio/youtube-caption-and-whisper-ai-transcript.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/nimbryxo-studio/youtube-caption-and-whisper-ai-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/nimbryxo-studio/youtube-caption-and-whisper-ai-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`).
