const { YoutubeTranscript } = require('youtube-transcript'); YoutubeTranscript.fetchTranscript('vHih9nE4jA0').then(console.log).catch(console.error); // just a random video id or we can try to search