RapidAPI logo

SpotifyPublicAPI

FREE
By dimas
Updated 4 months ago
Music
7.6/10
Popularity Score
355ms
Latency
100%
Success Rate

SpotifyPublicAPI API Documentation

Retrieve music information from the full Spotify catalog.

View API Details
POSTgetAlbum
POSTgetAlbumTracks
POSTgetArtist
POSTgetArtistAlbums
POSTgetArtistRelatedArtists
POSTgetArtistTopTracks
POSTgetTrack
POSTgetUserProfile
POSTsearchAlbums
POSTsearchArtists
POSTsearchPlaylists
POSTsearchTracks
POSTgetAlbum

Get an album

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
accessTokenCREDENTIALS
REQUIREDaccessToken obtained from Spotify
idSTRING
REQUIREDThe Spotify ID for the album.
accessTokenCREDENTIALS
REQUIREDaccessToken obtained from Spotify
idSTRING
REQUIREDThe Spotify ID for the album.
Code Snippet
unirest.post("https://SpotifyPublicAPIdimasV1.p.rapidapi.com/getAlbum")
.header("X-RapidAPI-Host", "SpotifyPublicAPIdimasV1.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://SpotifyPublicAPIdimasV1.p.rapidapi.com/getAlbum
Request Method: POST
Response Headers
Response Body
Log inSign up

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://SpotifyPublicAPIdimasV1.p.rapidapi.com/getAlbum")
.header("X-RapidAPI-Host", "SpotifyPublicAPIdimasV1.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