首页 > 解决方案 > 与 UI 上描述的值相比,YouTube 数据 API 返回的 viewCount 值不一致

问题描述

例如,以下频道 https://www.youtube.com/user/kidrauhl 在 about 部分有 21,454,838,559 次观看。

但是,当我使用 API 的 channels.list 方法(https://developers.google.com/youtube/v3/docs/channels/list)时,响应的统计部分中的 viewCount 完全不同:

"statistics": {
        "viewCount": "994127449",
        "commentCount": "0",
        "subscriberCount": "54000000",
        "hiddenSubscriberCount": false,
        "videoCount": "172"
      }

标签: google-apis-explorer

解决方案


https://developers.google.com/youtube/v3/docs/channels#statistics.viewCount

根据文档,它说:

statistics.viewCount  
The number of times the channel has been viewed.

所以我猜about页面上的观看次数是所有视频的合并观看次数,而statistics.viewCount是频道页面累积的观看次数。


推荐阅读