Socket
Socket
Sign inDemoInstall

ytmusic-api-extended

Package Overview
Dependencies
16
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ytmusic-api-extended

YouTube Music API


Version published
Weekly downloads
77
increased by600%
Maintainers
1
Install size
2.06 MB
Created
Weekly downloads
 

Readme

Source

YTMusic API

YouTube Music API (Unofficial) is a YouTube Music data scraper. It comes with TypeScript support API for return types. The NPM package can be found here

Motivation

I used to use youtube-music-api as my youtube music api data scraper. I liked looking into the source code of how it works but it never made sense to me. I also didn't like that there were no TypeScript annotations for the return types of methods. Because of this, I decided to build my own version of a youtube music api with TypeScript annotations, testing and written in a way I can understand.

Features

  • TypeScript Support for data return types
    • Data from YouTube can be inconsistent but YTMusic API has been tested and the data matches the TypeScript types 95% of the time
  • Scrape information directly from YouTube Music API
    • Search Suggestions
    • Songs
    • Videos
    • Artists
    • Albums
    • Playlists
    • Lyrics

Usage

import YTMusic from "ytmusic-api"

const ytmusic = new YTMusic()
await ytmusic.initialize(/* Optional: Custom cookies */)

ytmusic.search("Never gonna give you up").then(songs => {
	console.log(songs)
})

Credits

A lot of the credit should go to youtube-music-api. I build this package as a refactored and tested version of youtube-music-api with TypeScript annotations

Testing

YTMusic API's data return types are tested with Bun Test. To run the tests, run the command

$ bun test

Built with

FAQs

Last updated on 29 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc