New Releases

Explore newly released albums using the Spotify API.

Is it boring to listen to the same old music over and over? The Get New Releases endpoint of the Spotify API can help get rid of boredom.

The base URL https://api.spotify.com/v1/browse/new-releases is used to get a list of newly released albums featured on Spotify.

Request parameters

The information obtained by calling this endpoint can be filtered using the following query parameters.

Query parameter

Category

Type

Description

limit

Optional

Integer

This limits the number of items to be returned in the response. Its value ranges from 0 to 50 and the default value is 20.

market

Optional

String

This is an ISO 3166-1 alpha-2 country code that we can use to fetch only the content available in a specific country. Some examples of country codes are us for the United States, es for Spain, and fr for France. If we send an auth code access token in the request header, the user's country will take priority over the country specified in this parameter.

offset

Optional

Integer

This parameter can be used to offset the first item we get in response.

Fetch new releases

The following code uses this endpoint to get the information about newly released albums via the client credentials access token for authorization.

Press + to interact
url = 'https://api.spotify.com/v1/browse/new-releases'
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {{CLIENT_CREDENTIALS_ACCESS_TOKEN}}'
}
response = requests.request("GET", url, headers=headers)
print(json.dumps(response.json(), indent=4))

We can use the limit parameter to limit the number of albums we get in response. Let's say we want to get only ten albums in response. In that case, we append ?limit=10 to the base URI in line 1.

Note: If we use the authorization code access token for verification, we'll get a different list of albums. This list will be filtered based on the country associated with our ID since we ourselves are the users who granted the permission for this token.

Response fields

Given below are some important response fields from the code above:

Response field

Type

Description

album_type

String

This defines the albums type.

spotify

String

We can use this link to redirect the user to the requested item on Spotify.

id

String

This is the Spotify ID of the requested item.

name

String

This is the name of the requested item.

available_markets

Array of objects

This is a list of countries where the album is available.

images

Array of objects

This array contains the links of images associated with the albums and their dimensions.

release_date

String

This is the release date of the album.

total_tracks

Integer

This is the number of tracks the album contains.