I'm trying to get a large list of songs released in year X, together with their number of plays/streams.
I've been using Spotify API, and I have a number of highly popular songs. Now, for my purposes, I also need a list of non-popular songs (low play counts). I am wondering if there is any strategy to get a list of songs (maybe last played ones?), and extract their release year and number of total plays?
I've been going through the API documentation and I can only find 'popularity', which seems different from total number of plays. Secondly, I haven't found a way to get a list of last played songs yet. Should I be considering another type of strategy?
I know that you can get a list of recently played songs of all users in certain user groups in last.fm. Perhaps there is something similar in Spotify API?
Unfortunately, there is no way to get play counts through the Spotify API, only the Popularity metric.
Related
I'm working on a projected with Spotify data and I need a list of the most-streamed songs of all time on Spotify. (Not my own listening history, but the global stream counts) This information should be out there, because songs on Spotify publicly display their stream count, but there's no actual list of the most-streamed songs beyond the first 100 or 200. I want to be able to get as many songs as I want, or at least 1000 or 2000. I'm using python for this but could use something else if necessary. I've found SpotiPy, but it doesn't seem to have this capability as far as I can tell.
I looked for answers online but found nothing. And I've emailed Spotify and even gotten responses, but their responses weren't at all helpful. They either didn't understand my question or redirected me to their research and developer sites which don't see to have what I want.
I am looking to get the MFCC(Mel-frequency cepstrum coefficients) of a spotify track. My main aim is to identify genre of a track, and the algorithm which I'm studying right now uses MFCC to extract features of a track.
I think there might be 2 ways to do this:
Spotify's API has an endpoint called https://api.spotify.com/v1/audio-analysis/{id}. This is what the output looks like for a track. Maybe there is a way to get MFCC from this output?
Get raw audio features of the track from an API endpoint and then use a (different) library to apply MFCC on the features.
Or, is there any other method I can try?
Thanks :)
Edit :
The output of audio-analysis API for a track given here contains a key called "tmfccrack". Is this related to the MFCC?
I found out that you can get the genre of a Spotify track by getting the genre of the corresponding artist through the Spotify API. That gets me what I want for now, but I think I should keep the question open because it asks for the MFCC of a track and not just the genre.
first time posting.
I wanted to ask if anyone knows how I can search on YouTube for, let's say, music video's that have been viewed between a set number of times. Like the title says for example, between 9 and 11 million times.
One reason I want to do this is because I want to find good music that I haven't heard before. The logic I'm working on is that the Got Talent type video's that get viewed millions of times are generally viewed that many times for one of two reason. 1) they're amazing. 2) they're embarrassingly horrible.
And though I don't think a song being popular will necessarily mean I'll like it, I'm hoping this method will be successful to some degree.
Another reason is to look for trailers for independent films with a similar logic as above. Though with these movies I think I only hear about them six months to a year after they've been released because they're flying under the radar.
If I were to be able to search for movie trailers with 'x' number of views though.. for example, between 500,000 and a million, maybe I'd be able to find movies that I'll like quicker than via time passing and them getting mentioned to me by a friend.
Any help would be greatly appreciated as I've wanted to be able to perform these kind of searches for awhile now.
thanks
You will need to use YouTube API v3.
I havent written this exact request but it looks like you can list videos then filter by 'Chart' = 'mostPopular'
https://developers.google.com/youtube/v3/docs/videos/list
Perhaps a bit of background reading on the API would help too...
https://developers.google.com/youtube/v3/
First off, you would need the Youtube Data API. "v3" means nothing because it's simply the current version, like "Windows 10."
The API lets you get a video's view count, but doesn't put it in a range like 9 million to 11 million.
Youtube's own search function is pretty sophisticated. For instance,
https://www.youtube.com/results?search_query=movie+trailer&search_sort=video_view_count&filters=month. This gives all results for "movie trailer," within the last month, sorted by view count. You can customize the URL, i.e. "week" instead of month would return only trailers from the last week. Or year, etc. Essentially this is a "Videos: List: MostPopular" query, with subject filter.
I have a few Youtube API scripts, and I hardly think it's worth the hassle to do it that way when Youtube's advanced search get you 99% there. If you did, you would need to to a Search:list query for a given subject (i.e. "movie trailer"). Limited to a given time frame (i.e. last month). Then for each video ID, make a Videos:list query to get its view count. Then print all, sorted by views.
I have a list of songs - is there a way (using the Spotify / Echo Nest API) to look up the Spotify ID for each track in bulk?
If it helps, I am planning on running these IDs through the "Get Audio Features" part of their API.
Thanks in advance!
You can use the Spotify Web API to retrieve song IDS. First, you'll need to register to use the API. Then, you will need to perform searches, like in the example linked here.
The Spotify API search will be most useful for you if you can provide specifics on albums and artists. The search API allows you to insert multiple query strings. Here is an example (Despacito by Justin Bieber:
https://api.spotify.com/v1/search?q=track:"' + despacito + '"%20artist:"' + bieber + '"&type=track
You can paste that into your browser and scan the response if you'd like. Ultimately you are interested in the song id, which you can find in the uri:
spotify:track:6rPO02ozF3bM7NnOV4h6s2
Whichever programming language you choose should allow you to loop through these calls to get the song IDs you want. Good luck!
It has been a few years, and I am curious how far you got with this project. I was doing the same thing around 2016 as well. I am just picking up the project again, and noticing you still cannot do large bulk ID queries by Artist,Title.
For now I am just handling HttpStatusCode 429 and sleeping the thread as I loop through a library. It's kind of slow but, I mean it gets the job done. After I get them I do the AudioFeatures query for 100 tracks at a time so it goes pretty quickly that way.
So far, this is the slowest part and I really wish there was a better way to do it, or even a way to make your own 'Audio Features' based on your library It just takes a lot of computing cycles. However ... one possible outcome might be to only do it for tracks that you cannot find on Spotify ;s
Anyone have a good ide how I can create music top lists using Spotify or echonest Web API?
For example create a top 25 list of music from the 80's of the genre rock in Sweden. Or the most streamed tracks on the global market of genre pop for the year 2010.
Using the Search endpoint, you can retrieve tracks by genre within some year interval. It also accepts a market parameter, but the order is not guaranteed to be by popularity though.
https://api.spotify.com/v1/search?type=track&q=genre:pop+year:1980-2020&market=SE
This is probably as close as you can get using the Web API as it is today.
There are playlists that are updated with the most popular tracks in most (if not all) markets, although not by genre. For Sweden's Top 50, see http://open.spotify.com/user/spotify/playlist/7jmQBEvJyGHPqKEl5UcEe9.