Libmusicbrainz C++ API get a Recording ID from a Track ID

I have a lot of "MusicBrainz Release Track Id"s that I want to translate to their corresponding "MusicBrainz Recording Id"s… is there an easy way to do this with the libmusicbrainz api?

I see that I can query the web interface directly with: https://musicbrainz.org/ws/2/release?track=“MusicBrainz Release Track Id” which returns a big XML document which includes track and recording ids for the whole release, and I might parse from there to get to my goal, but I’m hoping there’s something easier already coded into the API?

Thanks,

1 Like

Hi!
You’ve got the right process. The only way to look up a recording id from a track id is to get the release and then iterate through all tracks until you find the one which matches your id.

1 Like