Full TranscriptAPI toolkit — fetch YouTube transcripts, search videos and channels, browse channel uploads, get latest videos, and explore playlists. Use when the user wants to work with YouTube content programmatically, get transcripts for summarization or analysis, find videos, or monitor channels. Triggers on YouTube URLs, "transcript", "transcriptapi", "video summary", "what did they say", "find videos about", "search youtube".
通过 TranscriptAPI.com 获取完整的 YouTube 数据工具包。字幕、搜索、频道、播放列表——一个 API 密钥即可。
如果未设置 $TRANSCRIPTAPIKEY,请帮助用户创建账户(100 个免费积分,无需银行卡):
第 1 步 — 注册: 询问用户的邮箱。
bash
node ./scripts/tapi-auth.js register --email USER_EMAIL
→ 一次性密码(OTP)已发送至邮箱。请询问用户:请检查您的邮箱,获取 6 位验证码。
第 2 步 — 验证: 用户提供一次性密码后:
bash
node ./scripts/tapi-auth.js verify --token TOKENFROMSTEP_1 --otp CODE
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=
完整的 OpenAPI 规范:transcriptapi.com/openapi.json — 请查阅此文档以获取最新参数和模式。
所有请求:-H Authorization: Bearer $TRANSCRIPTAPIKEY
频道端点接受 channel 参数——可以是 @handle、频道 URL 或 UC... ID。无需预先解析。播放列表端点接受 playlist 参数——可以是播放列表 URL 或 ID。
bash
curl -s https://transcriptapi.com/api/v2/youtube/transcript\
?videourl=VIDEOURL&format=text&includetimestamp=true&sendmetadata=true \
-H Authorization: Bearer $TRANSCRIPTAPIKEY
| 参数 | 必填 | 默认值 | 验证 |
|---|---|---|---|
| video_url | 是 | — | YouTube URL 或 11 字符视频 ID |
| format |
接受:https://youtube.com/watch?v=ID、https://youtu.be/ID、youtube.com/shorts/ID 或纯 ID。
响应(format=json):
json
{
video_id: dQw4w9WgXcQ,
language: en,
transcript: [
{ text: Were no strangers..., start: 18.0, duration: 3.5 }
],
metadata: { title: ..., authorname: ..., authorurl: ... }
}
bash
curl -s https://transcriptapi.com/api/v2/youtube/search?q=QUERY&type=video&limit=20 \
-H Authorization: Bearer $TRANSCRIPTAPIKEY
| 参数 | 必填 | 默认值 | 验证 |
|---|---|---|---|
| q | 是 | — | 1-200 字符(修剪后) |
| type |
响应(type=video):
json
{
results: [
{
type: video,
videoId: dQw4w9WgXcQ,
title: Rick Astley - Never Gonna Give You Up,
channelId: UCuAXFkgsw1L7xaCfnd5JJOw,
channelTitle: Rick Astley,
channelHandle: @RickAstley,
channelVerified: true,
lengthText: 3:33,
viewCountText: 1.5B views,
publishedTimeText: 14 years ago,
hasCaptions: true,
thumbnails: [{ url: ..., width: 120, height: 90 }]
}
],
result_count: 20
}
响应(type=channel):
json
{
results: [
{
type: channel,
channelId: UCuAXFkgsw1L7xaCfnd5JJOw,
title: Rick Astley,
handle: @RickAstley,
subscriberCount: 4.2M subscribers,
verified: true,
rssUrl: https://www.youtube.com/feeds/videos.xml?channel_id=UC...
}
],
result_count: 5
}
bash
curl -s https://transcriptapi.com/api/v2/youtube/channel/resolve?input=@TED \
-H Authorization: Bearer $TRANSCRIPTAPIKEY
| 参数 | 必填 | 验证 |
|---|---|---|
| input | 是 | 1-200 字符 — @handle、URL 或 UC... ID |
响应:
json
{ channelid: UCsT0YIqwnpJCM-mx7-gSA4Q, resolvedfrom: @TED }
如果输入已经是有效的 UC[a-zA-Z0-9_-]{22} ID,则直接返回,无需查询。
bash
| 参数 | 必填条件 | 验证 |
|---|---|---|
| channel | 条件必填 | @handle、频道 URL 或 UC... ID |
| continuation |
请提供 channel 或 continuation 中的其中一个。
响应:
json
{
results: [{
videoId: abc123xyz00,
title: Latest Video,
channelId: UCsT0YIqwnpJCM-mx7-gSA4Q,
channelTitle: TED,
channelHandle: @TED,
lengthText: 15:22,
viewCountText: 3.2M views,
thumbnails: [...],
index: 0
}],
playlist_info: {title: Uploads from TED, numVideos: 5000},
continuation_token: 4qmFsgKlARIYVVV1...,
has_more: true
}
bash
curl -s https://transcriptapi.com/api/v2/youtube/channel/latest?channel=@TED \
-H Authorization: Bearer $TRANSCRIPTAPIKEY
| 参数 | 必填 | 验证 |
|---|---|---|
| channel | 是 | @handle、频道 URL 或 UC... ID |
通过 RSS 返回最近 15 个视频,包含精确观看次数和 ISO 时间戳。
响应:
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 transcriptapi-1776374615 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 transcriptapi-1776374615 技能
skillhub install transcriptapi-1776374615
文件大小: 7.68 KB | 发布时间: 2026-4-17 16:14