youtube-transcript

Fetches YouTube video titles and English caption transcripts as JSON via yt-dlp.

Updated Aug 19, 2025
One-click install
npx skills add https://github.com/loganmancuso-scout/dotfiles --skill youtube-transcript-loganmancuso-scout
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: youtube-transcript
Source: https://github.com/loganmancuso-scout/dotfiles/tree/main/dot_pi/agent/skills/youtube-transcript
Command: npx skills add https://github.com/loganmancuso-scout/dotfiles --skill youtube-transcript-loganmancuso-scout

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires yt-dlp.

What problem does it solve? Getting the spoken content of a YouTube video normally requires watching it or manually copying captions. This Skill programmatically retrieves a video's title and full English transcript so you can analyze, summarize, quote, or search the content directly. ## Core Features & Use Cases - Transcript Extraction: Downloads English captions via yt-dlp, preferring manual subtitles and falling back to auto-generated ones. - Structured JSON Output: Returns the video title and full plain-text transcript (timing stripped) as a single JSON object on stdout. - Use Case: Given a YouTube lecture URL, fetch its transcript and feed the text into a summarization or quoting workflow without watching the video. ## Quick Start Fetch the transcript of this YouTube video and summarize its main points: https://www.youtube.com/watch?v=example

Frequently Asked Questions about youtube-transcript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get a YouTube video transcript from the command line?

Run the fetch_transcript.py script with the video URL: it uses yt-dlp to download English captions and prints a JSON object containing the video title and full transcript text to stdout.

How to download YouTube subtitles with yt-dlp?

yt-dlp downloads subtitles with --write-subs for manual captions or --write-auto-subs for auto-generated ones, combined with --sub-langs and --sub-format. This script uses the json3 format and extracts plain text from it.

Does this work for non-English YouTube videos?

No, only English captions are attempted, in the order en, en-US, en-GB, then any en* variant. Videos without English captions cause the script to exit non-zero with an error message on stderr.

Why does transcript fetching fail for some YouTube videos?

Failures occur when the video has no English captions, captions are disabled, the URL is invalid, or a network error occurs. The script logs the reason to stderr and exits with a non-zero status.

Are the transcripts timestamped?

No, the transcript is plain text with all timing and formatting stripped, returned as a single string. Manual captions are preferred over auto-generated ones when both are available.