360 Secure SkillHub
360 安全技能中心

YouTube Transcript

该 Skill 调用 FetchProof API 获取 YouTube 视频、Shorts 或频道最新视频的字幕转录,支持纯文本、时间戳和 JSON 分块输出,可选标题、频道、播放量和时长等元数据,适合摘要、引用、笔记和索引场景。

分类:效率
slurpsyrup
slurpsyrup
热度 28.89
最近更新 2026-12-02 12:28:41

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add slurpsyrup/youtube-transcript
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
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

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.