58 lines
4.2 KiB
Markdown
58 lines
4.2 KiB
Markdown
# 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](https://npmjs.com/package/ytmusic-api)
|
|
|
|
**Full documentation is available [here](http://ytmusic-api.zectan.com).**
|
|
|
|
## Motivation
|
|
|
|
I used to use [youtube-music-api](https://npmjs.com/package/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
|
|
|
|
## Credits
|
|
|
|
A lot of the credit should go to [youtube-music-api](https://npmjs.com/package/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 Mocha. To run the tests, run the command
|
|
|
|
```
|
|
$ npm run test
|
|
```
|
|
|
|
## Built with
|
|
|
|
- TypeScript
|
|
- TypeScript
|
|
- [](https://npmjs.com/package/@types/json-schema/v/7.0.11)
|
|
- [](https://npmjs.com/package/@types/mocha/v/10.0.1)
|
|
- [](https://npmjs.com/package/@types/node/v/18.11.17)
|
|
- [](https://npmjs.com/package/@types/tough-cookie/v/4.0.2)
|
|
- [](https://npmjs.com/package/typescript/v/4.9.4)
|
|
- Mocha
|
|
- [](https://npmjs.com/package/mocha/v/10.2.0)
|
|
- [](https://npmjs.com/package/mocha.parallel/v/0.15.6)
|
|
- [](https://npmjs.com/package/ts-mocha/v/10.0.0)
|
|
- VuePress
|
|
- [](https://npmjs.com/package/@vuepress/plugin-search/v/2.0.0-beta.46)
|
|
- [](https://npmjs.com/package/vuepress/v/2.0.0-beta.46)
|
|
- Miscellaneous
|
|
- [](https://npmjs.com/package/axios/v/0.27.2)
|
|
- [](https://npmjs.com/package/tough-cookie/v/4.1.2)
|
|
- [](https://npmjs.com/package/zod/v/3.20.2)
|
|
- [](https://npmjs.com/package/zod-to-json-schema/v/3.20.1) |