---
title: "Download YouTube Subtitles as SRT or VTT | FetchTranscript"
description: "Download the subtitles of a YouTube video as SRT, VTT or text, pick the language, tell manual captions from auto-generated ones, and batch it with code."
url: "https://fetchtranscript.com/blog/download-youtube-subtitles"
markdown: "https://fetchtranscript.com/blog/download-youtube-subtitles.md"
---

YouTube

# How to Download YouTube Subtitles as SRT or VTT

Download the subtitles of a YouTube video as SRT, VTT or text, pick the language, tell manual captions from auto-generated ones, and batch it with code.

By FetchTranscript team Published September 8, 2026 Updated November 25, 2026 5 min read

To download the subtitles of a YouTube video as SRT, request its caption track with `format=srt` and save the `text` field of the answer to a `.srt` file; use `format=vtt` for WebVTT or `format=text` for a plain transcript. YouTube's own player has no download button for captions, so you need either a tool such as yt-dlp or an API. This guide explains the formats, how to choose a language, how to tell manual captions from auto-generated ones, and how to download subtitles for many videos at once.

## SRT, VTT or plain text?

The three formats carry the same words and timings; what differs is what reads them.

| Format       | Looks like                                       | Best for                                                                      |
| ------------ | ------------------------------------------------ | ----------------------------------------------------------------------------- |
| SRT (SubRip) | numbered cues, `00:00:18,640 --> 00:00:21,880`   | video editors (Premiere, DaVinci Resolve, CapCut), VLC, re-uploading captions |
| WebVTT       | `WEBVTT` header, `00:00:18.640 --> 00:00:21.880` | HTML5 `<track>` elements, web players, streaming                              |
| Plain text   | the words only                                   | reading, search, summaries, language models                                   |
| Timed JSON   | segments with `start` and `duration`             | your own code: clickable transcripts, alignment                               |

An SRT file looks like this:

```text
1
00:00:18,640 --> 00:00:21,880
We're no strangers to love

2
00:00:22,640 --> 00:00:26,960
You know the rules and so do I
```

WebVTT is nearly identical, with a `WEBVTT` line on top and a dot instead of a comma before the milliseconds. If you have one you can convert it to the other, but it is simpler to ask for the format you need.

## Manual and auto-generated subtitles

A YouTube video can have two kinds of caption tracks, and they are not equally good:

- **Manual subtitles** are uploaded by the creator or written in YouTube Studio. They are punctuated and usually timed to sentences.
- **Auto-generated subtitles** come from YouTube's speech recognition. They exist for most videos in supported languages, but often lack punctuation, misspell names and split lines at arbitrary points.

When you do not specify a language, FetchTranscript returns the video's original language, choosing its manual track if there is one and the automatic one otherwise. Without `lang` it never gives you a machine translation. Every answer says which kind you got in `is_generated`, so you can flag auto-generated files for review before publishing them.

## Download one subtitle file with curl

You need a free API key from [the sign-up page](https://fetchtranscript.com/auth/sign-up) (100 calls a month free). Then:

```bash
curl -s -H "X-API-Key: yt_your_api_key" \
  "https://api.fetchtranscript.com/v1/transcripts/dQw4w9WgXcQ?format=srt&lang=en" \
  | jq -r '.text' > dQw4w9WgXcQ.en.srt
```

The response is JSON, with the subtitle file inside the `text` field, next to `language`, `is_generated` and the video's `metadata` (title, channel, length). `jq -r` writes it out as a raw file. Replace `format=srt` with `format=vtt` for WebVTT.

If you only need one or two files and no code, the [free transcript generator](https://fetchtranscript.com/youtube-transcript-generator.md) downloads them from the browser.

## Download subtitles in Python

```python
import os
import requests

API = "https://api.fetchtranscript.com/v1"
HEADERS = {"X-API-Key": os.environ["FETCHTRANSCRIPT_API_KEY"]}

def download_subtitles(video_id: str, fmt: str = "srt", lang: str | None = None) -> str:
    params = {"format": fmt, **({"lang": lang} if lang else {})}
    r = requests.get(f"{API}/transcripts/{video_id}", headers=HEADERS, params=params, timeout=60)
    if r.status_code == 404:
        print(video_id, "->", r.json()["detail"]["error"])
        return ""
    r.raise_for_status()
    data = r.json()
    path = f'{video_id}.{data["language"]}.{fmt}'
    with open(path, "w", encoding="utf-8") as f:
        f.write(data["text"])
    kind = "auto-generated" if data["is_generated"] else "manual"
    print(f"saved {path} ({kind})")
    return path

download_subtitles("dQw4w9WgXcQ", "srt", "en")
download_subtitles("dQw4w9WgXcQ", "vtt")
```

Note the `encoding="utf-8"`: subtitles in Japanese, Arabic or any accented language will break with the platform default encoding on Windows. With the Python SDK the same is one line, `client.transcripts.get_srt("dQw4w9WgXcQ", lang="en")` (also `get_vtt` and `get_text`), as shown in [How to get a YouTube transcript with Python](https://fetchtranscript.com/blog/get-youtube-transcript-python.md).

## Download subtitles in JavaScript

In Node.js 18 or later, `fetch` is built in:

```javascript
// Node 18+ as an ES module (a .mjs file, or "type": "module"), for the top-level await
import { writeFile } from "node:fs/promises";

async function downloadSubtitles(videoId, format = "srt", lang) {
  const url = new URL(`https://api.fetchtranscript.com/v1/transcripts/${videoId}`);
  url.searchParams.set("format", format);
  if (lang) url.searchParams.set("lang", lang);
  const res = await fetch(url, { headers: { "X-API-Key": process.env.FETCHTRANSCRIPT_API_KEY } });
  const body = await res.json();
  if (!res.ok) throw new Error(`${videoId}: ${body.detail.error}`);
  const file = `${videoId}.${body.language}.${format}`;
  await writeFile(file, body.text, "utf8");
  return file;
}

console.log(await downloadSubtitles("dQw4w9WgXcQ", "vtt", "en"));
```

## Which languages does a video have?

Before downloading a specific language, check what exists:

```bash
curl -s -H "X-API-Key: yt_your_api_key" \
  "https://api.fetchtranscript.com/v1/transcripts/dQw4w9WgXcQ/languages"
```

```json
{
  "video_id": "dQw4w9WgXcQ",
  "languages": [
    { "language_code": "en", "language": "English", "is_generated": false, "is_translatable": true }
  ]
}
```

Each track has its `language_code` (what you pass as `lang`), the language name, whether it is auto-generated, and whether YouTube can translate it. A video with a manual English track and an automatic one lists both. Asking for a language the video has no track in can return YouTube's automatic translation of the original track, the one its player offers when `is_translatable` is true; when no track can serve that language the answer is 404 `no_transcript_found`, and it costs nothing. The [Subtitles API page](https://fetchtranscript.com/youtube-subtitles-api.md) lets you try the language listing on any video without an account.

## Downloading subtitles for many videos

For a course, a channel archive or a dataset, loop over the IDs and run a few requests in parallel. The rate limit is 500 requests per minute, and each subtitle file costs one credit whatever the format:

```python
from concurrent.futures import ThreadPoolExecutor

video_ids = ["dQw4w9WgXcQ", "9bZkp7q19f0", "kJQP7kiw5Fk"]
with ThreadPoolExecutor(max_workers=8) as pool:
    files = list(pool.map(lambda v: download_subtitles(v, "srt"), video_ids))
print(len([f for f in files if f]), "files saved")
```

To get the IDs of a whole channel or playlist first, see [How to get all videos from a YouTube channel](https://fetchtranscript.com/blog/get-all-videos-from-youtube-channel.md) and [How to export a YouTube playlist](https://fetchtranscript.com/blog/export-youtube-playlist.md).

## Building your own subtitle file from segments

Sometimes neither SRT nor VTT is exactly what you need: a burned-in caption style with at most two lines, a shifted start because you trimmed the intro of the video, or one file per chapter. In those cases ask for `format=json` once and build the file yourself. Each segment has `text`, `start` and `duration` in seconds, so the end of a cue is `start + duration`:

```python
def to_srt_time(seconds: float) -> str:
    ms = int(round(seconds * 1000))
    h, ms = divmod(ms, 3_600_000)
    m, ms = divmod(ms, 60_000)
    s, ms = divmod(ms, 1000)
    return f"{h:02}:{m:02}:{s:02},{ms:03}"

def segments_to_srt(segments, offset: float = 0.0) -> str:
    cues = []
    for i, seg in enumerate(segments, start=1):
        start = max(seg["start"] - offset, 0)
        end = max(seg["start"] + seg["duration"] - offset, 0)
        cues.append(f"{i}\n{to_srt_time(start)} --> {to_srt_time(end)}\n{seg['text']}\n")
    return "\n".join(cues)
```

Passing `offset=12.5` shifts every cue 12.5 seconds earlier, which is what you need after cutting the first 12.5 seconds of the video. The same loop with a dot instead of a comma and a `WEBVTT` header gives a WebVTT file.

## What can go wrong

- **`transcripts_disabled` (404)**: the owner turned captions off. There is nothing to download; the call is free.
- **`no_transcript_found` (404)**: no track can serve that language. Call again without `lang` to get the original language.
- **`video_unavailable` (404)**: private, age-restricted, members-only or removed videos cannot be read.
- **`rate_limit_exceeded` (429)**: you went over 500 requests per minute. Wait for the number of seconds in the `Retry-After` header.
- **Overlapping lines in auto-generated files**: automatic captions are cut into short, sometimes overlapping cues. That is how YouTube produces them; most players handle it, but if you burn subtitles into a video, review the timing first.

The complete list of error codes is in the [errors reference](https://fetchtranscript.com/docs/errors.md).

## Free alternatives

If you prefer a command-line tool and you run it from your own computer, [yt-dlp](https://github.com/yt-dlp/yt-dlp) can download subtitles without the video:

```bash
yt-dlp --skip-download --write-subs --write-auto-subs --sub-langs en --sub-format vtt \
  "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
```

`--write-subs` saves manual tracks and `--write-auto-subs` the automatic ones. It is free and powerful; the limits appear when you run it on servers, where YouTube blocks many cloud IP addresses, and at volume, where you have to manage proxies and retries yourself. Our comparison of [youtube-transcript-api alternatives](https://fetchtranscript.com/blog/youtube-transcript-api-alternative.md) goes into that trade-off. The official YouTube Data API is not an option for other people's videos: its caption download only works for videos you own, as explained in [Can the YouTube Data API get transcripts?](https://fetchtranscript.com/blog/youtube-data-api-transcript.md).

Remember that subtitles are part of the creator's work: downloading them for accessibility, research or your own analysis is common, but republishing someone else's captions may need their permission.

## Frequently asked questions

### Can I download YouTube subtitles without the video?

Yes. The API returns only the caption track, as SRT, WebVTT, plain text or timed JSON; no audio or video is downloaded.

### How do I get English subtitles for a video in another language?

Pass `lang=en`. If the video has an English track (manual or auto-generated) you get it; if not, you can get YouTube's automatic translation of the original track, as its player shows it. Check `/languages` first when you need to know which of the two it is: a translation is not listed there as an English track.

### Why are some subtitles all lowercase without punctuation?

They are auto-generated. The response's `is_generated` is `true` for them. Manual tracks, when the video has one, are returned first when you do not set a language.

### Does each format cost a separate call?

Each request costs one credit, whatever the format, and failed requests cost nothing. If you need both SRT and VTT, either make two calls or fetch the JSON segments once and build both files yourself.

### Can I upload the downloaded SRT file to my own video?

Yes, YouTube Studio and most video platforms accept SRT and WebVTT files. If the captions belong to someone else's video, make sure you have the right to reuse them.

Try it on your own videos

100 free calls every month, no credit card. Then $1 per 1,000 calls, only for the calls that succeed.

[Get your free API key](https://fetchtranscript.com/auth/sign-up)[Read the docs](https://fetchtranscript.com/docs.md)

## Related guides

- [How to Get a YouTube Transcript with Python](https://fetchtranscript.com/blog/get-youtube-transcript-python.md)

  Fetch the transcript of any YouTube video in Python: timestamps, plain text and SRT, languages, errors and batches, with requests or the official SDK.

- [YouTube Transcripts for RAG: Chunking and Embeddings](https://fetchtranscript.com/blog/youtube-transcripts-for-rag.md)

  Turn YouTube videos into a searchable knowledge base: timestamped transcript chunks, chunk size and overlap, embeddings and citations to the exact second.

- [Can the YouTube Data API Get Transcripts? Not Really](https://fetchtranscript.com/blog/youtube-data-api-transcript.md)

  Why captions.download of the official YouTube Data API v3 only works for your own videos, what the quota costs, and how to get any public video’s transcript.

[← All articles](https://fetchtranscript.com/blog.md)
