You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于YouTube Data API是否支持通过@handle查询频道的技术问询

YouTube Data API 是否支持通过@handle 查询频道?

YouTube推出了Handles作为频道的新识别方式,但目前测试发现YouTube Data API暂不支持直接通过@handle查询频道信息。

以@lionsgatemovies为例,尝试以下两种参数查询均无结果:

使用forUsername参数

GET https://www.googleapis.com/youtube/v3/channels?part=id,snippet&forUsername=@lionsgatemovies

返回结果:

{
  "kind": "youtube#channelListResponse",
  "etag": "RuuXzTIr0OoDqI4S0RU6n4FqKEM",
  "pageInfo": {
    "totalResults": 0,
    "resultsPerPage": 5
  }
}

使用id参数

GET https://www.googleapis.com/youtube/v3/channels?part=id,snippet&id=@lionsgatemovies

返回结果:

{
  "kind": "youtube#channelListResponse",
  "etag": "RuuXzTIr0OoDqI4S0RU6n4FqKEM",
  "pageInfo": {
    "totalResults": 0,
    "resultsPerPage": 5
  }
}

当前API支持的筛选参数(mySubscribers、forUsername、mine、managedByMe、categoryId、id)中,没有可直接匹配@handle的选项,若尝试无有效筛选参数的请求会返回如下错误:

{
  "error": {
    "code": 400,
    "message": "No filter selected. Expected one of: mySubscribers, forUsername, mine, managedByMe, categoryId, id",
    "errors": [
      {
        "message": "No filter selected. Expected one of: mySubscribers, forUsername, mine, managedByMe, categoryId, id",
        "domain": "youtube.parameter",
        "reason": "missingRequiredParameter",
        "location": "parameters.",
        "locationType": "other"
      }
    ]
  }
}

内容的提问来源于stack exchange,提问作者Anthony Battaglia

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.13 19:30:57