搜索CommentThreads时使用“相关性”对结果进行排序时,没有返回任何项目

时间:2019-03-10 19:55:55

标签: youtube-api youtube-data-api

使用searchTerms=someKeywordsorder=relevance搜索youtube comment API不会返回任何结果,但是当更改为order=time时,可以知道为什么吗?

示例API请求:

https://www.googleapis.com/youtube/v3/commentThreads?videoId=pvyfddIFsVA&searchTerms=Google&order=relevance&part=snippet&key=[YOUR API KEY]

返回的响应:

{
 "kind": "youtube#commentThreadListResponse",
 "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/6qokcCVLNOLwE7dOHNSTr30kECQ\"",
 "pageInfo": {
  "totalResults": 0,
  "resultsPerPage": 20
 },
 "items": []
}

从文档中:

order 参数指定API响应应列出注释线程的顺序。有效值为:

  • time-注释线程按时间排序。这是默认值 行为。
  • relevance-注释线程按相关性排序。

参考:https://developers.google.com/youtube/v3/docs/commentThreads/list

顺序设置为relevance不起作用,只有默认的time会产生结果。

1 个答案:

答案 0 :(得分:1)

这可能是一个错误,在这种情况下,最好的选择是通过在Issue Tracker中创建一个新条目来报告该错误。

这是Issue Tracker entry created by the OP

相关问题