Random YouTube Videos

This site provides links to random videos hosted at YouTube, with the emphasis on random. We get asked all the time why we don’t have a page for people to submit their own “random” links. The reason is quite simply because this would undermine the very randomness that we are aiming for in the database. (Having said that, we do have a channel page now where you can submit a channel ID and then watch random videos from that channel. These videos are not added to the main database though.)

The original idea for this site actually stemmed from another idea to provide a way of benchmarking the popularity of a video against the general population of YouTube videos. There are probably sites that do do this by now, but there wasn’t when we started out. Anyway, in order to figure out how popular any one video is, you need a pretty large sample of videos to rank it against. The challenge is that the sample needs to be very random in order to properly rank a video and YouTube doesn’t appear to provide a way to obtain large numbers of random video IDs.

Even if you search on YouTube for a random string, the set of results that will be returned will still be based on popularity, so if you’re using this approach to build up your sample, you’re already in trouble. It turns out there are a multitude of ways in which the YouTube search function makes it very difficult to retrieve truly random results.

So how can we provide truly random links to YouTube videos? It turns out that the YouTube programming interface (API) provides additional functions that allow the discovery of videos which, with the right approach, are much more random. Using a number of tricks, combined some subtle manipulation of the space-time fabric, we have managed to create a process that yields something very close to 100% random links to YouTube videos.

Here are some interesting facts about the database:

  • We started collecting random video IDs on June 24, 2011, experimenting with several approaches before finally settling on the current approach in late 2011.
  • We currently have 5,957,403 video IDs in the database.
  • The oldest video ID in the database was published on June 18, 2005. YouTube itself was formed in February, 2015 and the very first video was uploaded on April 23, 2005.
  • The original version of this site was implemented using Drupal 6. Then we shifted to Laravel 3, then Laravel 4 and currently Laravel 5. We use Apache, MariaDB and PHP7.
  • We constantly top up a buffer (well, a Redis queue actually) with video IDs to speed up the serving of the watch page. Due to the fact that a surprisingly large number of YouTube videos get taken down over time, we check the status of each video before we add it to the buffer, which ensures that viewers only get live videos, rather than the annoying “This video has been removed” messages. This also allows us to gradually update the database with the current status of each video.

If you would like a small sample of video IDs from our database for research purposes, please contact us directly. Please do not try to grab a copy of the database by writing a script to scrape video IDs from the site. We do monitor the site and if we find anybody doing this, they will be Rick Rolled. :-)

Watch Now


Random Comment

Or CLICK HERE for a random YouTube comment from our partner site.