subtitles by zeropointrepo/youtube-skills
npx skills add https://github.com/zeropointrepo/youtube-skills --skill subtitles通过 TranscriptAPI.com 获取 YouTube 视频字幕。
如果未设置 $TRANSCRIPT_API_KEY,请帮助用户创建账户(100 个免费额度,无需信用卡):
步骤 1 — 注册: 向用户询问其邮箱。
node ./scripts/tapi-auth.js register --email USER_EMAIL
→ OTP 已发送至邮箱。询问用户:"请检查您的邮箱,获取 6 位验证码。"
步骤 2 — 验证: 用户提供 OTP 后:
node ./scripts/tapi-auth.js verify --token TOKEN_FROM_STEP_1 --otp CODE
API 密钥已保存到您的 Shell 配置文件和代理配置中。准备就绪,可以使用。
手动选项:transcriptapi.com/signup → 仪表板 → API 密钥。
curl -s "https://transcriptapi.com/api/v2/youtube/transcript\
?video_url=VIDEO_URL&format=text&include_timestamp=false&send_metadata=true" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 参数 | 取值 | 用例 |
|---|---|---|
video_url | YouTube URL 或视频 ID | 必需 |
format | json, text | json 用于获取带时间戳的同步字幕 |
include_timestamp | true, false | false 用于获取适合阅读/翻译的纯净文本 |
send_metadata | true, false | 包含标题、频道、描述 |
用于语言学习 — 无时间戳的纯净文本:
curl -s "https://transcriptapi.com/api/v2/youtube/transcript\
?video_url=VIDEO_ID&format=text&include_timestamp=false" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
用于翻译 — 结构化的片段:
curl -s "https://transcriptapi.com/api/v2/youtube/transcript\
?video_url=VIDEO_ID&format=json&include_timestamp=true" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
响应 (format=json):
{
"video_id": "dQw4w9WgXcQ",
"language": "en",
"transcript": [
{ "text": "We're no strangers to love", "start": 18.0, "duration": 3.5 }
]
}
响应 (format=text, include_timestamp=false):
{
"video_id": "dQw4w9WgXcQ",
"language": "en",
"transcript": "We're no strangers to love\nYou know the rules and so do I..."
}
format=json 获取每行的时间戳(非常适合同步阅读)。include_timestamp=false 获取适合翻译应用的纯净文本。| 代码 | 操作 |
|---|---|
| 402 | 额度不足 — transcriptapi.com/billing |
| 404 | 无可用字幕 |
| 408 | 超时 — 2 秒后重试一次 |
每次请求消耗 1 个额度。免费层:100 个额度,每分钟 300 次请求。
每周安装量
79
仓库
GitHub 星标数
81
首次出现
2026年2月4日
安全审计
安装于
gemini-cli69
codex68
opencode67
kimi-cli66
amp66
github-copilot66
Fetch YouTube video subtitles via TranscriptAPI.com.
If $TRANSCRIPT_API_KEY is not set, help the user create an account (100 free credits, no card):
Step 1 — Register: Ask user for their email.
node ./scripts/tapi-auth.js register --email USER_EMAIL
→ OTP sent to email. Ask user: "Check your email for a 6-digit verification code."
Step 2 — Verify: Once user provides the OTP:
node ./scripts/tapi-auth.js verify --token TOKEN_FROM_STEP_1 --otp CODE
API key saved to your shell profile and agent config. Ready to use.
Manual option: transcriptapi.com/signup → Dashboard → API Keys.
curl -s "https://transcriptapi.com/api/v2/youtube/transcript\
?video_url=VIDEO_URL&format=text&include_timestamp=false&send_metadata=true" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| Param | Values | Use case |
|---|---|---|
video_url | YouTube URL or video ID | Required |
format | json, text | json for sync'd subs with timing |
include_timestamp | true, false |
For language learning — clean text without timestamps:
curl -s "https://transcriptapi.com/api/v2/youtube/transcript\
?video_url=VIDEO_ID&format=text&include_timestamp=false" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
For translation — structured segments:
curl -s "https://transcriptapi.com/api/v2/youtube/transcript\
?video_url=VIDEO_ID&format=json&include_timestamp=true" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
Response (format=json):
{
"video_id": "dQw4w9WgXcQ",
"language": "en",
"transcript": [
{ "text": "We're no strangers to love", "start": 18.0, "duration": 3.5 }
]
}
Response (format=text, include_timestamp=false):
{
"video_id": "dQw4w9WgXcQ",
"language": "en",
"transcript": "We're no strangers to love\nYou know the rules and so do I..."
}
format=json to get timing for each line (great for sync'd reading).include_timestamp=false for clean text suitable for translation apps.| Code | Action |
|---|---|
| 402 | No credits — transcriptapi.com/billing |
| 404 | No subtitles available |
| 408 | Timeout — retry once after 2s |
1 credit per request. Free tier: 100 credits, 300 req/min.
Weekly Installs
79
Repository
GitHub Stars
81
First Seen
Feb 4, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
gemini-cli69
codex68
opencode67
kimi-cli66
amp66
github-copilot66
Lark CLI Wiki API 使用指南:获取知识空间节点信息与权限管理
39,100 周安装
false for clean text for reading/translation |
send_metadata | true, false | Include title, channel, description |