json - 如何通过提供 Youtube ID 获取 Chanel 名称

标签 json api youtube youtube-api

我需要获取 chanel 名称,以及 youtube 视频的 coutn View ..

我使用 Youtube API,我想发送参数:视频代码

结果,该视频的观看次数和 channel 名称(不是 channel ID)

最佳答案

您可以引用这里:How to get YouTube channel name?

它表示您可以从 URL 中提取视频 id,然后发出 HTTP GET 请求:https://gdata.youtube.com/feeds/api/videos/dQw4w9WgXcQ?v=2&alt=json在哪里 dQw4w9WgXcQ是您感兴趣的视频 ID。这将返回 JSON 响应, channel 名称位于 author field 。

要计算 YouTube 视频的观看次数,您可以使用 YouTube Analytics API .

Video reports provide statistics for all user activity related to a channel's videos or a content owner's videos. For example, these reports contain the number of views that your videos received. In the YouTube Analytics API, some content owner video reports also include estimated revenue and ad performance metrics.



这是一个相关线程:How to count the total number of views from a youtube channel?

关于json - 如何通过提供 Youtube ID 获取 Chanel 名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43568982/

相关文章:

javascript - Vimeo API : Play button and multiple videos

VB.Net 按标题关闭窗口

php - 专门将YouTube网址转换为iframe代码,同时将BBCode网址转换为html元素

javascript - YouTube Feed API在FireFox中加载缓慢

PHP 循环嵌套 JSON 响应并重新组装为 Webhook 的简单查询字符串

android - android上的post方法

c# - 无法将字符串转换为 system.Net.HttpContent

json - 查询Postgres中保存的Json数据

javascript - 在第一个响应时解析 JSON 数组

javascript - 通过YouTube API动态添加/循环播放多个视频,播放器名称和事件?