youtube-api
A Node.JS module, which provides an object oriented wrapper for the Youtube v3 API.
☁️ Installation
# Using npm npm install --save youtube-api # Using yarn yarn add youtube-api
📋 Example
/** * 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.// https://developers.google.com/youtube/v3/guides/moving_to_oauth#service_accountslet 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. 🚀
📝 Documentation
The official Youtube documentation is a very useful resource.
- Activities
- ChannelBanners
- Channels
- GuideCategories
- PlaylistItems
- Playlists
- Search
- Subscriptions
- Thumbnails
- VideoCategories
- Videos
If you have any questions, please ask them on Stack Overflow and eventually open an issue and link your question there.
Authentication
OAuth (Access Token)
Youtube;
OAuth (Refresh Token)
Youtube;
Server Key
Only for requests that don't require user authorization (certain list operations)
Youtube;
😋 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 🚀
-
—I love books! I will remember you after years if you buy me one. 😁 📖
-
—You can make one-time donations via PayPal. I'll probably buy a
coffeetea. 🍵 -
—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
-
Bitcoin—You can send me bitcoins at this address (or scanning the code below):
1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6
Thanks! ❤️
💫 Where is this library used?
If you are using this library in one of your projects, add it in this list. ✨
youtube-playlist-info
node-youtubeapi-simplifier
youtube-channel-videos
YouSlackBot
ydown
youtube-dler
test-youtube-api
steam-chat-bot
youtube-vanitystats
node-red-node-youtube
kyot-sunday-playlists
anitube
mediacenterjs-youtube
node-red-contrib-youtube
pullplaylist
youtube-album-uploader
mediacenterjs
adasq-services-ytv
youtube-comment-sampler
botyo-command-youtube
muzier-cli
osjs-youtube-adapter
@zlucy/lucy-search
youtube-album-uploader-multiple
chewb-youtube-uploader
hpcbot
nodejs-youtube-uploader
spotivy
@dottjt/mediareade