k
k
ksoft.js
Search…
Music
This API provides deep and powerful tools for searching lyrics, artists or albums. Unlike other APIs it can also search by lyrics and does not need separate artist and song name entries.

Get Lyrics for a song

1
ksoft.lyrics.get(song, options);
Copied!
Usage
Examples
Parameter
Type
song
String
options.textOnly
Boolean
Success: Returns Track
Not Found: Throws Error
1
ksoft.lyrics.get('Billie Eyelash - Bald Guy');
Copied!
1
ksoft.lyrics.get('Is this the real life? Is this just fantasy?',
2
{ textOnly: true });
Copied!

Search lyrics

1
ksoft.lyrics.search(query, options);
Copied!
Usage
Examples
Parameter
Type
query
String
options.limit
Number
options.textOnly
Boolean
Success: Returns Array<Track>
Not Found: Throws Error
1
ksoft.lyrics.search('Billie Eyelash', { limit: 5 })
2
.catch(err => console.log(err.message));
Copied!
1
ksoft.lyrics.search("I'm the baaaaaad guyyyy (duh)", { textOnly: true });
Copied!

Get Artist/Track/Album by ID

1
ksoft.music.artist(id);
2
ksoft.music.track(id);
3
ksoft.music.album(id);
Copied!
Usage
Examples
Parameter
Type
id
String
Success: Returns Artist/Track/Album
Not Found: Throws Error
1
ksoft.music.artist('28333');
Copied!
1
ksoft.music.track('628942');
Copied!
1
ksoft.music.album('88287');
Copied!

Get Music Recommendations (paid)

1
ksoft.music.recommendations(provider, tracks, token, options);
Copied!
Usage
Example
Parameter
Type
provider
String: 'spotify' | 'youtube' | 'youtube_ids' | 'youtube_titles'
tracks
Array<String> (track IDs or titles depending on provider)
token
String (YouTube API token)
options.limit
Number
Success: Returns Array<Suggestion>
1
ksoft.music.recommendations('youtube_titles', [
2
'Luis - Des',
3
'Luis - Pa',
4
'Fonsi - Ci',
5
'Fonsi - To'
6
], 'you-wish-i-put-one-here', { limit: 3 });
Copied!
Last modified 1yr ago