Extract closed captions and subtitles from YouTube videos. Use when the user asks for captions, closed captions, CC, accessibility text, or wants to read what was said in a video. Supports timestamps and multiple languages. Great for deaf/HoH accessibility, content review, quoting, and translation.
通过 TranscriptAPI.com 从 YouTube 视频中提取隐藏式字幕。
如果未设置 $TRANSCRIPTAPIKEY,请帮助用户创建账户(100 个免费额度,无需银行卡):
步骤 1 — 注册: 询问用户的邮箱。
bash
node ./scripts/tapi-auth.js register --email 用户邮箱
→ 验证码已发送至邮箱。询问用户:请检查您的邮箱,获取 6 位验证码。
步骤 2 — 验证: 用户提供验证码后:
bash
node ./scripts/tapi-auth.js verify --token 步骤1的令牌 --otp 验证码
API 密钥已保存至 ~/.openclaw/openclaw.json。详情请参阅下方 文件写入 部分。修改前会对现有文件进行备份。
手动操作:transcriptapi.com/signup → 控制台 → API 密钥。
验证和保存密钥命令会将 API 密钥保存至 ~/.openclaw/openclaw.json(设置 skills.entries.transcriptapi.apiKey 和 enabled: true)。修改前,现有文件会备份至 ~/.openclaw/openclaw.json.bak。
如需在代理之外的终端/命令行中使用 API 密钥,请手动将其添加到您的 shell 配置文件中:
export TRANSCRIPTAPIKEY=<您的密钥>
bash
curl -s https://transcriptapi.com/api/v2/youtube/transcript\
?videourl=视频URL&format=json&includetimestamp=true&send_metadata=true \
-H Authorization: Bearer $TRANSCRIPTAPIKEY
| 参数 | 必需 | 默认值 | 值 |
|---|---|---|---|
| video_url | 是 | — | YouTube URL 或视频 ID |
| format |
响应(format=json — 最适合无障碍/时间分析):
json
{
video_id: dQw4w9WgXcQ,
language: en,
transcript: [
{ text: Were no strangers to love, start: 18.0, duration: 3.5 },
{ text: You know the rules and so do I, start: 21.5, duration: 2.8 }
],
metadata: { title: ..., authorname: ..., thumbnailurl: ... }
}
响应(format=text — 可读格式):
json
{
video_id: dQw4w9WgXcQ,
language: en,
transcript: [00:00:18] Were no strangers to love\n[00:00:21] You know the rules...
}
| 状态码 | 含义 | 操作 |
|---|---|---|
| 402 | 无额度 | transcriptapi.com/billing |
| 404 |
每次请求消耗 1 个额度。免费套餐:100 个额度,每分钟 300 次请求。
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 captions-1776374590 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 captions-1776374590 技能
skillhub install captions-1776374590
文件大小: 6.08 KB | 发布时间: 2026-4-17 13:59