Exposing Spotify's "Did you mean" feature via web api

I'm writing a website that uses Spotify's web api to search for music. A common issue is people don't always know the correct spelling of a track title or an artist's name.

For example if I search for Danza Kaduro using the webapi:

http://ws.spotify.com/search/1/track.json?q=artist:danza+kaduro

The response is:

{"info": {"num_results": 0, "limit": 100, "offset": 0, "query": "artist:danza kaduro", "type": "track", "page": 1}, "tracks": []}

But in my desktop Spotify it auto-corrects, and on android has a DID YOU MEAN? suggestion of the correct spelling "Danza Kuduro".

Is this available to third parties? Is there another service that could be used to correct the spelling of artists or tracks when zero results are returned?


This feature is not available to third parties. It is mostly a technical reason. It just has not been implemented and it is unlikely to be in the near future. (yes, I work for Spotify)

Other services that could be used for this could is just google. If you don't get a result from spotify search, ask google, if google suggest something else, search for that in Spotify.

https://developers.google.com/custom-search/v1/overview

Check spelling.correctedQuery on:

https://developers.google.com/custom-search/v1/cse/list

Echonest has a more proper artist database and also a fuzzy_match query parameter that seems to suggest this would help, but I couldn't make it find Danza Kuduro by searching for danza kaduro.

http://developer.echonest.com/docs/v4/artist.html#search

链接地址: http://www.djcxy.com/p/9464.html

上一篇: 可以保存Spotify搜索API的结果吗?

下一篇: 通过web api暴露Spotify的“你的意思”功能