Youtube.searchVideos()

List Youtube videos which match the specified search query.

Usage

Hover over inputs/exits for more info.

var Youtube = require('machinepack-youtube');


// List Youtube videos which match the specified search query.

Youtube.searchVideos({

query: 'grumpy cat',

apiKey: 'xAmBxAmBxAmBkjbyKkjbyKkjbyK',

limit: 15,

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

query required

The search query

'grumpy cat'
apiKey required

The private Google API key for this application.

'xAmBxAmBxAmBkjbyKkjbyKkjbyK'
limit

The maximum number of results to return.

15

Exits

error

An unexpected error occurred.

success

OK.

[ { id: 'INscMGmhmX4',
    url: 'https://youtube.com/watch?v=INscMGmhmX4',
    title: 'The Original Grumpy Cat',
    description: 'Visit Grumpy Cat\'s Website: www.grumpycats.com New Tshirts at: http://bit.ly/gcteeshirts Twitter @RealGrumpyCat www.twitter.com/RealGrumpyCat Facebook ...',
    publishedAt: '2012-09-25T14:36:51.000Z' } ]