npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tidalapi

v0.2.3

Published

Unofficial Node.js TIDAL API

Downloads

47

Readme

TidalAPI

Build Status npm version npm downloads NPM David

About

node.js TIDAL API. Use the TIDAL Web API simply using this module ;)

Created by Lucas Vasconcelos

NOTE: Currently not supporting facebook login.

How to use

Run the following:

npm install tidalapi

Obtain the Tidal token needed to use this API

As well as a TIDAL username and password, the Tidal API needs an API token which is unique to your apps. You can get this token by network-sniffing some application that uses TIDAL Playback feature, like Tidal for Windows, Tidal for Android, or CapTune from Sennheiser.

Obtaining a token from TIDAL for Windows

  • Install Fiddler and start it.
  • In Fiddler, click Tools > Options > Decrypt HTTPS Traffic
  • Install TIDAL for Windows and start it
  • In Fiddler, look for requests to api.tidal.com. Click a request, then on the right, click Inspectors > Headers. Underneath Miscellaneous you'll see X-Tidal-Token. This is a TIDAL Token you can use.

Usage

Simple usage searching and querying a track list

var TidalAPI = require('tidalapi');

var api = new TidalAPI({
  username: 'your-username-here',
  password: 'your-password-here',
  token: 'your-token-here',
  // Could also be 'LOSSLESS' but this only supported on premium subscriptions
  quality: 'HIGH'
});

Search

api.search({type: 'artists', query: 'Dream Theater', limit: 1}, function(data){
  console.log(data.artists);
})

api.search({type: 'albums', query: 'Dream Theater', limit: 1}, function(data){
  console.log(data.albums);
})

api.search({type: 'tracks', query: 'Dream Theater', limit: 1}, function(data){
  console.log(data.tracks);
})

api.search({type: 'tracks,albums,artists', query: 'Dream Theater', limit: 1}, function(data){
  console.log(data.tracks);
  console.log(data.albums);
  console.log(data.artists);
})

Track info

api.getTrackInfo({id: 22560696 }, function(data){
  console.log(data)
})

Streams

api.getStreamURL({id: 22560696}, function(data){
  console.log(data)
})

api.getVideoStreamURL({id: 25470315}, function(data){
  console.log(data)
})

Album Art

console.log(api.getArtURL('24f52ab0-e7d6-414d-a650-20a4c686aa57', 1280)) //coverid

Videos

api.getArtistVideos({id: 14670, limit: 2}, function(data){
  console.log(data)
})

FLAC tags

api.genMetaflacTags({id: 22560696, coverPath: './albumart.jpg', songPath: './song.flac'}, function(data){
  console.log(data)
  /* --remove-all-tags --set-tag="ARTIST=Dream Theater" --set-tag="TITLE=Along For The Ride" --set-tag="ALBUM=Dream Theater" --set-tag="TRACKNUMBER=8" --set-tag="COPYRIGHT=2013 Roadrunner Records, Inc." -set-tag="DATE=2013" --import-picture-from="./albumart.jpg" "./song.flac" --add-replay-gain */
})

Troubleshooting

500 error with 'Ooops, an unexpected error occurred'

Your TIDAL token is likely incorrect.