Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including youtube-comments-stream with all npm packages installed. Try it out:

const commentsStream = require('youtube-comments-stream'); const VIDEO_ID = 'HVv-oBN6AWA'; const stream = commentsStream(VIDEO_ID); stream.on('data', function (comment) { console.log(comment.text); }); stream.on('error', function (err) { console.error('ERROR READING COMMENTS:', err); }); stream.on('end', function () { console.log('NO MORE COMMENTS'); process.exit(); });

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

youtube-comments-stream v1.4.6

Scrape comments (including replies) from a YouTube video and present as a stream

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free