anish
anish

Reputation: 7422

How to filter youtube video viewCount in ascending order

By using PHP i can get the videos by view like this

$query = $yt->newVideoQuery();
$query->setVideoQuery('');
$query->setOrderBy('viewCount');
$feed = $yt->getVideoFeed($query->getQueryUrl(2));

This will give the videoFeed in the Descending Order, Is there any way to get the videoFeed in "ascending order"

Upvotes: 3

Views: 3830

Answers (1)

Jeff Posnick
Jeff Posnick

Reputation: 56144

This is not something that's natively supported in the YouTube Data API. You're only option would be to request as many results as are publicly available and then sorting client-side.

Upvotes: 4

Related Questions