Andrei Volgin
Andrei Volgin

Reputation: 41089

How to get work data by recording ID using MusicBrainz Json API?

Many tracks in my library have no language information. It appears that MusicBrainz does not provide language information for a recording, only for a work.

How can I get a work ID if I know recording ID?

Upvotes: 1

Views: 562

Answers (1)

Noam Hacker
Noam Hacker

Reputation: 4825

You can link a work to a recording through a performance.

Forward link phrase: {live} {medley:medley including a} {partial} {instrumental} {cover} recording of

Reverse link phrase: {live} {medley:medleys including} {partial} {instrumental} {cover} recordings

Long link phrase: is a {live} {medley:medley including a} {partial} {instrumental} {cover} recording of

Description: This is used to link works to their recordings.

entity0 cardinality: Few relationships (0)

entity1 cardinality: Many relationships (1)

UUID: a3005666-a872-32c3-ad06-98af558e99b0

Performances are explained in more detail in the documentation.

Here's an example of the relationship:

A Day in the Life (original stereo studio mix) by The Beatles is a recording of A Day in the Life

A Day in the Life by Affinity is a live instrumental cover recording of A Day in the Life

edit:

As you have commented, you need the relationship in the opposite direction, and this call does the trick:

http://musicbrainz.org/ws/2/recording/fcbcdc39-8851-4efc-a02a-ab0e13be224f?inc=‌​work-rels&fmt=json

Upvotes: 1

Related Questions