youtube.js 434 Bytes
var response = 'IU';

var request = require("request");

var options = { method: 'GET',
  url: 'https://www.googleapis.com/youtube/v3/search',
  qs: 
   { key: 'AIzaSyA8-HR7V5cGIwWiBUWzKZsm5yzwrYc-4ys',
     part: 'snippet',
     maxResults: '1',
     order: 'viewCount',
     q: response,
     type: 'video' },
    };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});