Karan Goel
Karan Goel

Reputation: 1117

How do I calculate song popularity based on MusicBrainz ID?

So I have 3 things for each song:

Name

Artist

MusicBrainz ID

How do I sort them by popularity?
What service can I use to match a song with it's 'stats'?

I was thinking of using YouTube, but I'm worried I'll get irrelevant results like parodies or lyrics videos etc.

Is there any popular service (with active API/Java library) that I can use to get vital stats of a song (plays, hits, votes, likes, shares) whatever?

Upvotes: 3

Views: 821

Answers (2)

Tyler Liu
Tyler Liu

Reputation: 20356

soundcloud api

Soundcloud.com is very popular and its API is easy to use. It provides both XML and JSON format response. As far as I can tell, its API rate limit is quite high.

Here is a sample of list of stats you could get:

"playback_count": 105068,
"download_count": 6694,
"favoritings_count": 739,
"comment_count": 153,

Upvotes: 1

Karan Goel
Karan Goel

Reputation: 1117

So what I did was use Last.fm web API that returned XML responses and parse the response with JDOM. The problem is, that it's taking a lot of time.

I first use Tag.getTopTracks() to get top tracks for 4 tags, then I go over each track using Track.getInfo() and download the stats. I takes about 14 seconds to process 4 tags with 5 results each.

I'll try to fix that later, but this problem is solved for now.

Upvotes: 3

Related Questions