can I filter a spotify search by region

We're building an app that allows users to add songs to a special type of playlist and we're using the search api. At the moment, we're only targeting the US market, so it would be nice if we could pass in a region parameter of "US." The app we're building will be rolled out to several spotify markets over time, so this parameter would be part of a localization effort.

Is the ability to filter a search be region built into the web api?


Unfortunately, you can't. You'll have to filter the search results yourself by checking the territories property of each item, ie the following (for Madonna albums).

...
{"territories": "AD AI AL AM AT AU AW AX AZ BA BG BM BV BY CA CH CY CZ DE DK EE ES FI FK FO FR GB GE GF GG GI GL GP GR GS HR HU IE IM IO IS IT JE KY LT LU LV MC MD MK MQ MS MT NC NL NO NZ PF PL PM PN PT RE RO RU SE SH SI SJ SK SM TC TF TR UA US VA VG WF YT"}}
...

If the US country code is in there, it's available in the US and so forth.

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

上一篇: Spotify开发人员搜索

下一篇: 我可以按区域过滤Spotify搜索吗?