Loading...
Loading...
Compare original and translation side by side
$TRANSCRIPT_API_KEYnode ./scripts/tapi-auth.js register --email USER_EMAILnode ./scripts/tapi-auth.js verify --token TOKEN_FROM_STEP_1 --otp CODEAPI key saved to your shell profile and agent config. Ready to use.
$TRANSCRIPT_API_KEYnode ./scripts/tapi-auth.js register --email USER_EMAILnode ./scripts/tapi-auth.js verify --token TOKEN_FROM_STEP_1 --otp CODEAPI密钥将保存到您的Shell配置文件和Agent配置中,即可使用。
@handleUC...@用户名(handle)UC...curl -s "https://transcriptapi.com/api/v2/youtube/channel/resolve?input=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"| Param | Required | Validation |
|---|---|---|
| yes | 1-200 chars — @handle, URL, or UC... ID |
{ "channel_id": "UCsT0YIqwnpJCM-mx7-gSA4Q", "resolved_from": "@TED" }UC[a-zA-Z0-9_-]{22}curl -s "https://transcriptapi.com/api/v2/youtube/channel/resolve?input=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"| 参数 | 是否必填 | 验证规则 |
|---|---|---|
| 是 | 1-200字符 — 支持@用户名、URL或UC...格式ID |
{ "channel_id": "UCsT0YIqwnpJCM-mx7-gSA4Q", "resolved_from": "@TED" }UC[a-zA-Z0-9_-]{22}curl -s "https://transcriptapi.com/api/v2/youtube/channel/latest?channel=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"| Param | Required | Validation |
|---|---|---|
| yes | |
{
"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
}curl -s "https://transcriptapi.com/api/v2/youtube/channel/latest?channel=@TED" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"| 参数 | 是否必填 | 验证规则 |
|---|---|---|
| 是 | |
{
"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
}undefinedundefined
| 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
}continuationhas_more: false
| 参数 | 条件必填 | 验证规则 |
| -------------- | ----------- | --------------------------------------------- |
| `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
}continuationhas_more: falsecurl -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 |
|---|---|---|
| yes | |
| yes | 1-200 chars |
| no | 1-50 (default 30) |
curl -s "https://transcriptapi.com/api/v2/youtube/channel/search\
?channel=@TED&q=climate+change&limit=30" \
-H "Authorization: Bearer $TRANSCRIPT_API_KEY"| 参数 | 是否必填 | 验证规则 |
|---|---|---|
| 是 | |
| 是 | 1-200字符 |
| 否 | 1-50(默认30) |
undefinedundefinedundefinedundefined| Code | Action |
|---|---|
| 400 | Invalid param combination (both or neither channel/continuation) |
| 402 | No credits — transcriptapi.com/billing |
| 404 | Channel not found |
| 408 | Timeout — retry once |
| 422 | Invalid channel identifier |
| 错误码 | 处理建议 |
|---|---|
| 400 | 参数组合无效(同时提供或都不提供channel/continuation参数) |
| 402 | 额度不足 — 前往transcriptapi.com/billing充值 |
| 404 | 未找到对应频道 |
| 408 | 请求超时 — 重试一次 |
| 422 | 频道标识符无效 |