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!
PeterUnfortunately, 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`);
精彩评论