开发者

Youtube API - Get top comments from a video

Is it possible to get the top comments from a video? Maybe sorted by number of thumbs up?

This is my current url:

http://gda开发者_JAVA技巧ta.youtube.com/feeds/api/videos/'+yt_id+'/comments?alt=json-in-script&callback=?&max-results=50

Thanks in advance!

Peter


Unfortunately, i think there is no such option. You can´t (or i didn´t manage to get it working) order by rating, likes etc. of comment, because there is no gdata-tag like "rating" etc. for comments. YouTube doesn´t provide this so far. You can vote for it here


Yes I found that sorting by relevance is a good way of doing this for example in JS:

const comments = await axios.get(`https://www.googleapis.com/youtube/v3/commentThreads?key=${YOUR_API_KEY}&textFormat=plainText&**order=relevance**&part=snippet&videoId=${YOUR_VID_ID}&maxResults=100`);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜