搜索频道
curl --request GET \
--url https://api.keyapi.ai/v1/youtube/search_channels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.keyapi.ai/v1/youtube/search_channels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.keyapi.ai/v1/youtube/search_channels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.keyapi.ai/v1/youtube/search_channels")
.header("Authorization", "Bearer <token>")
.asString();{
"code": 0,
"message": "success",
"data": {
"keyword": "Rick Astley",
"channels": [
{
"channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
"title": "Rick Astley",
"handle": "@RickAstleyYT",
"subscriber_count_text": "4.46M subscribers",
"description": "2026 UK & Ireland Reflection Tour 🎟️ Tickets are on sale now. New single 'Waiting On You' out now.",
"thumbnails": [
{
"url": "//yt3.googleusercontent.com/vewxKdtll-rntHAMDPY_Qa6hPac3-J2sCFFUwvGSSR0i7hB4g5rNfF39lCEcjGvsYI0RWx7V1A=s88-c-k-c0x00ffffff-no-rj-mo",
"width": 88,
"height": 88
},
{
"url": "//yt3.googleusercontent.com/vewxKdtll-rntHAMDPY_Qa6hPac3-J2sCFFUwvGSSR0i7hB4g5rNfF39lCEcjGvsYI0RWx7V1A=s176-c-k-c0x00ffffff-no-rj-mo",
"width": 176,
"height": 176
}
],
"is_subscribed": false,
"canonical_url": "/@RickAstleyYT",
"channel_url": "https://www.youtube.com/@RickAstleyYT"
}
],
"continuation_token": null,
"has_more": false,
"total_count": 1
},
"requestId": "10380c82-2a7b-4e53-9ef1-65eac3f48652"
}{
"code": 400,
"data": null,
"message": "Missing required parameter: handle"
}{
"code": 401,
"data": null,
"message": "apiKey is null"
}{
"code": 402,
"data": null,
"message": "apiKey quota is not enough"
}{
"code": 429,
"data": null,
"message": "qps limit exceeded"
}{
"code": 500,
"data": null,
"message": "Internal server error"
}YouTube 频道
搜索频道
搜索YouTube频道 只返回频道类型的搜索结果(过滤掉视频、播放列表等) 支持分页获取更多频道
使用流程: 1.首次请求:只传 keyword 参数 2.获取响应中的 continuation_token 3.下次请求:传入 continuation_token(keyword 可选) 4.重复步骤 2-3 直到 has_more 为 false
注意事项: 每页通常返回 10-20 个频道 搜索结果只包含频道,不包含视频、播放列表等 搜索结果的顺序和数量由 YouTube 算法决定
GET
/
v1
/
youtube
/
search_channels
搜索频道
curl --request GET \
--url https://api.keyapi.ai/v1/youtube/search_channels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.keyapi.ai/v1/youtube/search_channels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.keyapi.ai/v1/youtube/search_channels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.keyapi.ai/v1/youtube/search_channels")
.header("Authorization", "Bearer <token>")
.asString();{
"code": 0,
"message": "success",
"data": {
"keyword": "Rick Astley",
"channels": [
{
"channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
"title": "Rick Astley",
"handle": "@RickAstleyYT",
"subscriber_count_text": "4.46M subscribers",
"description": "2026 UK & Ireland Reflection Tour 🎟️ Tickets are on sale now. New single 'Waiting On You' out now.",
"thumbnails": [
{
"url": "//yt3.googleusercontent.com/vewxKdtll-rntHAMDPY_Qa6hPac3-J2sCFFUwvGSSR0i7hB4g5rNfF39lCEcjGvsYI0RWx7V1A=s88-c-k-c0x00ffffff-no-rj-mo",
"width": 88,
"height": 88
},
{
"url": "//yt3.googleusercontent.com/vewxKdtll-rntHAMDPY_Qa6hPac3-J2sCFFUwvGSSR0i7hB4g5rNfF39lCEcjGvsYI0RWx7V1A=s176-c-k-c0x00ffffff-no-rj-mo",
"width": 176,
"height": 176
}
],
"is_subscribed": false,
"canonical_url": "/@RickAstleyYT",
"channel_url": "https://www.youtube.com/@RickAstleyYT"
}
],
"continuation_token": null,
"has_more": false,
"total_count": 1
},
"requestId": "10380c82-2a7b-4e53-9ef1-65eac3f48652"
}{
"code": 400,
"data": null,
"message": "Missing required parameter: handle"
}{
"code": 401,
"data": null,
"message": "apiKey is null"
}{
"code": 402,
"data": null,
"message": "apiKey quota is not enough"
}{
"code": 429,
"data": null,
"message": "qps limit exceeded"
}{
"code": 500,
"data": null,
"message": "Internal server error"
}🪙3 credits每次请求
复制给 AI
🤖 为什么还要自己写代码?
让 AI 来处理重复工作。点击按钮即可复制一段整理好的提示词,用于 ChatGPT、Claude 或你常用的 AI 助手。
授权
接口鉴权凭证。请在请求 Header 中传入 Authorization: Bearer <YOUR_API_KEY>。
可在 Dashboard 获取你的 API Key。
查询参数
响应
请求成功
The response is of type object.

