Does YouTube Analytics API just give you statistics of your channel?

余生颓废 提交于 2019-12-05 05:34:51

YouTube Analytics API is only for videos on your own channel, or, if you are a content owner, any of your channels or claimed videos. It reflects most of the data that you can see on https://www.youtube.com/analytics Likewise, that data is only available to yourself.

What is available though, is the "statistics" part of the YouTube Video API. Here you can get the data that's available on the watch page. For example:

GET https://www.googleapis.com/youtube/v3/videos?part=statistics&id=9bZkp7q19f0&key={YOUR_API_KEY}

Returns

{
  "kind": "youtube#video",
  "etag": "\"gMjDJfS6nsym0T-NKCXALC_u_rM/cCAW8VtIzXW5zJKDbjuP9BMWnt4\"",
  "id": "9bZkp7q19f0",
  "statistics": {
    "viewCount": "2072823300",
    "likeCount": "8559755",
    "dislikeCount": "1090659",
    "favoriteCount": "0",
    "commentCount": "5247867"
  }
}

Here is the reference to the YouTube API with a neat little "Try it" section in the bottom to play around with: https://developers.google.com/youtube/v3/docs/videos/list#try-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!