Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

order - viewCount is showing wrong results in "YouTube API v3"

$
0
0

I am trying to get videos of a particular channel (like :- Luis Fonsi) in highest views order. And I am passing order parameter to sort the response by viewCount

like :-

order=viewCount

URL :-

https://www.googleapis.com/youtube/v3/search?key=[MY-API-KEY]&channelId=UCxoq-PAQeAdk_zyg8YS0JqA&part=snippet,id&order=viewCount&maxResults=20000

When I try to run it then It is not sorting as I expected. I was expecting first song would be Despacito But It got another one which definitely don't have the highest views.

As mentioned in Youtube-API Documentation in search section.viewCount – Resources are sorted from highest to lowest number of views.

It is not working like this.

I have tried many times but it is still not working.

Any help would be much Appreciated.


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>