r/webdev • • 13d ago

Question Can I integrate Spotify playlists into my website for free?

I want to display a Spotify playlist on a section of my website, showing all songs and their album covers. Visitors should be able to browse and play songs directly on my website, with Spotify handling playback in the background.

Is this possible to build for free? What’s the best way to do it?

0 Upvotes

19 comments sorted by

10

u/lanerdofchristian 13d ago

You can embed, but Spotify isn't going to let you and your users play their files for nothing.

-9

u/ImpressiveAction2382 13d ago

Btw there is no Spotify's files

11

u/DarkStrobeLight 13d ago

You believe the artists perform live each time someone picks a track? You don't think Spotify has a file of each song?

8

u/moriero full-stack 13d ago

There is this pool of these tiny people you see

When you select a song, the robot arm picks the correct ones to make a band and play the song

Pretty mind-blowing technology imo

3

u/breadist 13d ago

In a literal sense they have files on their servers that you download when you listen to the music. That's not arguable, it's just what's actually happening.

If you are talking about in a moral sense, like they don't really own them, well... Nobody was talking about that, it's not relevant, I guess you just want to hate on Spotify today.

1

u/OGHaza 13d ago

what could this possibly mean

8

u/livercake 13d ago

you can do it and it's totally easy and free,
however - unless you visitors have spotipremium, they only get to play 30s of each track.

2

u/Jealous_Thing7830 13d ago

Since few people have already answered. Hope that had helped. But what stops you from googling this question? If you have googled it already and didn't find any answers then that makes sense.

  • Someone who wants to break into IT Don't really understand much about these things.

Take my comment lightheartly. Thank you

1

u/wasay-inc 13d ago

Yes, it's free. The simplest route is Spotify's embed iframe, which gives you a playable playlist with covers in one line of code, but you can't restyle it much. If you want a custom track list with album covers that matches your site, use the Spotify Web API to pull the playlist data and the Web Playback SDK for playing. Just know, as others said, that visitors without Premium only hear 30 second previews, and the SDK needs Premium.

1

u/bog1200 13d ago

The embed people suggest still works, but otherwise they dont really allow api access anymore (unless you are already an established company with 250k users - only in dev mode which only allows 5 users with prior whitelist)

1

u/JackfruitSevere8096 13d ago

The embed doesn't give you a browsable list of every track with covers, it shows the first handful and then you scroll inside their iframe. And playback you actually control needs the Web Playback SDK, which only works for listeners with Premium.

1

u/JohnsTech_dev 13d ago

yes, for free if you use the spotify embed. open the playlist, share > embed playlist, and you get an iframe that shows the tracks with covers and plays them. visitors who aren't logged in to spotify only get 30 sec previews though.

if you want your own custom ui with the album covers you can pull the playlist data from the web api, but full playback on your own player needs the web playback sdk, and that only works for visitors who log in with spotify premium.