5.2.1 • Published 4 months ago

ytmusic-api v5.2.1

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
4 months ago

YTMusic API

License Languages Top Language Commit Activity Last commit

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

  • NodeJS
    • TypeScript
      • @types/tough-cookie
      • @typescript-eslint/eslint-plugin
      • @typescript-eslint/parser
      • bun-types
      • typescript
    • ESLint
      • eslint
      • eslint-config-prettier
      • eslint-plugin-simple-import-sort
      • prettier
    • Miscellaneous
      • arktype
      • axios
      • tough-cookie
5.2.1

4 months ago

5.2.0

4 months ago

5.0.3

4 months ago

5.0.2

4 months ago

5.1.0

4 months ago

5.0.1

5 months ago

5.0.0

5 months ago

4.4.0

7 months ago

4.3.0

9 months ago

4.2.0

10 months ago

4.1.0

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

4.0.2

1 year ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.0.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago