What i am trying is, to get top 10 videos of my Youtube channel based on likes using analytics api v1.
To get based on views
GET https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3DMINE&start-date=2005-05-01&end-date=2014-06-30&metrics=estimatedMinutesWatched%2Cviews%2Clikes%2Cshares&dimensions=video&max-results=10&sort=-views&key={YOUR_API_KEY}
this end point is used where sort=-views is the sorting factor.
I am doing the same way to sort based on likes sort=-likes
But I am getting error response
400 Bad Request
- Show headers -
{
"error": {
"errors": [
{
"domain": "global",
"reason": "badRequest",
"message": "The query is not supported. Check the documentation at https://developers.google.com/youtube/analytics/v1/available_reports for a list of supported queries."
}
],
"code": 400,
"message": "The query is not supported. Check the documentation at https://developers.google.com/youtube/analytics/v1/available_reports for a list of supported queries."
}
}
By hit and trial i came to know the sort=-views and sort=-estimatedMinutesWatched are working but others i.e. likes,comments etc are not working. What is the possible reason? Any other way to do this?