

Say Hello to Our New Web API - Fogh
http://news.spotify.com/uk/2014/06/17/say-hello-to-our-new-web-api/

======
Soarez
There's already a node module [https://www.npmjs.org/package/spotify-
api](https://www.npmjs.org/package/spotify-api)

No code of course, just name-hoarding. FOSS can be really ugly sometimes.

~~~
secondreality
Since I've already made one and it's ready for use, I feel I need to piggyback
on your comment to mention it.

[https://www.npmjs.org/package/spotify-web-api-
node](https://www.npmjs.org/package/spotify-web-api-node)

------
mox1
Just as an FYI to everyone, Spotify does not allow any "commercialization" of
their APi's / Platform. (Learned this the hard way when I released my Spotify
app for $.99 on the app store).

[https://developer.spotify.com/developer-terms-of-
use/](https://developer.spotify.com/developer-terms-of-use/)

------
joshstrange
> With a user’s permission, developers can now access user profile information
> including playlists,

This is awesome news! The last time I tried to write something for Spotify to
front-load my last.fm (I know I'm late to the game) account but couldn't get
access to the playlists. Going to have to check this out when I get some time.

------
andyhmltn
Brilliant! I've been wanting to access my own playlists through an API for a
while to back them up

~~~
jal278
Just hacked this together:
[http://joellehman.com/playlist/](http://joellehman.com/playlist/)

Which should let you download you playlist in CSV

~~~
andyhmltn
Wow that's awesome. I've needed this for ages

------
jerhinesmith
What I'd really love (and have looked for in the past) is a way to
automatically push a song over to a specific spotify playlist every time I tag
a song on shazam (thinking like an IFTTT recipe). It looks like that might be
possible with this new api.

~~~
jeffasinger
Soundhound has a button to search on spotify after finding a song. It's a
bunch of clicks, but that's what I do now.

------
gbrhaz
I had a quick look, but to play a track, all I can see is a 30 second preview.
Am I missing something, or can you not get the track data from this API?

> EDIT: Should've read the first subtitle... "Our Web API lets your
> applications fetch data from the Spotify music catalog and manage user’s
> playlists."

~~~
adamcik
Streaming is only available through libspotify or the beta SDK on IOS. Rumors
from #spotify on freenode indicate that the SDK for other platforms is still
being worked on. But once it ships it will provide a minimal lib for streaming
and the web API will do everything else.

------
kenver
I really like Spotify and I love that they're making this API available. But
we just saw netflix shutting down their API. Are Spotify committed to keeping
this around, or will they just shut it off in a few months when it becomes too
much of a pain to manage?

~~~
thathonkey
I think they hope the API will be used to drive subscriptions to their
service. If that ends up being the case, they'll probably keep it around. Of
course, nobody can look into the future and see what will happen. Building a
business around a public API like this would probably not be a smart move...
yet.

------
eli
Is there an (easy to use) Spotify plugin to let my office-mates vote on or
suggest songs to play next? I know there are some hacky solutions, but this
new Web API seems like it should make that a lot easier.

~~~
jeffasinger
letsparty.fm is something we made, but it's based on rdio, not spotify, since
they have easier API access.

~~~
jeffasinger
This web API doesn't come close to helping with this problem, as it doesn't
allow you to play entire songs, or know when the current song is over.

Realized I didn't make it a link. [http://letsparty.fm](http://letsparty.fm)

------
joshvm
Would it kill them to fix some of the bugs in the desktop application first?
You can't even sort search results any more. This is apparently marked as a
"not now" concern. A lot of premium customers are deeply unsatisfied with the
way Spotify handled their latest update.

------
joshmn
Personally this is great timing for some of the features I'm needing to
develop [http://Listen2EDM.com](http://Listen2EDM.com) further. I'm sure that
music discovery, and the music community in general, will greatly benefit from
this!

------
guilhermesad
I've just pushed a ruby wrapper for it:
[https://github.com/guilhermesad/rspotify](https://github.com/guilhermesad/rspotify)
Any contributions would be very welcomed!

------
m_gloeckl
This sounds great, indeed. With a listening history on last.fm that reaches
back to early 2009, I always thought it would be great to have a service to
use the last.fm data to build dynamic playlists for spotify.

~~~
adamcik
Populate a
[http://developer.echonest.com/docs/v4/tasteprofile.html](http://developer.echonest.com/docs/v4/tasteprofile.html)
with the listening history and you can use it for dynamic playlisting using
the spotify catalog. That is as long as echonest matches the song metadata to
an id.

[http://static.echonest.com/enspex/web/ChillRadio/](http://static.echonest.com/enspex/web/ChillRadio/)
linked from the demos shows this for artists as a seed, but tasteprofiles as
the station seed works nicely as well :-)

~~~
m_gloeckl
Wow, that looks great. Thanks for the link!

------
x3ro
It doesn't seem possible to delete a playlist or remove tracks from one :(
Other than that it's pretty great, maybe I can automate my playlist management
now :)

~~~
adamcik
Same conclusion we also had in
[https://github.com/mopidy/pyspotify/issues/139](https://github.com/mopidy/pyspotify/issues/139)
when looking at if we should move away from libspotify in favor of the new web
API. For now I would stick with libspotify wrappers until a more complete
version of the API comes out.

------
instanttaylor
I was hoping they'd have a Radio API so Sonos and others could make a better
all around experience.

Maybe I missed it... or maybe it doesn't exist.

------
thesimon
Still no access to the current playing track which means I have to continue
using last.fm which feels a bit hacky :/

~~~
nuclear_eclipse
You can get that via dbus from the machine running Spotify. Check out my
spotify-gnome wrapper script at [https://github.com/jreese/spotify-
gnome](https://github.com/jreese/spotify-gnome)

Basically, you write a simple dbus app that listens for the appropriate song-
changed signals from Spotify, and then do with that as you wish. This might
not be as easy on Mac or Windows though, as I've only ever used it on Linux.

------
Kiro
Can you access the API without authenticating? I just want some basic song
info, not play anything.

~~~
thathonkey
You could have spent the 5 minutes on their website that I did to find the
endpoint reference which shows that yes, you can get to quite a bit of the API
without authenticating:

[https://developer.spotify.com/web-api/endpoint-
reference/](https://developer.spotify.com/web-api/endpoint-reference/)

------
nsxwolf
I wonder how long this will last.

~~~
ivraatiems
Probably just long enough for them to make a too-polite-to-be-ironic "thank
you for using our development environment" blog post where they shut it down
and shunt what's left to a private API for the apps they're currently trying
to acquire.

------
drsounds
My boss let me spend this workday with studying the new api

~~~
OutThisLife
"let"

------
imdsm
Insane. I was speaking about Spotify API about an hour ago on IRC, Google'd
around, found this, disregarded it (how new can it be?) and now it's at the
top of HN.

This keeps happening to me, with docker release, with deis, with vagrant, so
many things I talk about and then I look at hn and they're there, just waiting
for me.

This happens so often, we all say here to check HN after we discuss something,
because there will no doubt be a link ready for us. Starting to wonder if this
is actually just a news feed where you see what you need to see.

~~~
coob
[http://en.wikipedia.org/wiki/Baader-
Meinhof_phenomenon#Frequ...](http://en.wikipedia.org/wiki/Baader-
Meinhof_phenomenon#Frequency_illusion)

