2

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

This is my current url:

http://gdata.youtube.com/feeds/api/videos/'+yt_id+'/comments?alt=json-in-script&callback=?&max-results=50

Thanks in advance!
Peter

mauris
  • 42,982
  • 15
  • 99
  • 131
Peter
  • 11,413
  • 31
  • 100
  • 152

2 Answers2

2

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`);
Shankar Ganesh Jayaraman
  • 1,401
  • 1
  • 16
  • 22
r g
  • 23
  • 2
2

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

dorvak
  • 9,219
  • 4
  • 34
  • 43