It seems that Spotify has made some changes to how one should format links when performing more complex searches, causing some problems with one of the services I work on. This post describes my solution.
We used to format the links like this to open the spotify app and performing a search (mouse over and inspect to see):
Castle on the hill Ed Sheeran.
The answer from the spotify app:
Megabig sad face. Huge.
I put a question up on Stack overflow, but no luck there, and I got a negative answer from a moderator at the official Spotify developer forum.
Luckily I had better success with contacting @SpotifyCares through Twitter.
Thanks! We’ve spoken with the relevant team regarding this. The search parameter has to be URI encoded, and the different field values have to be wrapped in «quotes». You can think of it like this – ‘spotify:search:’ + encodeURIComponent(‘track:»castle on the hill» artist:»ed sheeran»‘). We hope this helps. In the meantime, check out to our friends at @SpotifyPlatform. They’ll be able to help further :) /Q
So, grabbing track:"castle on the hill" artist:"ed sheeran"
and jumping over to http://meyerweb.com/eric/tools/dencoder/ for a quick encode gives me track%3A%22castle%20on%20the%20hill%22%20artist%3A%22ed%20sheeran%22
.
Then just add spotify:search:
in front, and viola:
Castle on the hill Ed Sheeran.
Boyahh! Big happyface! The biggest!
Hi Morten,
do you know if this still holds true?
I get the impression that the search tags ‘artist’ and ‘title’ are ignored.
To my impression only ‘year’, ‘genre’ and ‘label’ work, which would go along with https://support.spotify.com/de/article/search/
Misssed this. Probably not, pretty old post, they have probably changed things many times since I wrote it.