node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »


Note: This Youtube Data API wrapper does not yet support any calls which require authorization. It will be implemented in the future.


npm install tubedata


First, get a Youtube API Key from Google.

Then, hust require the module, set the API Key and you are good to go!

var tubedata = require('tubedata');

Basic Usage

This module is a work in progress, and only contains minor functionality at this point.

So far this module implements the list data call for all Youtube data resources. To use the list function call: tubedata.resource.list(parts, options, callback)


var parts = ['snippet', 'contentDetails'];
var options = { forUsername: 'example-username' };, options, function(error, response, body) {
    if (!error && response.code.statusCode == 200) {
        //process response body

To check out what parts and options you can pass into the list function for each resource here. Please note that both the filter and optional parameters both go in the options json

The only other functionality that has been added at this point is the ability to get ALL the videos for a certain channel, all you need to do is provide the name. To use the getUploadedVideos function call:, callback)

i.e.'example-channel-name', function(videos) {
    //process videos here

Currently a work in progress. Will be adding better abstractions and finer grained control module calls. Documentation will slowly improve over time also. Let me know if you want to help out!