YogsDB Video Filters

Video 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=<ID> return Videos with the YouTube ID <ID> (actually will just return one video as this is a unique field)

title=<SEARCH> return Videos where the title contains <SEARCH>

description=<SEARCH> return Videos where the description contains <SEARCH>

uploadedAfter=<DATE> return Videos uploaded after <DATE>

uploadedBefore=<DATE> return Videos uploaded before <DATE>

channel=<SLUG> return Videos where the channel slug is <SLUG>

slug=<SLUG> return Videos where the video slug contains <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=<DURATION> return Videos where the video is longer than <DURATION>. Duration is in seconds

shorterThan=<DURATION> return Videos where the video is shorter than <DURATION>. Duration is in seconds

moreViewsThan=<VIEWS> return Videos where the video has more views than <VIEWS>

fewerViewsThan=<VIEWS> return Videos where the video has fewer views than <VIEWS>

moreLikesThan=<LIKES> return Videos where the video has more likes than <LIKES>

fewerLikesThan=<LIKES> return Videos where the video has fewer likes than <LIKES>

moreDislikesThan=<DISLIKES> return Videos where the video has more dislikes than <DISLIKES>

fewerDislikesThan=<DISLIKES> return Videos where the video has fewer dislikes than <DISLIKES>

moreCommentsThan=<COMMENTS> return Videos where the video has more dislikes than <COMMENTS>

fewerCommentsThan=<COMMENTS> return Videos where the video has fewer dislikes than <COMMENTS>

orderBy=<FIELD>|<ASC/DESC> order the results by the column <FIELD> followed by a pipe character “|” followed by either asc (ascending) or desc (descending)

limit=<COUNT> returns <COUNT> results matching your query. Max results 1000 to avoid overloading the database. Please use the page parameters to get more than this.

page=<PAGE> returns <PAGE> of results. For example if you add the limit of 100, page 2 will start with the 101st result for your query.

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