Download the exact captured file
---
name: youtube-transcript
version: "0.1.0"
description: "Get the transcript of any YouTube video, Short, or a channel's latest uploads as plain text, timestamped lines, or RAG-ready JSON chunks, with optional title, channel, views, and length. Use when the user pastes a YouTube link and wants the transcript, a summary, quotes, or notes, or wants to research or index what a channel has been saying."
argument-hint: 'youtube-transcript https://youtu.be/dQw4w9WgXcQ | youtube-transcript @mkbhd --latest 5 | youtube-transcript URL --format chunks'
allowed-tools: Bash, Read
primaryEnv: FETCHPROOF_API_KEY
homepage: https://github.com/fetchproof/skill
repository: https://github.com/fetchproof/skill
license: MIT
user-invocable: true
metadata:
openclaw:
emoji: "📝"
primaryEnv: FETCHPROOF_API_KEY
requires:
env:
- FETCHPROOF_API_KEY
bins:
- python3
files:
- "scripts/*"
tags:
- youtube
- transcripts
- captions
- rag
- research
- summarization
---
# youtube-transcript
Input: a YouTube video URL or id, a Shorts link, or a channel `@handle` / URL. Output: the transcript in one of four formats. A video costs 1 credit (0 if it has no captions). A channel costs 1 credit for the video list plus 1 per transcript.
## Run it
```bash
python3 scripts/youtube_transcript.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" # plain text
python3 scripts/youtube_transcript.py "https://youtu.be/dQw4w9WgXcQ" --format timestamped
python3 scripts/youtube_transcript.py URL --meta # title, channel, views, length (+1 credit)
python3 scripts/youtube_transcript.py @mkbhd --latest 5 # a channel's 5 newest videos
python3 scripts/youtube_transcript.py URL --format chunks --chunk-words 300 # JSON lines for embeddings
python3 scripts/youtube_transcript.py URL --language es
```
`FETCHPROOF_API_KEY` must be set. If it isn't, tell the user they can get a key with 100 free credits at https://app.fetchproof.com and stop.
The transcript goes to stdout. A one-line credit summary and any per-video errors go to stderr.
## API
- Base URL: `https://api.fetchproof.com`, header `x-api-key`.
- `GET /v1/youtube/video/transcript?url=<video>&language=<code>`: returns segments with `startMs`/`endMs` and the full text. Empty transcripts cost 0.
- `GET /v1/youtube/video?url=<video>`: metadata, only with `--meta`.
- `GET /v1/youtube/channel-videos?handle=<handle>&sort=latest`: the channel's recent uploads.
## How to use the output
- If the user asked for a summary or notes, read the text and answer from it. Quote with timestamps (`--format timestamped`) so they can jump to the moment.
- For "what does this channel talk about", run `--latest 5` and compare across videos. Don't summarize each one separately unless they ask.
- `--format chunks` writes one JSON object per line with `video_id`, `url`, `title`, `start`, `start_ms`, `end_ms` and `text`. You can pass it straight to an embedding or vector-store step.
- If a video has no captions, say so. Don't guess the content from the title.