LastFm

FREE
By dimashirokov
Updated 5 months ago
Music
3.3/10
Popularity Score
59733ms
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
POSTgetAlbumInfo

Get the metadata and tracklist for an album on Last.fm using the album name or a musicbrainz id.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
artistSTRING
REQUIREDThe artist name.
albumSTRING
REQUIREDThe album name
apiKeyCREDENTIALS
REQUIREDA Last.fm API key.
Optional Parameters
usernameSTRING
OPTIONALThe username for the context of the request. If supplied, the user's playcount for this album is included in the response.
mbidSTRING
OPTIONALThe musicbrainz id for the album
autocorrectSTRING
OPTIONALTransform misspelled artist names into correct artist names, returning the correct version instead. The corrected artist name will be returned in the response.
langSTRING
OPTIONALThe language to return the biography in, expressed as an ISO 639 alpha-2 code.
Code Snippet
unirest.post("https://LastFmdimashirokovV1.p.rapidapi.com/getAlbumInfo")
.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/getAlbumInfo
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/getAlbumInfo")
.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