A table that collects YouTube video data using YouTube API 3.0
This is a small web application that collects different data from YouTube videos and organizes them into a table. Each row of the table displays data of a different video. This data includes view, like and comment counts for each video. The table is organized by total video views.
I created this application while working as a Web Developer for CUNY's Institute for Virtual Enterprise (CUNY IVE). It was developed to be used as a crowd-sourcing component of the IVE SmartPitch competition. The contestants would upload their 30 second business pitches to YouTube and receive points depending on how many views, likes and comments their video received. Those with the most points would win a sub-contest called the Fan Favorite contest. This table was used as a convenient way to collectively view all the contestants' video data.
The application is primarily written in PHP and utilizes YouTube's RESTful API v3.0 to collect the video data. YouTube provides its data in JSON format. The data is generated on a webpage by passing the YouTube video ID's as parameters in the URL. The application parses the contents of the webpage and the data for each video are stored as individual objects. The video objects are stored in an array and are sorted by video views using the "usort" function.
Originally, the application made one data request per video. Given that data for up to 50 YouTube videos can be generated per request, the app was updated to retrieve data from as many videos as possible per request. This limits the number of requests needed to retrieve the data for all videos.