YogsDB Video Filters
Fri, Apr 20, 2018Video Filters
EXPERIMENTAL. THESE MAY CHANGE. Keep an eye on this page for any changes. I’ll aim to not make any breaking changes but may need to.
To apply filters to an API query, add them as URL parameters. For example to limit results to those with “test” in the title and have more than 5000 views and retrieve 100 results per page, the URL would be
https://api.yogsdb.com/api/videos?title=test&moreViewsThan=5000&orderBy=view_count|asc&limit=100
Available filters
Replace query fields inside <> with the actual query you wish to make, don’t add the <> characters to the query.
youtube_id=
title=
description=
uploadedAfter=
uploadedBefore=
channel=
slug=
Note: slugs are the string that appear in the URL
For example in https://yogsdb.com/sips/witcher-3-wild-hunt-now-or-never-part-74 the Channel slug is “sips” and the Video slug is “witcher-3-wild-hunt-now-or-never-part-74”. They’re URL friendly forms of the Channel and Video titles
longerThan=
shorterThan=
moreViewsThan=
fewerViewsThan=
moreLikesThan=
fewerLikesThan=
moreDislikesThan=
fewerDislikesThan=
moreCommentsThan=
fewerCommentsThan=
orderBy=<FIELD>|<ASC/DESC> order the results by the column
limit=
page=
inRandomOrder=1 pulls results in a random order. This is effectively passing ORDER BY RAND() to the SQL query so as you may imagine doesn’t play nicely with the orderBy filter