How to download YouTube subtitles as SRT or VTT
Checked on 2026-11-18.
SRT and WebVTT are the two subtitle formats video editors and web players understand. Here are two ways to get a YouTube video's captions in either format without downloading the video.
1. yt-dlp on your own computer
# WebVTT
yt-dlp --skip-download --write-subs --write-auto-subs --sub-langs en --sub-format vtt "https://www.youtube.com/watch?v=jNQXAC9IVRw"
# SRT (converted with ffmpeg, which must be installed)
yt-dlp --skip-download --write-subs --write-auto-subs --sub-langs en --convert-subs srt "https://www.youtube.com/watch?v=jNQXAC9IVRw"--write-subs takes captions the uploader added and --write-auto-subs takes YouTube's automatic ones. The file lands next to where you ran the command. This is the simplest route for a handful of videos on your own machine; from cloud servers YouTube often refuses these requests.
2. One HTTP request, from anywhere
The Pipefetch transcript endpoint returns a complete subtitle file in its text field when you set format to srt or vtt.
import os
import requests
res = requests.get(
"https://pipefetch.com/v1/youtube/transcript",
params={"video": "jNQXAC9IVRw", "format": "srt", "lang": "en"},
headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
timeout=90,
)
res.raise_for_status()
with open("subtitles.srt", "w", encoding="utf-8") as f:
f.write(res.json()["data"]["text"])Leave out lang to get the video's original language, and read availableLanguages in the answer to see which others exist. A request costs 1 credit, a video without captions costs nothing, and a new account has 100 free credits. See the reference.
Uploaded or automatic captions?
Both routes prefer captions the uploader added and fall back to YouTube's automatic ones. Automatic captions have no punctuation to speak of and make mistakes with names, so check them before you publish. The API tells you which kind you received in isAutoGenerated.
A note on reuse
Captions are part of the video's content. Downloading them for analysis, search or your own viewing is one thing; republishing someone else's subtitles is another, and needs the owner's permission.
Try it with 100 free credits. No card, no Google Cloud project, no OAuth. Get an API key or read the docs.