Looking through the Soundcloud documentation - it doesn't appear that you can pull the artist name and the song name separately (or am I missing something?):
http://developers.soundcloud.com/docs/api/reference#playlists
ie:
for song https://soundcloud.com/yaz-francis-1/pompeii-bastille
Artist: Bastille
Song: Pompeii
Is it just combined in the tracktitle (title)? User is also not always the song artist name, but the username of the person who posted it to soundcloud.
If not, is there anyway to pull Artist Name and Song separately?
Any help would be greatly appreciated - thanks!
Best,
JP
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
Related
I'm trying to build a app that gets info from the Spotify API but since I don't have the Spotify ids I want to grab the ids using search queries.
I wanted to just try it so I tested it with an album called yellow and a band called SCANDAL. However when I query, say, https://api.spotify.com/v1/search?q=album:yellow+artist:scandal&type=album it comes up with nothing. However when I Google the band, I got an artist id: 7hTZwqQILVH4bAbN67CeEz from the URL.
using the get albums query(https://api.spotify.com/v1/artists/7hTZwqQILVH4bAbN67CeEz/albums?album_type=album&limit=5) it shows that the album exists but the original query didn't find it. Am I doing something wrong or does it only work with more popular artists (I tried other albums and it was fine)?
There doesn't seem to be anything wrong with your query. I think you are hitting a bug.
Bug reports for Spotify Web API can be found in Github issues
According to this bug:
https://github.com/spotify/web-api/issues/194
setting no market parameter will make it default to US. Your query seems to confirm this bug. Since SCANDAL Yellow is not available in the US, you will not see it in the results. If you add market=SG for instance, it will show up.
I have this app where I have the genre of music that the user is liking and whenever a user listens to a song he rates it.I want to show them the most relevant songs that the users might like.How do I carry on the database schema?What all data should I take from a user and how to get the most relevant song for the particular user?
Clear Explanation is appreciated.
This is a very active field of research known as recommender systems. If you wish to deal with it seriously, database design is only a first step; you will need to think about a suitable algorithm etc. Your question was specifically about the database schema, so I recommend the following readings:
RecDB in Action: Recommendation Made Easy in
Relational Databases
Recommender system datastructures
Are you recommending the user songs based on his ratings only? In that case, you might need every user in your database to rate at least a few songs. If a user has not yet rated any songs (maybe he signed up for your application recently), you will not be able to recommend him any song. This problem, is called "The Cold Start Problem".
Coming to the question, you can group songs by either genre, artist, album, year or you can take any combination of these parameters. So, your Songs table will have these values along with name of the song, and probably a unique ID. Users table can be as small as UserID and name or you can include his age, location so that you can recommend him songs based on other user's likings with similar age and location.
There would also be a User-Song map table that contains the ratings that every user gives different songs (one-to-many mapping). This table can be used to find a user's favourite song(s)
I know "extracting song or artist names from Youtube" is not possible by using Youtube's data API. However, I have found several websites that have extracted the artist or song names successfully. I guess they are using machine learning or something else.
Is there any common practice to extracting those artist or song names?
You can extract artists and song titles from extra description, though there is one downside, the extra information may not appear in some countries (outside of United States), so you will need a proxy that is located in U.S, you can use Yahoo's YQL service to avoid this issue. The DIV element "watch-description-extra-info" will have all the extra information you need.
I'm using the itunes enterprise api and I'm trying to use it to extract information on certain artists.
Reading their little guide on how to use it, they give an example url of
https://itunes.apple.com/artist/scritti-politti/id614113
which returns the exact data I need, the thing is I'm not sure where to find the artist id, is there any way I can do a search based on simply the artist name? Or do a search somewhere based on the artist name to find the artist id and then use it in this url.
Thanks
First I used this url
http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/itmsSearch?lang=1&output=json&country=US&term=rhianna&media=music&limit=1
were rhianna can be replaced with whatever artist you're looking up,
from that I can extract the artist id from artistLinkUrl and then make the request using that artist id in the enterprise api.
So I'm working on an application that has a feature that generates a list of 100 or so artists that are similar to those in the user's music catalog using the Echo Nest API. Then, a user can supply a certain year, and, based on the similar artists, the application will return a list of albums that were released on that year.
The only problem is that I have no idea how to filter albums based on year. The Echo Nest API doesn't really do much with albums. The Discogs and Last.fm APIs work with albums, and the Discogs API has data about albums' release dates, but there is no way to filter an initial query by release date. For example, if I have the artist Fleet Foxes and I want to filter it by albums released in 2011, there is no option to search for albums by the Fleet Foxes confined to release dates of 2011.
The only option I can really see at this point is iterating over EVERY album an artist has and only adding those albums that meet my specifications. However, this is obviously very heavy on both the APIs and my server, especially considering that many of the artists in the list of 100 similar artists will have no albums that match my criteria and that many artists have well within the range of 100 albums when you take into consideration singles, remixes, etc.
Does anyone see a better way of doing this?
If an API really doesn't have any way to filter by year, then yes, of course you will have to pull down all of the releases and filter them after the fact.
If you think this is a burden on your code and/or their server, you should file a feature request to add the filtering.
However, you should make sure first that they really don't provide such a thing. Most REST APIs separate "fetch" and "search". For example, http://api.example.com/artists/12345/releases may not have any way to filter it, but http://api.example.com/search?type=releases&artist=12345&year=2011 may exist.
Without looking into all of the APIs in detail, a quick check of Discogs' "Run a search query" docs shows that you can include a year criterion in the search (although it looks like maybe you can't actually search by artist ID, just by artist name?).