youtube-node

Youtube API v3 client for nodeJS

youtube-node

  • YouTube API v3 - Require key (video)
  • CLI

For use CLI need install youtube-node using -g param.

$ npm install youtube-node -g
$ youtube id
$ youtube search
$ npm install youtube-node
var YouTube = require('youtube-node');

var youTube = new YouTube();

youTube.setKey('AIzaSyB1OOSpTREs85WUMvIgJvLTZKye4BVsoFU');

youTube.search('World War z Trailer', 2, function(resultData) {
  console.log(resultData);
});

See output: https://gist.github.com/paulomcnally/620b76a9afe81f56e8c9

var YouTube = require('youtube-node');

var youTube = new YouTube();

youTube.setKey('AIzaSyB1OOSpTREs85WUMvIgJvLTZKye4BVsoFU');

youTube.getById('HcwTxRuq-uk', function(resultData) {
  console.log(resultData);
});

See output: https://gist.github.com/paulomcnally/50e0b96291c82b87009b

var YouTube = require('youtube-node');

var youTube = new YouTube();

youTube.setKey('AIzaSyB1OOSpTREs85WUMvIgJvLTZKye4BVsoFU');

youTube.related('hafhSaP_Nh4', 2, function(resultData) {
  console.log(resultData);
});

See output: https://gist.github.com/paulomcnally/ebab23c68c374723f28a

https://developers.google.com/youtube/v3/docs/search/list#optional-parameters

To set an optional parameter use:

youTube.addParam('order', 'title');
$ npm install youtube-node@0.0.4

Older version use API v2 and is not recommended