youtube-channels

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

YouTube Channels

YouTube Channels

YouTube channel tools via TranscriptAPI.com.
通过TranscriptAPI.com提供的YouTube频道工具。

Setup

配置说明

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.
bash
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:
bash
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.
如果未设置
$TRANSCRIPT_API_KEY
,请协助用户创建账户(100个免费额度,无需信用卡):
步骤1 — 注册: 向用户索要邮箱地址。
bash
node ./scripts/tapi-auth.js register --email USER_EMAIL
→ 验证码(OTP)将发送至该邮箱。询问用户:"请查看您的邮箱获取6位验证码。"
步骤2 — 验证: 用户提供OTP后:
bash
node ./scripts/tapi-auth.js verify --token TOKEN_FROM_STEP_1 --otp CODE
API密钥将保存到您的Shell配置文件和Agent配置中,即可使用。
手动注册选项:transcriptapi.com/signup → 控制台 → API密钥。

API Reference

API参考文档

Full OpenAPI spec: transcriptapi.com/openapi.json — consult this for the latest parameters and schemas.
All channel endpoints accept flexible input —
@handle
, channel URL, or
UC...
channel ID. No need to resolve first.
完整的OpenAPI规范:transcriptapi.com/openapi.json — 请参考此文档获取最新的参数和数据结构。
所有频道端点接受灵活的输入格式——
@用户名(handle)
、频道URL或
UC...
格式的频道ID,无需提前解析。

GET /api/v2/youtube/channel/resolve — FREE

GET /api/v2/youtube/channel/resolve — 免费

Convert @handle, URL, or UC... ID to canonical channel ID.
bash
curl -s "https://transcriptapi.com/api/v2/youtube/channel/resolve?input=@TED" \
  -H "Authorization: Bearer $TRANSCRIPT_API_KEY"
ParamRequiredValidation
input
yes1-200 chars — @handle, URL, or UC... ID
Response:
json
{ "channel_id": "UCsT0YIqwnpJCM-mx7-gSA4Q", "resolved_from": "@TED" }
If input is already
UC[a-zA-Z0-9_-]{22}
, returns immediately.
将@用户名(handle)、URL或UC...格式的ID转换为标准频道ID。
bash
curl -s "https://transcriptapi.com/api/v2/youtube/channel/resolve?input=@TED" \
  -H "Authorization: Bearer $TRANSCRIPT_API_KEY"
参数是否必填验证规则
input
1-200字符 — 支持@用户名、URL或UC...格式ID
响应示例:
json
{ "channel_id": "UCsT0YIqwnpJCM-mx7-gSA4Q", "resolved_from": "@TED" }
如果输入已经是
UC[a-zA-Z0-9_-]{22}
格式,将直接返回结果。

GET /api/v2/youtube/channel/latest — FREE

GET /api/v2/youtube/channel/latest — 免费

Latest 15 videos via RSS with exact stats.
bash
curl -s "https://transcriptapi.com/api/v2/youtube/channel/latest?channel=@TED" \
  -H "Authorization: Bearer $TRANSCRIPT_API_KEY"
ParamRequiredValidation
channel
yes
@handle
, channel URL, or
UC...
ID
Response:
json
{
  "channel": {
    "channelId": "UCsT0YIqwnpJCM-mx7-gSA4Q",
    "title": "TED",
    "author": "TED",
    "url": "https://www.youtube.com/channel/UCsT0YIqwnpJCM-mx7-gSA4Q",
    "published": "2006-04-17T00:00:00Z"
  },
  "results": [
    {
      "videoId": "abc123xyz00",
      "title": "Latest Video Title",
      "channelId": "UCsT0YIqwnpJCM-mx7-gSA4Q",
      "author": "TED",
      "published": "2026-01-30T16:00:00Z",
      "updated": "2026-01-31T02:00:00Z",
      "link": "https://www.youtube.com/watch?v=abc123xyz00",
      "description": "Full video description...",
      "thumbnail": { "url": "https://i1.ytimg.com/vi/.../hqdefault.jpg" },
      "viewCount": "2287630",
      "starRating": {
        "average": "4.92",
        "count": "15000",
        "min": "1",
        "max": "5"
      }
    }
  ],
  "result_count": 15
}
Great for monitoring channels — free and gives exact view counts + ISO timestamps.
通过RSS获取最新15个视频的精确统计数据。
bash
curl -s "https://transcriptapi.com/api/v2/youtube/channel/latest?channel=@TED" \
  -H "Authorization: Bearer $TRANSCRIPT_API_KEY"
参数是否必填验证规则
channel
@用户名
、频道URL或UC...格式ID
响应示例:
json
{
  "channel": {
    "channelId": "UCsT0YIqwnpJCM-mx7-gSA4Q",
    "title": "TED",
    "author": "TED",
    "url": "https://www.youtube.com/channel/UCsT0YIqwnpJCM-mx7-gSA4Q",
    "published": "2006-04-17T00:00:00Z"
  },
  "results": [
    {
      "videoId": "abc123xyz00",
      "title": "Latest Video Title",
      "channelId": "UCsT0YIqwnpJCM-mx7-gSA4Q",
      "author": "TED",
      "published": "2026-01-30T16:00:00Z",
      "updated": "2026-01-31T02:00:00Z",
      "link": "https://www.youtube.com/watch?v=abc123xyz00",
      "description": "Full video description...",
      "thumbnail": { "url": "https://i1.ytimg.com/vi/.../hqdefault.jpg" },
      "viewCount": "2287630",
      "starRating": {
        "average": "4.92",
        "count": "15000",
        "min": "1",
        "max": "5"
      }
    }
  ],
  "result_count": 15
}
非常适合监控频道——免费使用,可提供精确的观看次数和ISO时间戳。

GET /api/v2/youtube/channel/videos — 1 credit/page

GET /api/v2/youtube/channel/videos — 每页1个额度

Paginated list of ALL channel uploads (100 per page).
bash
undefined
分页列出频道的所有上传视频(每页100个)。
bash
undefined

First page

第一页

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?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 (next pages)                        |

Provide exactly one of `channel` or `continuation`, not both.

**Response:**

```json
{
  "results": [{
    "videoId": "abc123xyz00",
    "title": "Video Title",
    "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", "ownerName": "TED"},
  "continuation_token": "4qmFsgKlARIYVVV1...",
  "has_more": true
}
Keep calling with
continuation
until
has_more: false
.
curl -s "https://transcriptapi.com/api/v2/youtube/channel/videos?continuation=TOKEN"
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"

| 参数          | 条件必填 | 验证规则                                    |
| -------------- | ----------- | --------------------------------------------- |
| `channel`      | 是(首次请求) | `@用户名`、频道URL或UC...格式ID         |
| `continuation` | 是(后续请求) | 非空(用于获取下一页)                        |

必须且只能提供`channel`或`continuation`其中一个参数,不能同时提供。

**响应示例:**

```json
{
  "results": [{
    "videoId": "abc123xyz00",
    "title": "Video Title",
    "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", "ownerName": "TED"},
  "continuation_token": "4qmFsgKlARIYVVV1...",
  "has_more": true
}
持续调用并传入
continuation
参数,直到返回
has_more: false

GET /api/v2/youtube/channel/search — 1 credit

GET /api/v2/youtube/channel/search — 1个额度

Search within a specific channel.
bash
curl -s "https://transcriptapi.com/api/v2/youtube/channel/search\
?channel=@TED&q=climate+change&limit=30" \
  -H "Authorization: Bearer $TRANSCRIPT_API_KEY"
ParamRequiredValidation
channel
yes
@handle
, channel URL, or
UC...
ID
q
yes1-200 chars
limit
no1-50 (default 30)
在特定频道内搜索内容。
bash
curl -s "https://transcriptapi.com/api/v2/youtube/channel/search\
?channel=@TED&q=climate+change&limit=30" \
  -H "Authorization: Bearer $TRANSCRIPT_API_KEY"
参数是否必填验证规则
channel
@用户名
、频道URL或UC...格式ID
q
1-200字符
limit
1-50(默认30)

Typical workflow

典型工作流

bash
undefined
bash
undefined

1. Check latest uploads (free — pass @handle directly)

1. 获取最新上传内容(免费,直接传入@用户名)

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/latest?channel=@TED"
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"

2. Get transcript of recent video

2. 获取最新视频的字幕

curl -s "https://transcriptapi.com/api/v2/youtube/transcript\ ?video_url=VIDEO_ID&format=text&include_timestamp=true&send_metadata=true"
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
undefined
curl -s "https://transcriptapi.com/api/v2/youtube/transcript\ ?video_url=VIDEO_ID&format=text&include_timestamp=true&send_metadata=true"
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"
undefined

Errors

错误码说明

CodeAction
400Invalid param combination (both or neither channel/continuation)
402No credits — transcriptapi.com/billing
404Channel not found
408Timeout — retry once
422Invalid channel identifier
Free tier: 100 credits, 300 req/min. Free endpoints (resolve, latest) require auth but don't consume credits.
错误码处理建议
400参数组合无效(同时提供或都不提供channel/continuation参数)
402额度不足 — 前往transcriptapi.com/billing充值
404未找到对应频道
408请求超时 — 重试一次
422频道标识符无效
免费套餐:100个额度,每分钟300次请求。免费端点(resolve、latest)需要身份验证,但不消耗额度。