---
title: "Extract subtitles from YouTube videos"
description: "\"Download just the English subtitles from this YouTube video as an SRT file, without downloading the video itself.\""
canonical: "https://hub.ironclaw.com/usecases/extract-subtitles-from-youtube-videos"
markdown: "https://hub.ironclaw.com/usecases/extract-subtitles-from-youtube-videos.md"
type: "use-case"
categories: ["Research","Files / knowledge","Automation"]
author: "mr.potato"
---

# Extract subtitles from YouTube videos

## Example Prompt

> "Download just the English subtitles from this YouTube video as an SRT file, without downloading the video itself."

## What the Agent Does

Uses yt-dlp to pull subtitle tracks from YouTube (and thousands of other video platforms) without downloading the video. Supports both manually uploaded subtitles and YouTube's auto-generated captions. The agent accepts a video URL and outputs a subtitle file in the format and language the user specifies.

Users can control:
- **Language** — any language code (e.g. `en`, `es`, `ja`), or grab all available tracks at once
- **Format** — SRT, VTT, or ASS/SSA
- **Caption type** — prefer manual subtitles, fall back to auto-generated, or request auto-generated only
- **Timestamp stripping** — output clean plain text for use in notes, RAG pipelines, or summaries

Common workflow: extract subtitles → feed the SRT into a downstream agent step (summarize, translate, search by keyword, or index for retrieval).

Install with `pip install yt-dlp`. No API key or account required for public videos.

## Skills and Tools

- yt-dlp
- File write

## Categories

- Research
- Files / knowledge
- Automation

## Links

- [HTML page](https://hub.ironclaw.com/usecases/extract-subtitles-from-youtube-videos)
- [Source](https://github.com/yt-dlp/yt-dlp)

