是否可以通过一个查询搜索多个频道?
我想通过 Channels.id 参数通过一个查询搜索视频的多个频道。 例如:
我的请求URL是: https://youtube.googleapis.com/youtube/v3/search?part=snippet&channelId=UCSzAsgKDpNkch1eRA9w5nww%20%2B%20UCyCBf6asf89aQJaSXuAuTsg&q=Bitcoin&type=video&key=[YOUR_API_KEY]
答案是:
{
"kind": "youtube#searchListResponse",
"etag": "DCv8u79rz_Z5yPVlSxf2awnPWTQ",
"regionCode": "DE",
"pageInfo": {.
"totalResults": 0,
"resultsPerPage": 0
},
}, "items": []
}
难道不是吗2022 年推出的 YouTube Search API V3 是否可以通过一个请求在多个 Channel.id 中搜索某个主题?
我已经尝试过几种组合运算符。 我做错了什么吗?
I want to search multiple channels via the Channels.id parameter for videos with one query.
For example:
My request URL is: https://youtube.googleapis.com/youtube/v3/search?part=snippet&channelId=UCSzAsgKDpNkch1eRA9w5nww%20%2B%20UCyCBf6asf89aQJaSXuAuTsg&q=Bitcoin&type=video&key=[YOUR_API_KEY]
The answer is:
{
"kind": "youtube#searchListResponse",
"etag": "DCv8u79rz_Z5yPVlSxf2awnPWTQ",
"regionCode": "DE",
"pageInfo": {.
"totalResults": 0,
"resultsPerPage": 0
},
}, "items": []
}
Is it not possible with YouTube Search API V3 in 2022 to search multiple Channel.id's for a topic with one request?
I have already tried several combining operators.
Am i doing something wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,您尝试的方式是不可能的 - 当使用多个通道(或字段/参数中的多个值)时,值以逗号分隔,但是,即使进行此修复对于请求,API 不会带来任何结果。
<一href="https://developers.google.com/youtube/v3/docs/search/list?apix_params=%7B%22part%22%3A%5B%22id%2Csnippet%22%5D%2C%22chann elId%22%3A%22UCSzAsgKDpNkch1eRA9w5nww%2CUCyCBf6asf89aQJaSXuAuTsg%22%2C%22q%22%3A%22Bitcoin%22%2C%22regionCode%22%3A%22DE%22%7D" rel="nofollow noreferrer">查看演示
相反,您应该为每个频道发出一个请求。
使用channelId
UCSzAsgKDpNkch1eRA9w5nww
进行搜索 - 请参阅demo # 1使用channelId 搜索
UCyCBf6asf89aQJaSXuAuTsg
- 参见 demo # 2如果您想搜索符合您条件的渠道(德国地区的比特币),请参阅此 示例
结果(总结):
No, it's not possible in the way you're trying - when using multiple channels (or multiple values in a field/parameter for that matter), values are comma-separated, but, even with this fix to the request, the API does not bring any results.
See demo
Instead, you should make one request per channel.
Search with channelId
UCSzAsgKDpNkch1eRA9w5nww
- see demo # 1Search with channelId
UCyCBf6asf89aQJaSXuAuTsg
- see demo # 2If instead, you want to search channels that matches your criteria (Bitcoin in region DE), then see this sample
Results (summarized):