Monday 16 December 2019

Revisiting exploring relatedness of videos using youtube APIs

Introduction
 
Way back in 2012 I dabbled with youtube's APIs to see how to determine whether two videos could be related via following their "related videos" out until finding a common video or running out of non-duplicate videos in the accumulated graph.

I've recently realised that the code from that particular experiment was only held on my old laptop that died a few months ago.  This is a good excuse to re-write it from scratch and produce something a little more useful - such as listing out the videos along the related path.

Blocker

Youtube's APIs have changed, so the approach that I took seven years ago won't work any more due to quota restrictions on API calls.
The only call that can bring back the related videos data is a search, and the minimum quota cost for a single search call is 100.  With a daily limit of 10,000 quota that would restrict us to 100 searches - which is simply not enough to build up a graph between videos unless they are very closely related.