transcriptapi by zeropointrepo/youtube-skills
npx skills add https://github.com/zeropointrepo/youtube-skills --skill transcriptapi通过 TranscriptAPI.com 提供完整的 YouTube 数据工具包。字幕、搜索、频道、播放列表 —— 一个 API 密钥即可。
如果未设置 $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 密钥。
完整的 OpenAPI 规范:transcriptapi.com/openapi.json —— 请查阅此文件以获取最新的参数和模式。
所有请求:-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
频道端点接受 channel 参数 —— 可以是 @handle、频道 URL 或 UC... ID。无需先解析。播放列表端点接受 playlist 参数 —— 可以是播放列表 URL 或 ID。
curl -s "https://transcriptapi.com/api/v2/youtube/transcript\
?video_url=VIDEO_URL&format=text&include_timestamp=true&send_metadata=true" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| 参数 | 必需 | 默认值 | 验证 |
|---|---|---|---|
video_url | 是 | — | YouTube URL 或 11 位视频 ID |
format | 否 | json | json 或 text |
include_timestamp | 否 | true | true 或 false |
send_metadata | 否 | false | true 或 false |
接受格式:https://youtube.com/watch?v=ID、https://youtu.be/ID、youtube.com/shorts/ID,或纯 ID。
响应 (format=json):
{
"video_id": "dQw4w9WgXcQ",
"language": "en",
"transcript": [
{ "text": "We're no strangers...", "start": 18.0, "duration": 3.5 }
],
"metadata": { "title": "...", "author_name": "...", "author_url": "..." }
}
curl -s "https://transcriptapi.com/api/v2/youtube/search?q=QUERY&type=video&limit=20" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| 参数 | 必需 | 默认值 | 验证 |
|---|---|---|---|
q | 是 | — | 1-200 个字符(会修剪) |
type | 否 | video | video 或 channel |
limit | 否 | 20 | 1-50 |
响应 (type=video):
{
"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):
{
"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
}
curl -s "https://transcriptapi.com/api/v2/youtube/channel/resolve?input=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| 参数 | 必需 | 验证 |
|---|---|---|
input | 是 | 1-200 个字符 —— @handle、URL 或 UC... ID |
响应:
{ "channel_id": "UCsT0YIqwnpJCM-mx7-gSA4Q", "resolved_from": "@TED" }
如果输入已经是有效的 UC[a-zA-Z0-9_-]{22} ID,则立即返回,无需查找。
# 第一页 (100 个视频)
curl -s "https://transcriptapi.com/api/v2/youtube/channel/videos?channel=@NASA" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
# 后续页
curl -s "https://transcriptapi.com/api/v2/youtube/channel/videos?continuation=TOKEN" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| 参数 | 必需 | 验证 |
|---|---|---|
channel | 条件性 | @handle、频道 URL 或 UC... ID |
continuation | 条件性 | 非空字符串(后续页) |
请提供 channel 或 continuation 中的一个,且仅一个。
响应:
{
"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
}
curl -s "https://transcriptapi.com/api/v2/youtube/channel/latest?channel=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| 参数 | 必需 | 验证 |
|---|---|---|
channel | 是 | @handle、频道 URL 或 UC... ID |
通过 RSS 返回最后 15 个视频,包含精确的观看次数和 ISO 时间戳。
响应:
{
"channel": {
"channelId": "...",
"title": "TED",
"author": "TED",
"url": "..."
},
"results": [
{
"videoId": "abc123xyz00",
"title": "Latest Video",
"published": "2026-01-30T16:00:00Z",
"viewCount": "2287630",
"description": "Full description...",
"thumbnail": { "url": "...", "width": "480", "height": "360" }
}
],
"result_count": 15
}
curl -s "https://transcriptapi.com/api/v2/youtube/channel/search\
?channel=@TED&q=climate+change&limit=30" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| 参数 | 必需 | 验证 |
|---|---|---|
channel | 是 | @handle、频道 URL 或 UC... ID |
q | 是 | 1-200 个字符 |
limit | 否 | 1-50 (默认 30) |
# 第一页
curl -s "https://transcriptapi.com/api/v2/youtube/playlist/videos?playlist=PL_PLAYLIST_ID" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
# 后续页
curl -s "https://transcriptapi.com/api/v2/youtube/playlist/videos?continuation=TOKEN" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| 参数 | 必需 | 验证 |
|---|---|---|
playlist | 条件性 | 播放列表 URL 或 ID (PL/UU/LL/FL/OL 前缀) |
continuation | 条件性 | 非空字符串 |
| 端点 | 成本 |
|---|---|
| transcript | 1 |
| search | 1 |
| channel/resolve | 免费 |
| channel/search | 1 |
| channel/videos | 1/页 |
| channel/latest | 免费 |
| playlist/videos | 1/页 |
| 代码 | 含义 | 操作 |
|---|---|---|
| 401 | API 密钥错误 | 检查密钥,重新运行设置 |
| 402 | 积分不足 | 在 transcriptapi.com/billing 充值 |
| 404 | 未找到 | 视频/频道/播放列表不存在或无字幕 |
| 408 | 超时/可重试 | 等待 2 秒后重试一次 |
| 422 | 验证错误 | 检查参数格式 |
| 429 | 速率限制 | 等待,遵守 Retry-After 头部 |
channel/latest(免费)检查新上传的视频 —— 直接传递 @handle。每周安装量
112
仓库
GitHub 星标数
81
首次出现
2026年2月4日
安全审计
已安装于
gemini-cli101
codex100
github-copilot99
opencode99
amp98
kimi-cli98
Full YouTube data toolkit via TranscriptAPI.com. Transcripts, search, channels, playlists — one API key.
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.
Full OpenAPI spec: transcriptapi.com/openapi.json — consult this for the latest parameters and schemas.
All requests: -H "Authorization: Bearer $TRANSCRIPT_API_KEY"
Channel endpoints accept channel — an @handle, channel URL, or UC... ID. No need to resolve first. Playlist endpoints accept playlist — a playlist URL or ID.
curl -s "https://transcriptapi.com/api/v2/youtube/transcript\
?video_url=VIDEO_URL&format=text&include_timestamp=true&send_metadata=true" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| Param | Required | Default | Validation |
|---|---|---|---|
video_url | yes | — | YouTube URL or 11-char video ID |
format | no | json | json or text |
include_timestamp | no | true |
Accepts: https://youtube.com/watch?v=ID, https://youtu.be/ID, youtube.com/shorts/ID, or bare ID.
Response (format=json):
{
"video_id": "dQw4w9WgXcQ",
"language": "en",
"transcript": [
{ "text": "We're no strangers...", "start": 18.0, "duration": 3.5 }
],
"metadata": { "title": "...", "author_name": "...", "author_url": "..." }
}
curl -s "https://transcriptapi.com/api/v2/youtube/search?q=QUERY&type=video&limit=20" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| Param | Required | Default | Validation |
|---|---|---|---|
q | yes | — | 1-200 chars (trimmed) |
type | no | video | video or channel |
limit | no | 20 |
Response (type=video):
{
"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
}
Response (type=channel):
{
"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
}
curl -s "https://transcriptapi.com/api/v2/youtube/channel/resolve?input=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| Param | Required | Validation |
|---|---|---|
input | yes | 1-200 chars — @handle, URL, or UC... ID |
Response:
{ "channel_id": "UCsT0YIqwnpJCM-mx7-gSA4Q", "resolved_from": "@TED" }
If input is already a valid UC[a-zA-Z0-9_-]{22} ID, returns immediately without lookup.
# First page (100 videos)
curl -s "https://transcriptapi.com/api/v2/youtube/channel/videos?channel=@NASA" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
# Next pages
curl -s "https://transcriptapi.com/api/v2/youtube/channel/videos?continuation=TOKEN" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| Param | Required | Validation |
|---|---|---|
channel | conditional | @handle, channel URL, or UC... ID |
continuation | conditional | non-empty string (next pages) |
Provide exactly one of channel or continuation.
Response:
{
"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
}
curl -s "https://transcriptapi.com/api/v2/youtube/channel/latest?channel=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| Param | Required | Validation |
|---|---|---|
channel | yes | @handle, channel URL, or UC... ID |
Returns last 15 videos via RSS with exact view counts and ISO timestamps.
Response:
{
"channel": {
"channelId": "...",
"title": "TED",
"author": "TED",
"url": "..."
},
"results": [
{
"videoId": "abc123xyz00",
"title": "Latest Video",
"published": "2026-01-30T16:00:00Z",
"viewCount": "2287630",
"description": "Full description...",
"thumbnail": { "url": "...", "width": "480", "height": "360" }
}
],
"result_count": 15
}
curl -s "https://transcriptapi.com/api/v2/youtube/channel/search\
?channel=@TED&q=climate+change&limit=30" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| Param | Required | Validation |
|---|---|---|
channel | yes | @handle, channel URL, or UC... ID |
q | yes | 1-200 chars |
limit | no | 1-50 (default 30) |
# First page
curl -s "https://transcriptapi.com/api/v2/youtube/playlist/videos?playlist=PL_PLAYLIST_ID" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
# Next pages
curl -s "https://transcriptapi.com/api/v2/youtube/playlist/videos?continuation=TOKEN" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| Param | Required | Validation |
|---|---|---|
playlist | conditional | Playlist URL or ID (PL/UU/LL/FL/OL prefix) |
continuation | conditional | non-empty string |
| Endpoint | Cost |
|---|---|
| transcript | 1 |
| search | 1 |
| channel/resolve | free |
| channel/search | 1 |
| channel/videos | 1/page |
| channel/latest | free |
| playlist/videos | 1/page |
| Code | Meaning | Action |
|---|---|---|
| 401 | Bad API key | Check key, re-run setup |
| 402 | No credits | Top up at transcriptapi.com/billing |
| 404 | Not found | Video/channel/playlist doesn't exist or no captions |
| 408 | Timeout/retryable | Retry once after 2s |
| 422 | Validation error | Check param format |
| 429 | Rate limited | Wait, respect Retry-After |
channel/latest (free) to check for new uploads before fetching transcripts — pass @handle directly.Weekly Installs
112
Repository
GitHub Stars
81
First Seen
Feb 4, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
gemini-cli101
codex100
github-copilot99
opencode99
amp98
kimi-cli98
Lark Skill Maker 教程:基于飞书CLI创建AI技能,自动化工作流与API调用指南
32,800 周安装
true or false |
send_metadata | no | false | true or false |
| 1-50 |