A Node.JS module, which provides an object oriented wrapper for the Youtube v3 API.
# Using npmnpm install --save youtube-api# Using yarnyarn add youtube-api
/*** This script uploads a video (specifically `video.mp4` from the current* directory) to YouTube,** To run this script you have to create OAuth2 credentials and download them* as JSON and replace the `credentials.json` file. Then install the* dependencies:** npm i r-json lien opn bug-killer** Don't forget to run an `npm i` to install the `youtube-api` dependencies.* */const Youtube =fs =readJson =Lien =Logger =opn =prettyBytes =;// I downloaded the file from OAuth2 -> Download JSONconst CREDENTIALS = ;// Init lien serverlet server =host: "localhost"port: 5000;// Authenticate// You can access the Youtube resources via OAuth2 only.//let oauth = Youtube;;// Handle oauth2 callbackserver;
❓ Get Help
There are few ways to get help:
Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
For bug reports and feature requests, open issues. 🐛
For direct and quick help, you can use Codementor. 🚀
The official Youtube documentation is a very useful resource.
OAuth (Access Token)
OAuth (Refresh Token)
Only for requests that don't require user authorization (certain list operations)
😋 How to contribute
Have an idea? Found a bug? See how to contribute.
💖 Support my projects
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
Starring and sharing the projects you like 🚀
Bitcoin—You can send me bitcoins at this address (or scanning the code below):
💫 Where is this library used?
If you are using this library in one of your projects, add it in this list. ✨
adasq-services-ytv—It creates news feed from youtube search result, for specific queries
anitube(by kikura-yuichiro)—node module for getting youtube video url of japanese animation OP/ED movie
botyo-command-youtube(by Ivaylo Stoyanov)—YouTube command for Botyo
chewb-youtube-uploader(by Sam Elie)—Wrapper tool around a great uploader.
hpcbot(by bdickason)—Twitch Bot for the Harry Potter Clan
kyot-sunday-playlists(by Alin Pandichi)—Kyot Sunday Playlists
mediacenterjs(by Jan Smolders)—A NodeJS based mediacenter for your browser
mediacenterjs-youtube(by Jan Smolders)—A Youtube app for mediacenterjs
muzier-cli(by Kai Hao)—A command line interface to download mp3 from Youtube.
node-red-contrib-youtube(by scaw.dev)—Youtube nodes for node-red
node-red-node-youtube(by Jay Long)—A Node-RED node to access Youtube Data API.
node-youtubeapi-simplifier(by Haidy777)—The Youtube-API probably isn't the simplest api in the world. So why isn't there a simplifier? Well, don't worry, now there is one :)
osjs-youtube-adapter(by Spaceboy Ross)—The YouTube API wrapped as a VFS adapter in OS.js V3.
spotivy(by Guilherme Ventura)—Spotify music videos downloader
steam-chat-bot(by See contributors)—Simplified interface for a steam chat bot with lots of built-in functionality
test-youtube-api—Test Youtube API NodeJS module
ydown—Downloads Youtube links and playlists (Audio only)
YouSlackBot(by SoNiKBooM)—Insert Youtube videos posted to Slack into a Youtube playlist.
youtube-album-uploader(by Jared Chapiewsky)—Uploads an mp3 album to Youtube
youtube-album-uploader-multiple(by Richard Haddad)—Uploads multiple mp3 files to youtube
youtube-channel-videos(by Alex Moore)—Youtube channel videos fetcher.
youtube-comment-sampler(by firstname.lastname@example.org)—Download 1000 relevant youtube comments for a youtube video to CSV
youtube-dler(by Ayoub Ider AGHBAL)—A command line tool to download youtube videos/audio and playlists
youtube-playlist-info(by Benjamin Kaiser)—Youtube playlist information fetcher.
youtube-vanitystats(by Sebastian Patten)—A scheduled job that will will query YouTube's API for a given video ID. It will then email you the number of views and amount of revenue you have made since the last time it was run.