Help with web API recording-work relationship

Hi there,

I’m new to MusicBrainz and trying to find my way round the API to find out some more information about a song that’s currently playing… for example whether there are any cover versions, remixes and whether it samples or is sampled by another song etc. I’m a bit confused about relationships and the best way to get this. From reading the API documentation, I should be able to do a query on a Recording and then get information such as Covers by including Work relationships.

I’ve tried the following query (and variants) but am not seeing any “relationship” entries returned in the JSON. Can anyone advise me as to what I’m doing wrong? Is a query via recording the best way to go or should I be doing a work query?

http://musicbrainz.org/ws/2/recording/?query=%22Right%20Here%20Right%20Now%22%20AND%20artistname:%22Fatboy%20Slim%22&inc=performance+work-rels+work-level-rels&fmt=json&limit=10

The MusicBrainz page for that recording is Right Here Right Now and it shows has-remixes, sampled by and samples.

Thanks, brainz!

inc isn’t a valid parameter for search requests. To get what you’re after, you’d have to take the results of your search, and then query each specific recording entry with the inc parameter you have set to get those details.

MusicBrainz API / Search - MusicBrainz has more details on how the API search works, and MusicBrainz API - MusicBrainz covers lookups (get info based on type and MBID) and browse (get related info i.e. get all release groups for a specific artist MBID)

1 Like