The V3 API returns the same results you'd get by performing a search on the YouTube site and setting the 'Sort by' filter to Rating eg.
https://www.googleapis.com/youtube/v3/search/?q=stackoverflow&order=rating&part=snippet
https://www.youtube.com/results?search_sort=video_avg_rating&search_query=stackoverflow
The key point is that it's an average rating, not based only on likes.
The API defines getRating as -
Retrieves the ratings that the authorized user gave to a list of specified videos.
so it would seem the average takes into account likes and dislikes. It's not immediately clear whether the 1-5 rating system (from YouTube V2 API) or any other data is also used?
If you just wish to obtain the like
count, you can make another API request with your video ID's that returns separate counts for like
, dislike
, none
and unspecified
-
https://www.googleapis.com/youtube/v3/videos/getRating?id=XXXXXXX,XXXXXXX