Retrieve popular artist by genre and if possible, Country

Hello,

I tried to check in the API documents.
I am looking for a way to retrieve popular artist by genre and if possible, Country.

It could be all time popularity or current time popularity.
Or
Retrieve artists by country and than sort it by relevance .

For example:
Get top 25 artists of the gener “rock” from country “US”
Similar to this: https://beta.musicbrainz.org/tag/rock/artist which is ordered by some kind of relevance.
Equalivet to this for API as far as i understand is:
http://musicbrainz.org/ws/2/artist/?query=tag:rock%20AND%20country:US&fmt=xml
In this case sorting seems to be random.

Maybe there is another method i am not familiar with…

This is sorted by the number of editor votes for assigning rock genre to each of these artists. There is no equivalent for country. There is no artist popularity either, although one may make popularity up from the number of known releases, works, events, and so on.

There is no other method, it is the closest equivalent through the API. But the API doesn’t have any sorting capability. You could instead set a local mirror up and make direct queries to its database.

2 Likes

Thank you for your reply.
Do you have a link explaining the local mirror?

You can download a pre build vm containing the musicbrainz server and enable replication and database access.
https://musicbrainz.org/doc/MusicBrainz_Server/Setup

There is also https://github.com/lalinsky/mbslave and https://github.com/elliotchance/mbzdb that can be used to build a copy of the database.

I appreciate your assistance.
After looking at the links, i understand this is a totally different approach than the API and will require to rework everything i have currently done.

Wish popularity field and/or Sorting by relevance was implemented in API.
Hope there are future thoughts regarding that .

One problem is also how you define “popularity”. Depending on this MusicBrainz itself might not actually have the data necessary to get this, as it deals mostly with metadata. Ratings and folksonomy tags could give some clue about popularity, but I doubt it would be sufficient.

Of course ListenBrainz could be a great source for this, as listen counts are an indicator for popularity. In the end you likely need various data sources combined, and it still depends how you define popularity.

3 Likes

You are absolutely correct regarding the definition of popularity.
Popularity definition can vary between each individual.
I think popularity should be defined in two phases, based on ListenBrainz

  1. All Time - Historical
  2. X time back or last year. - Current

Well, ListenBrainz is pretty new, so “Historical” can’t be done.
Tough one :slight_smile: Require more thinking.

I understand from your reply that with ListenBrainz i can get current most popular songs.
Would ListenBrainz API can get a list of most current listened artists/albums/tracks based on genre and country?

1 Like