LastFm

FREE
By dimashirokov
Updated 5 months ago
Music
2.6/10
Popularity Score
59474ms
Latency
-
Success Rate

LastFm API Documentation

Get top artists, tracks and users from online radio.

View API Details
POSTgetAlbumInfo
POSTgetAlbumTags
POSTgetArtistCorrection
POSTgetArtistInfo
POSTgetArtistTags
POSTgetSession
POSTgetSimilarArtists
POSTgetSimilarTags
POSTgetSimilarTracks
POSTgetTagInfo
POSTgetTagTopAlbums
POSTgetTagTopArtists
POSTgetTopAlbumTags
POSTgetTopArtistAlbums
POSTgetTopArtistTags
POSTgetTopArtistTracks
POSTgetTopArtistsByCountry
POSTgetTopArtistsChart
POSTgetTopTagTracks
POSTgetTopTags
POSTgetTopTagsChart
POSTgetTopTrackTags
POSTgetTopTracksByCountry
POSTgetTopTracksChart
POSTgetTrackCorrection
POSTgetTrackInfo
POSTgetTrackTags
POSTgetUserArtistTracks
POSTgetUserArtists
POSTgetUserFriends
POSTgetUserInfo
POSTgetUserLovedTracks
POSTgetUserPersonalTags
POSTgetUserRecentTracks
POSTgetUserTopAlbums
POSTgetUserTopArtists
POSTgetUserTopTags
POSTgetUserTopTracks
POSTgetUserWeeklyAlbumChart
POSTgetUserWeeklyArtistChart
POSTgetUserWeeklyChartList
POSTgetUserWeeklyTrackChart
POSTgetWeeklyTagChartList
POSTloveTrack
POSTscrobbleSingleTrack
POSTscrobbleTracks
POSTsearchAlbum
POSTsearchArtist
POSTsearchTracks
POSTtagAlbum
POSTtagArtist
POSTtagTrack
POSTunloveTrack
POSTuntagAlbum
POSTuntagArtist
POSTuntagTrack
POSTupdateNowPlayingTrack
POSTsearchAlbum

Search for an album by name. Returns album matches sorted by relevance.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
apiKeyCREDENTIALS
REQUIREDA Last.fm API key.
albumSTRING
REQUIREDThe album name
Optional Parameters
limitSTRING
OPTIONALThe number of results to fetch per page. Defaults to 30.
pageSTRING
OPTIONALThe page number to fetch. Defaults to first page.
Code Snippet
unirest.post("https://LastFmdimashirokovV1.p.rapidapi.com/searchAlbum")
.header("X-RapidAPI-Host", "LastFmdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://LastFmdimashirokovV1.p.rapidapi.com/searchAlbum
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://LastFmdimashirokovV1.p.rapidapi.com/searchAlbum")
.header("X-RapidAPI-Host", "LastFmdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication