Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →YouTube: transcripts, audio/video downloads (yt-dlp, transcript-api)
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 129% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-15 | ✓→✓ | = Same ✓ | 2% | 0% |
| case-20 | ✓→✓ | = Same ✓ | 94% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 52% | 0% |
Extract transcripts, download audio or video, and retrieve metadata from YouTube using youtube-transcript-api (Python) and yt-dlp.
powershellpip install youtube-transcript-api pip install yt-dlp # Verify yt-dlp --version
pythonfrom youtube_transcript_api import YouTubeTranscriptApi video_id = "dQw4w9WgXcQ" # from youtube.com/watch?v=<id> transcript = YouTubeTranscriptApi.get_transcript(video_id) text = " ".join(entry["text"] for entry in transcript) print(text[:2000])
pythonfrom youtube_transcript_api import YouTubeTranscriptApi video_id = "dQw4w9WgXcQ" # Try English first, then auto-generated transcript = YouTubeTranscriptApi.get_transcript(video_id, languages=["en", "en-US"]) text = " ".join(entry["text"] for entry in transcript)
pythonfrom youtube_transcript_api import YouTubeTranscriptApi video_id = "dQw4w9WgXcQ" transcript_list = YouTubeTranscriptApi.list_transcripts(video_id) for t in transcript_list: print(t.language, t.language_code, "auto-generated:", t.is_generated)
powershell$videoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ" yt-dlp -x --audio-format mp3 -o "%(title)s.%(ext)s" $videoUrl
powershell$videoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ" yt-dlp -f "bestvideo+bestaudio" --merge-output-format mp4 -o "%(title)s.%(ext)s" $videoUrl
powershell# List available formats first yt-dlp -F $videoUrl # Download 720p yt-dlp -f "bestvideo[height<=720]+bestaudio" --merge-output-format mp4 -o "%(title)s.%(ext)s" $videoUrl
powershellyt-dlp --dump-json --no-download $videoUrl | python -m json.tool | Select-String -Pattern '"title"|"duration"|"view_count"|"upload_date"'
powershell$playlistUrl = "https://www.youtube.com/playlist?list=PLxxxxxx" yt-dlp -x --audio-format mp3 -o "%(playlist_index)s-%(title)s.%(ext)s" $playlistUrl
"Get me the transcript of this YouTube tutorial so I can read it" → Use step 2 — extract video ID from URL and call get_transcript.
"Download the audio from this podcast episode on YouTube" → Use step 5 with the video URL to download as MP3.
"What languages are available for transcripts on this video?" → Use step 4 to list available transcript languages.
youtube-transcript-api only works for videos that have transcripts (manual or auto-generated)yt-dlp -U to updateOther measured skills in the registry, with their headline benchmark lift.