0

How can I get related topics given an mid?

Aka I have the mid: '/m/0mgcr', which is the offspring
and I want to get a list of related bands.

What's the best way to tackle this?

Another way to ask this would probably be:

If I have a band that has multiple genres how do I find all other bands that have the exact same genres as that band? not just one...

rene
  • 41,474
  • 78
  • 114
  • 152
gbachik
  • 1,637
  • 3
  • 17
  • 29
  • If you have the genre, just make sure you put the query in an array in order to have the API return a list of results. However, for the general problem of finding related entities, I don't think this is supported... you may want to load the RDF dumps, instead, and then use some custom processing in order to do that. – Michael Aaron Safyan Jul 13 '14 at 06:08
  • thanks thats what I was trying but I cant quite get the right syntax for that query! Do you know what it is? – gbachik Jul 13 '14 at 06:23
  • What query have you tried? – Michael Aaron Safyan Jul 13 '14 at 06:27
  • { "type": "/music/artist", "name": [], "genre": [ "Rock music", "Ska", "Reggae", "New Wave", "Post-punk", "Pop rock", "2 Tone", "Punk rock", "Reggae fusion", "Ska punk", "Jazz fusion", "Reggae rock" ] } – gbachik Jul 13 '14 at 08:16

1 Answers1

0

It might be easier to use the reverse edge to go from the genre to the artists in that genre. Example:

{
 "type": "/music/genre",
 "mid": "/m/07sbbz2",
 "artists": [{
   "mid": null,
   "name": null
 }]
}

This will give you the name and machine ID of the artists in the genre "/m/07sbbz2" (Rock and roll).

Michael Aaron Safyan
  • 93,612
  • 16
  • 138
  • 200