Code Monkey home page Code Monkey logo

ytm-dlapi's Introduction

ytm-dlapi

๐ŸŽต A Youtube Music Downloader/API Running on Express ๐Ÿ–ฅ๏ธ

A Quick Front-End that I created ๐Ÿ˜‘

Example Frontend

Searching and Getting an Album/Song's Information

/api/song/search?q={Song name}

  • Filters the search for only songs, receive JSON data just like a search request on YouTube-Music.
  • Method: GET

/api/album/search?q={Album name}

  • Search for an album, results are of the same search request on YouTube-Music, but filtered to only show albums/singles.
  • Method: GET

/api/get/song/${videoId}

  • Fetches the song's information, gives thumbnails, duration, year, etc.
  • Method: GET

/api/get/album/${albumId}

  • 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.

/api/get/album/playlist/${playlistId}

  • 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

Streaming

/api/stream/song/${videoId}

  • Streams a song when given a YouTube videoId, returns a readableStream
  • Method: GET

Downloading

/api/download/song/${videoId}

  • 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)

Examples:

(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

Local Installation

Requirements

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

Special Thanks to these wonderful projects: ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

ytdl-core

ytmusic-api

node-id3

adm-zip

JSZip

FileSaver.js

๐Ÿ˜Ž And other notable NodeJS Youtube Music projects ๐Ÿ˜Ž

ytm-dlapi's People

Contributors

thanatoslayer6 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.