List Youtube videos which match the specified search query.
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) {
},
});
The search query
'grumpy cat'
The private Google API key for this application.
'xAmBxAmBxAmBkjbyKkjbyKkjbyK'
The maximum number of results to return.
15
An unexpected error occurred.
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'
}
]