# Download YouTube subtitles as SRT and VTT files

**Use case:** 

Export YouTube captions as ready-to-use SRT and WebVTT subtitle text, plus the plain transcript and timestamped segments. Use them for video editing, translation, accessibility or reposting clips. The example exports subtitles for two popular TED talks; paste any video, Short, playlist or channel.

## Input

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=arj7oStGLkU",
    "https://www.youtube.com/watch?v=Ks-_Mh1QhMc"
  ],
  "playlistUrls": [],
  "channelUrls": [],
  "maxVideos": 50,
  "channelMode": "latest",
  "publishedAfter": "",
  "publishedBefore": "",
  "language": "",
  "preferManualCaptions": true,
  "fixUrduScript": true,
  "removeNonSpeechTags": false,
  "includeSegments": true,
  "includeMetadata": true,
  "includeSrt": true,
  "includeVtt": true,
  "includeMarkdown": false,
  "includeChunks": false,
  "chunkSizeWords": 300,
  "chunkOverlapWords": 30,
  "maxConcurrency": 10,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

## Output

```json
{
  "videoId": {
    "label": "Video ID",
    "format": "string"
  },
  "title": {
    "label": "Video title",
    "format": "string"
  },
  "language": {
    "label": "Spoken language",
    "format": "string"
  },
  "srt": {
    "label": "SRT subtitles",
    "format": "string"
  },
  "vtt": {
    "label": "WebVTT subtitles",
    "format": "string"
  }
}
```

## How it works

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

The YouTube Transcript API & Scraper Actor is ready to run with the inputs already set for "Download YouTube subtitles as SRT and VTT files". [Sign up or log in](https://console.apify.com/create-task-from-example/nQRg15T58KGGdrMmt) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Download YouTube subtitles as SRT and VTT files" task

The YouTube Transcript API & Scraper Actor will start running based on the input automatically. You can also change all the input fields, like youtube video or shorts urls, youtube playlist urls, and more, to match your specific use case.

### 3. Receive the "Download YouTube subtitles as SRT and VTT files" 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, video title, spoken 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 "Download YouTube subtitles as SRT and VTT files" task via API](https://apify.com/panix/youtube-transcript-scraper.md).

## FAQ

### How do I save the subtitles as .srt files?

Each row of the YouTube subtitles task holds the full SRT and VTT text in the srt and vtt fields. Paste a field into a .srt or .vtt file, or read the dataset through the API and write one file per video.

### Do the subtitles keep YouTube's timing?

The YouTube subtitles task keeps YouTube's own caption timings, so the subtitles line up with the video as they do on YouTube. Music and applause tags can be removed with one option.

### How much does the YouTube subtitles task cost?

The YouTube subtitles task costs $0.003 per video on the Apify Free plan and $0.00275 on Starter, less on bigger plans, plus $0.003 per run. SRT, VTT and the transcript are all included in that price.

## About this Actor

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