Class
Kind: global class
- Tidal
- new Tidal([options])
- .login(username, password) ⇒
Promise
- .search(query, type, [limit]) ⇒
Promise
- .getTrack(id) ⇒
Promise
- .getFavoriteTracks() ⇒
Promise
- .getAlbum(id) ⇒
Promise
- .getAlbumTracks(id) ⇒
Promise
- .getTopAlbums() ⇒
Promise
- .getNewAlbums() ⇒
Promise
- .getStaffPickAlbums() ⇒
Promise
- .getFavoriteAlbums() ⇒
Promise
- .getArtist(id) ⇒
Promise
- .getArtistAlbums(id) ⇒
Promise
- .getArtistEPsAndSingles(id) ⇒
Promise
- .getArtistCompilations(id) ⇒
Promise
- .getArtistTopTracks(id, [limit]) ⇒
Promise
- .getSimilarArtists(id) ⇒
Promise
- .getFavoriteArtists() ⇒
Promise
- .getPlaylist(uuid) ⇒
Promise
- .getPlaylistTracks(uuid) ⇒
Promise
- .getFavoritePlaylists() ⇒
Promise
- .getPlaylists() ⇒
Promise
- .artistPicToUrl(uuid) ⇒
Object
- .albumArtToUrl(uuid) ⇒
Object
Param | Type | Default | Description |
---|---|---|---|
[options] | object |
Tidal options (optional) | |
[options.countryCode] | string |
"US" |
Tidal country code |
[options.limit] | number |
1000 |
API results limit |
login to Tidal in order to use methods that require authentication
Kind: instance method of Tidal
Fulfil: Object
- user data object (see example for object properties)
Reject: Error
Param | Type | Description |
---|---|---|
username | string |
Tidal username or email |
password | string |
Tidal password |
Example
tidal.login('username', 'password')
// returns a promise that resolves to
{
userId: 49927020,
sessionId: '24d3d406-e6b9-457a-bf57-eac7b113a20c',
countryCode: 'US'
}
search for artists, albums, tracks, or playlists
Kind: instance method of Tidal
Fulfil: Array
- an array of objects (object properties are dependent on search type)
Reject: Error
Param | Type | Default | Description |
---|---|---|---|
query | string |
search query | |
type | string |
search type ('artists', 'albums', 'tracks', 'playlists') | |
[limit] | number |
25 |
search limit |
Example
tidal.search('Four Year Strong', 'artists', 1)
// returns a promise that resolves to:
[
{
"id": 3575680,
"name": "Four Year Strong",
"url": "http://www.tidal.com/artist/3575680",
"picture": "04d63cd8-a1a5-42e0-b1ec-8e336b7d9200",
"popularity": 28
}
]
get a track by its id
Kind: instance method of Tidal
Fulfil: Object
- a track object (see example for object properties)
Reject: Error
Param | Type | Description |
---|---|---|
id | number |
track id |
Example
tidal.getTrack(64975224)
// returns a promise that resolves to:
{
"id": 64975224,
"title": "22 (OVER S∞∞N)",
"duration": 168,
"replayGain": -10.71,
"peak": 0.692531,
"allowStreaming": true,
"streamReady": true,
"streamStartDate": "2016-09-30T00:00:00.000+0000",
"premiumStreamingOnly": false,
"trackNumber": 1,
"volumeNumber": 1,
"version": null,
"popularity": 47,
"copyright": "2016 Jagjaguwar",
"url": "http://www.tidal.com/track/64975224",
"isrc": "US38Y1630001",
"editable": true,
"explicit": false,
"audioQuality": "LOSSLESS",
"artist": {
"id": 3566315,
"name": "Bon Iver",
"type": "MAIN"
},
"artists": [
{
"id": 3566315,
"name": "Bon Iver",
"type": "MAIN"
}
],
"album": {
"id": 64975223,
"title": "22, A Million",
"cover": "5ac41fbb-927b-427e-8224-87bf12d218a3"
}
}
get your favorite (starred) tracks (requires login() to be called)
Kind: instance method of Tidal
Fulfil: Array
- an array of track objects
Reject: Error
See
Example
tidal.getFavoriteTracks()
get an album by its id
Kind: instance method of Tidal
Fulfil: Object
- an album object (see example for object properties)
Reject: Error
Param | Type | Description |
---|---|---|
id | number |
album id |
Example
tidal.getAlbum(80216363)
// returns a promise that resolves to:
{
"id": 80216363,
"title": "Pacific Daydream",
"duration": 2069,
"streamReady": true,
"streamStartDate": "2017-10-27T00:00:00.000+0000",
"allowStreaming": true,
"premiumStreamingOnly": false,
"numberOfTracks": 10,
"numberOfVideos": 0,
"numberOfVolumes": 1,
"releaseDate": "2017-10-27",
"copyright": "2017 Weezer under exclusive license to Crush Music / \
Atlantic Recording Corporation for the United States and Crush Music / \
WEA International Inc. for the world excluding the United States. \
A Warner Music Company.",
"type": "ALBUM",
"version": null,
"url": "http://www.tidal.com/album/80216363",
"cover": "86538ca7-08fd-40ff-9a75-af88d74d1f48",
"videoCover": null,
"explicit": false,
"upc": "075679889355",
"popularity": 58,
"audioQuality": "LOSSLESS",
"artist": {
"id": 30157,
"name": "Weezer",
"type": "MAIN"
},
"artists": [
{
"id": 30157,
"name": "Weezer",
"type": "MAIN"
}
]
}
get album tracks by album id
Kind: instance method of Tidal
Fulfil: Array
- an array of track objects
Reject: Error
See: getTrack - track object example
Param | Type | Description |
---|---|---|
id | number |
album id |
Example
tidal.getAlbumTracks(80216363)
get top 20 albums on Tidal
Kind: instance method of Tidal
Fulfil: Array
- an array of album objects
Reject: Error
See: getAlbum - album object example
Example
tidal.getTopAlbums()
get new albums on Tidal
Kind: instance method of Tidal
Fulfil: Array
- an array of album objects
Reject: Error
See: getAlbum - album object example
Example
tidal.getNewAlbums()
get staff pick albums on Tidal
Kind: instance method of Tidal
Fulfil: Array
- an array of album objects
Reject: Error
See: getAlbum - album object example
Example
tidal.getStaffPickAlbums()
get your favorite (starred) albums (requires login() to be called)
Kind: instance method of Tidal
Fulfil: Array
- an array of album objects
Reject: Error
See
Example
tidal.getFavoriteAlbums()
get an artist by its id
Kind: instance method of Tidal
Fulfil: Object
- an artist object (see example for object properties)
Reject: Error
Param | Type | Description |
---|---|---|
id | number |
artist id |
Example
tidal.getArtist(3575680)
// returns a promise that resolves to:
{
"id": 3575680,
"name": "Four Year Strong",
"url": "http://www.tidal.com/artist/3575680",
"picture": "04d63cd8-a1a5-42e0-b1ec-8e336b7d9200",
"popularity": 28
}
get artist albums by artist id
Kind: instance method of Tidal
Fulfil: Array
- an array of album objects
Reject: Error
See: getAlbum - album object example
Param | Type | Description |
---|---|---|
id | number |
artist id |
Example
tidal.getArtistAlbums(3575680)
get artist EPs and singles by artist id
Kind: instance method of Tidal
Fulfil: Array
- an array of album objects
Reject: Error
See: getAlbum - album object example
Param | Type | Description |
---|---|---|
id | number |
artist id |
Example
tidal.getArtistEPsAndSingles(3575680)
get compliations that artist has appeared on by artist id
Kind: instance method of Tidal
Fulfil: Array
- an array of album objects
Reject: Error
See: getAlbum - album object example
Param | Type | Description |
---|---|---|
id | number |
artist id |
Example
tidal.getArtistCompilations(3575680)
get top tracks by artist
Kind: instance method of Tidal
Fulfil: Array
- an array of track objects
Reject: Error
See: getTrack - track object example
Param | Type | Default | Description |
---|---|---|---|
id | number |
artist id | |
[limit] | number |
10 |
results limit |
Example
tidal.getArtistTopTracks(3575680)
get similar artists
Kind: instance method of Tidal
Fulfil: Object
- artist object
Reject: Error
See: getArtist - artist object example
Param | Type | Description |
---|---|---|
id | number |
artist id |
Example
tidal.getSimilarArtists(3575680)
get your favorite (starred) artists (requires login() to be called)
Kind: instance method of Tidal
Fulfil: Array
- an array of artist objects
Reject: Error
See
Example
tidal.getFavoriteArtists()
get a playlist by its uuid
Kind: instance method of Tidal
Fulfil: Object
- playlist object (see example for object properties)
Reject: Error
Param | Type | Description |
---|---|---|
uuid | string |
playlist uuid |
Example
tidal.getPlaylist('1c5d01ed-4f05-40c4-bd28-0f73099e9648')
// returns a promise that resolves to:
{
"uuid": "1c5d01ed-4f05-40c4-bd28-0f73099e9648",
"title": "Get Down On It: Soul, Funk and Disco Supremo",
"numberOfTracks": 100,
"numberOfVideos": 0,
"creator": {
"id": 0
},
"description": "Get down and dirty with some of the finest soul, funk \
and four-to-the floor disco out there. Bound to get the blood pumping, \
this playlist boasts more hits than a boxing match, more hooks than a \
tackle box and marks the perfect prescription both for champagne days \
and boogie nights and alike. Whether you feel like being a sex machine \
or simply wish to dance to the music, rock your body, dig it and don't \
stop 'til you get enough! ",
"duration": 25732,
"lastUpdated": "2017-01-18T16:31:51.839+0000",
"created": "2016-09-22T16:42:40.911+0000",
"type": "EDITORIAL",
"publicPlaylist": true,
"url": "http://www.tidal.com/playlist/1c5d01ed-4f05-40c4-bd28-0f73099e9648",
"image": "7a707631-02cf-47d8-a34c-e1395165f169",
"popularity": 0
}
get playlist tracks by playlist uuid
Kind: instance method of Tidal
Fulfil: Array
- an array of track objects
Reject: Error
See: getTrack - track object example
Param | Type | Description |
---|---|---|
uuid | string |
playlist uuid |
Example
tidal.getPlaylistTracks('1c5d01ed-4f05-40c4-bd28-0f73099e9648')
get your favorite (starred) playlists (requires login() to be called)
Kind: instance method of Tidal
Fulfil: Array
- an array of playlist objects
Reject: Error
See
- login - login method must be called first
- getPlaylist - playlist object example
Example
tidal.getFavoritePlaylists()
get your created playlists (requires login() to be called)
Kind: instance method of Tidal
Fulfil: Array
- an array of playlist objects
Reject: Error
See
- login - login method must be called first
- getPlaylist - playlist object example
Example
tidal.getPlaylists()
get valid urls to artist pictures
Kind: instance method of Tidal
Param | Type | Description |
---|---|---|
uuid | string |
artist picture uuid (can be found as picture property in artist object) |
Example
tidal.artistPicToUrl('04d63cd8-a1a5-42e0-b1ec-8e336b7d9200')
// returns
{
sm: 'https://resources.tidal.com/images/04d63cd8/a1a5/42e0/b1ec/8e336b7d9200/160x107.jpg',
md: 'https://resources.tidal.com/images/04d63cd8/a1a5/42e0/b1ec/8e336b7d9200/320x214.jpg',
lg: 'https://resources.tidal.com/images/04d63cd8/a1a5/42e0/b1ec/8e336b7d9200/640x428.jpg'
}
get valid urls to album art
Kind: instance method of Tidal
Param | Type | Description |
---|---|---|
uuid | string |
album art uuid (can be found as cover property in album object) |
Example
tidal.albumArtToUrl('9a56f482-e9cf-46c3-bb21-82710e7854d4')
// returns
{
sm: 'https://resources.tidal.com/images/9a56f482-e9cf-46c3-bb21-82710e7854d4/160x160.jpg',
md: 'https://resources.tidal.com/images/9a56f482-e9cf-46c3-bb21-82710e7854d4/320x320.jpg',
lg: 'https://resources.tidal.com/images/9a56f482-e9cf-46c3-bb21-82710e7854d4/640x640.jpg',
xl: 'https://resources.tidal.com/images/9a56f482-e9cf-46c3-bb21-82710e7854d4/1280x1280.jpg'
}