youtube-api by zeropointrepo/youtube-skills
npx skills add https://github.com/zeropointrepo/youtube-skills --skill youtube-api通过 TranscriptAPI.com 访问 YouTube 数据——无需 Google 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 —— 请查阅此文件以获取最新的参数和模式。
所有端点:https://transcriptapi.com/api/v2/youtube/...
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
频道端点接受 channel 参数——可以是 @句柄、频道 URL 或 UC... ID。播放列表端点接受 playlist 参数——可以是播放列表 URL 或 ID。
| 端点 | 方法 | 成本 |
|---|---|---|
/transcript?video_url=ID | GET | 1 |
/search?q=QUERY&type=video | GET | 1 |
/channel/resolve?input=@handle | GET | 免费 |
/channel/latest?channel=@handle | GET | 免费 |
/channel/videos?channel=@handle | GET | 1/页 |
/channel/search?channel=@handle&q=Q | GET | 1 |
/playlist/videos?playlist=PL_ID | GET | 1/页 |
搜索视频:
curl -s "https://transcriptapi.com/api/v2/youtube/search\
?q=python+tutorial&type=video&limit=10" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
获取字幕:
curl -s "https://transcriptapi.com/api/v2/youtube/transcript\
?video_url=dQw4w9WgXcQ&format=text&include_timestamp=true&send_metadata=true" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
解析频道句柄(免费):
curl -s "https://transcriptapi.com/api/v2/youtube/channel/resolve?input=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
最新视频(免费):
curl -s "https://transcriptapi.com/api/v2/youtube/channel/latest?channel=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
浏览频道上传内容(分页):
curl -s "https://transcriptapi.com/api/v2/youtube/channel/videos?channel=@NASA" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
# 使用响应中的 continuation token 获取下一页
浏览播放列表(分页):
curl -s "https://transcriptapi.com/api/v2/youtube/playlist/videos?playlist=PL_PLAYLIST_ID" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| 字段 | 规则 |
|---|---|
channel | @句柄、频道 URL 或 UC... ID |
playlist | 播放列表 URL 或 ID(PL/UU/LL/FL/OL 前缀) |
q (搜索) | 1-200 个字符 |
limit | 1-50 |
continuation | 非空字符串 |
| Google YouTube Data API | TranscriptAPI
---|---|---
配额 | 10,000 单位/天(100 次搜索) | 基于积分,无每日上限
设置 | OAuth + API 密钥 + 项目 | 单一 API 密钥
字幕 | 不可用 | 核心功能
定价 | 超额部分 $0.0015/单位 | $5/1000 积分
| 代码 | 含义 | 操作 |
|---|---|---|
| 401 | API 密钥错误 | 检查密钥 |
| 402 | 积分不足 | transcriptapi.com/billing |
| 404 | 未找到 | 资源不存在 |
| 408 | 超时/可重试 | 2 秒后重试一次 |
| 422 | 验证错误 | 检查参数格式 |
| 429 | 速率限制 | 等待,遵守 Retry-After 头部 |
免费层:100 积分,300 次请求/分钟。入门版($5/月):1,000 积分。
每周安装量
83
代码仓库
GitHub 星标数
82
首次出现
2026年2月4日
安全审计
安装于
gemini-cli74
codex74
opencode73
github-copilot73
kimi-cli72
amp72
YouTube data access via TranscriptAPI.com — no Google API quota needed.
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 endpoints: https://transcriptapi.com/api/v2/youtube/...
Channel endpoints accept channel — an @handle, channel URL, or UC... ID. Playlist endpoints accept playlist — a playlist URL or ID.
| Endpoint | Method | Cost |
|---|---|---|
/transcript?video_url=ID | GET | 1 |
/search?q=QUERY&type=video | GET | 1 |
/channel/resolve?input=@handle | GET | free |
/channel/latest?channel=@handle | GET | free |
/channel/videos?channel=@handle |
Search videos:
curl -s "https://transcriptapi.com/api/v2/youtube/search\
?q=python+tutorial&type=video&limit=10" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
Get transcript:
curl -s "https://transcriptapi.com/api/v2/youtube/transcript\
?video_url=dQw4w9WgXcQ&format=text&include_timestamp=true&send_metadata=true" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
Resolve channel handle (free):
curl -s "https://transcriptapi.com/api/v2/youtube/channel/resolve?input=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
Latest videos (free):
curl -s "https://transcriptapi.com/api/v2/youtube/channel/latest?channel=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
Browse channel uploads (paginated):
curl -s "https://transcriptapi.com/api/v2/youtube/channel/videos?channel=@NASA" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
# Use continuation token from response for next pages
Browse playlist (paginated):
curl -s "https://transcriptapi.com/api/v2/youtube/playlist/videos?playlist=PL_PLAYLIST_ID" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
| Field | Rule |
|---|---|
channel | @handle, channel URL, or UC... ID |
playlist | Playlist URL or ID (PL/UU/LL/FL/OL prefix) |
| (search) |
| Google YouTube Data API | TranscriptAPI
---|---|---
Quota | 10,000 units/day (100 searches) | Credit-based, no daily cap
Setup | OAuth + API key + project | Single API key
Transcripts | Not available | Core feature
Pricing | $0.0015/unit overage | $5/1000 credits
| Code | Meaning | Action |
|---|---|---|
| 401 | Bad API key | Check key |
| 402 | No credits | transcriptapi.com/billing |
| 404 | Not found | Resource doesn't exist |
| 408 | Timeout/retryable | Retry once after 2s |
| 422 | Validation error | Check param format |
| 429 | Rate limited | Wait, respect Retry-After |
Free tier: 100 credits, 300 req/min. Starter ($5/mo): 1,000 credits.
Weekly Installs
83
Repository
GitHub Stars
82
First Seen
Feb 4, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
gemini-cli74
codex74
opencode73
github-copilot73
kimi-cli72
amp72
Lark CLI Wiki API 使用指南:获取知识空间节点信息与权限管理
39,100 周安装
App Store Connect 参考指南:崩溃分析、TestFlight反馈与性能指标导出
164 周安装
Nansen 聪明钱分析工具:追踪加密基金和顶级交易者持仓与交易数据
165 周安装
NSFC国家自然科学基金申请书研究内容写作工具 - LaTeX自动化编排助手
165 周安装
SOLID 原则详解:SRP、OCP、LSP 等设计模式,提升代码可维护性与灵活性
167 周安装
WordPress全站编辑(FSE)与区块编辑器指南:theme.json配置与站点编辑器实战
171 周安装
A轮以上初创公司获客指南:PLG与销售驱动混合模式下的需求生成与SEO策略
166 周安装
| GET |
| 1/page |
/channel/search?channel=@handle&q=Q | GET | 1 |
/playlist/videos?playlist=PL_ID | GET | 1/page |
q| 1-200 chars |
limit | 1-50 |
continuation | non-empty string |