-3

How I Can Fetch YouTube Videos Through API, I Want To Fetch All Videos Of A Specific Channel By YouTube API,

But How Please Help

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
Arnav K
  • 7
  • 1

1 Answers1

0

The Search: list method

Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.

var google = require('googleapis');
var youtube = google.youtube({
   version: 'v3',
   auth: "your-api-key"
});


youtube.search.list({
    part: 'snippet',
    q: 'your search query'
  }, function (err, data) {
    if (err) {
      console.error('Error: ' + err);
    }
    if (data) {
      console.log(data)
    }
  });
Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449