Skip to main content
← Data, API & Backend
Data, API & Backend November 27, 2022 · 1 reply

SPOTIFY API - Get albums from playlist

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

I'm working on a little app to track my vinyl album collection. I was hoping I could connect to Spotify and use a playlist as the "database" for what albums are in a collection. But I'm running into a snag and would be grateful for some input before exploring more complex solutions.

I've got the GET /playlists/playlist_id/tracks request working. But I need a way to get the unique albums from the playlist. Right now, if the playlist has 5 songs from the same album, I get 5 items in the response. But what I want is the 1 album all 5 songs belong to. I need an array of unique albums in a playlist. I've tinkered around with fields to filter the query but haven't had any luck. 

Is there any way to filter the "Get Playlist Items" request to return the unique albums that belong to that playlist? 

My next option is to try Xano to transform the data into the format I need. But I wanted to see if there is another way to achieve this without adding the complexity of Xano into the mix.

I'm aware that Discogs exists. But their API has other problems, like using OAuth 1.0.

Thanks!

1 reply

Pau Bravo team November 29, 2022

I guess you need another approach, the easier would be adding only one song for each album, but in a more common scenario you would use a database or spreadsheet to save your collection instead of a playlist. So you have more control of it, you can use a lot of different solutions for that.

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord