YouTube 数据 API 未返回“社区”标签中的评论

YouTube Data API is not returning comments from Community tab

嗨 YouTube 数据 API 团队 -

commentsThread 端点 (https://youtube.googleapis.com/youtube/v3/commentThreads) 未 return 从 YouTube 的“社区”选项卡中编辑评论。

我对此进行了广泛的调试,只尝试 channelId 参数,而社区选项卡中的评论根本不会 return 在 API 调用中。

通道 ID 是 UC7kCeZ53sli_9XwuQeFxLqw,我发送到 HTTP GET 上的 commentsThread 端点的查询字符串参数如下:

part: snippet,replies
allThreadsRelatedToChannelId: UC7kCeZ53sli_9XwuQeFxLqw
key: {YT_API_KEY}
maxResults: 100

“社区”选项卡是否有不同的 API 端点 post comments/replies 或者端点中是否存在错误?

谢谢!

如果您查看 CommentThreads: list 的文档,您会注意到它说

Returns a list of comment threads that match the API request parameters.

comments.list方法同理。这是每个视频的评论列表。

目前在社区选项卡上没有请求信息的终点。您可能需要考虑检查是否已经有针对它的功能请求,如果没有,那么您可以提交一个 here

作为 @DaImTo said there isn't any endpoint doing exactly what you want. However if you check the documentation for CommentThreads: list 你会注意到它说

The allThreadsRelatedToChannelId parameter instructs the API to return all comment threads associated with the specified channel. The response can include comments about the channel or about the channel's videos.

同样,如果您考虑带有 channelId UCqPkQu3N8OqYKC5wwE6CmGQ 的频道,您可以通过带有 commentThreads 端点的 YouTube 数据 API v3 请求恢复社区选项卡评论:https://youtube.googleapis.com/youtube/v3/commentThreads?part=snippet&allThreadsRelatedToChannelId=UCqPkQu3N8OqYKC5wwE6CmGQ&key=YOUR_API_KEY

您可以通过检查每个项目的片段中是否定义了 videoId 来区分视频评论和社区选项卡中的评论。

注意精确 part=snippet 否则您将不会收到任何社区标签评论。