Soundcloud API - Pull Artist Name and Song Title Separately?

痞子三分冷 提交于 2019-11-30 23:29:32

Well the API doesn't give you the fields separately, but depending on your application there might be a way to get that data anyway. I have written a webapp using the Soundcloud API and I am actually extracting the artist name separately. If you're interested, I can tell you howI did it. You need to apply some NLP-tricks and use regular expressions.

I'm in the process of building a Web app for a client who owns a record label and wants to publish 5000+ songs of varying artists and albums. I have diaected the api to death and found the best way to tie a track to an artist is by using tags. This way you can also search by the artist name and get results in the api. In my particular case I am using machine tags to store the artist, album and track name. I also store another tag as a key for finding only tracks that match that key so on my Web app I don't get tracks from other users, since you can't filter results by tags and genre when getting tracks from a specific user.

It's a but messy but it works. So something like this to get all songs by this artist on my Web app from a specific users account

/tracks.json?client_id=xxx&q=app:key=uniqueid&tags=app:artist=artist+name

You can also throw genre in there too if you wanted. Hope this was helpful

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!