Get list of gaming live streams on Youtube

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 14:35:32

问题


I'm trying to use the Youtube Data API to grab the list of currently gaming related live streams but I can't find any endpoint that fit what I need and return the number of viewers for each of those channels.

Do you guys have any idea of how I could manage to do that ?

Thanks.


回答1:


List of gaming live streams:
https://www.googleapis.com/youtube/v3/search?part=snippet&eventType=live&type=video&videoCategoryId=20&regionCode=US&maxResults=50&key={YOUR_API_KEY_HERE}

videoCategoryId=20 is "Gaming"

Getting the live stream details (like viewer numbers):
https://www.googleapis.com/youtube/v3/videos?part=snippet%2CliveStreamingDetails&id={VIDEO_ID_HERE}&fields=items(id%2Csnippet(title%2CliveBroadcastContent)%2CliveStreamingDetails%2FconcurrentViewers)&key={YOUR_API_KEY_HERE}

Substitue the parts of these links that are in {} with your appropriate values.



来源:https://stackoverflow.com/questions/31616252/get-list-of-gaming-live-streams-on-youtube

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