🎵 A Youtube Music Downloader/API Running on Express 🖥️
- Filters the search for only songs, receive JSON data just like a search request on YouTube-Music.
- Method: GET
- Search for an album, results are of the same search request on YouTube-Music, but filtered to only show albums/singles.
- Method: GET
- Fetches the song's information, gives thumbnails, duration, year, etc.
- Method: GET
- Returns the album's description, tracks (videoId, name), year, playlistId, thumbnails, etc.
- Method: GET
- Note: Fetched tracks within this endpoint is not as accurate as getting the Official Audio for a song/track. For better results, use the endpoint
/api/get/album/playist/${playlistId}
for getting the proper tracks and their videoId's.
- Gets the album's tracks with their respective videoId's and some other information like year, thumbnails, track number, etc. Scrapes the unlisted playlist of the said album set by YouTube.
- Method: GET
- Streams a song when given a YouTube videoId, returns a readableStream
- Method: GET
- Downloads a song when given a videoId. Returns a buffer of the song with proper filename and tags, whenever parameters are added.
- Method: GET
Parameters that can be used (Album, Artist, Year, Track Number, Title, Cover)
(Downloading a song with tags)
/api/download/song/lXcX5llJeko?artist=The Fray&title=How To Save A Life&album=How To Save A Life&cover=https://lh3.googleusercontent.com/sB9QbA0jMTQ_4xKJdqt7tUEm_GPazioRHhZ4WWRuTKt7k9yVIKiYbAlpjYKGymR5Ru14e6W0Ta9WbT34=w544-h544-l90-rj
(Downloading a song with full tags)
/api/download/song/MT1j4LS8h8U?artist=Rick Astley&album=Together Forever EP&title=Together Forever (Reimagined)&cover=https://lh3.googleusercontent.com/zSpiBkVK0CY7wTa1xwmQCeAaF6196AFt456eTG6wonaYP_s7MxbkV6tvZ2oCAHLpRrqJXqIpxpTw8hFH=w544-h544-l90-rj&year=2022&track=2
Step 1: 🤲 Clone this directory using git
🤝
git clone https://github.com/Thanatoslayer6/ytm-dlapi.git
Step 2: 🏃 Go into the root directory and install required dependencies using npm ⌨️
cd ytm-dlapi/
npm install
Step 3: 🏆 Start and enjoy your new server 🏆
node index.js
😎 And other notable NodeJS Youtube Music projects 😎