Getting mbid of a track albun

musicbrainz
webservice
isrc
Tags: #<Tag:0x00007f98ce8ec0d8> #<Tag:0x00007f98ce8eff08> #<Tag:0x00007f98ce8efdc8>

#1

I have a track’s isrc code, i got the mbid of the track by doing isrc lookup. In the response I dont get any detials about the album.

So how can I get the mbid of the album if I have the isrc of the track?


#5

If you follow enough links, the information is always available on MB. That’s one of the good things about of MB over other sites.

For example - the “overview” tab of a recording tells you “release title”. If you click on the album title you want (some songs are on multiple albums), it will take you to the album page. At which point you click the “details” tab.


#6

I am not sure if I follow you correctly here. I will try explain again. I am making the following GET request :

https://musicbrainz.org/ws/2/isrc/USRC11600201?fmt=json

And I am getting the following response:

{ “isrc”: “USRC11600201”, “recordings”: [ { “disambiguation”: “single remix”, “title”: “Cheap Thrills”, “id”: “92e27a47-3546-4bc2-a9f7-b19e43d7a531”, “length”: 223000, “video”: false }, { “length”: 218540, “video”: false, “title”: “Cheap Thrills”, “disambiguation”: “”, “id”: “5845e975-33b4-4b0d-8e74-8f57d128b3d1” } ] }

In the JSON response I don’t get any details about the album of the track.
I hope its more clear now.
Thanks @justcheckingitout for replying.


#7

My bad. I was talking about using the website.
I didn’t realize you were script writing.


#8

You just need to start making more calls to the web service to get more information.
So the isrc returned a musicbrainz recording id.

To get the releases that contain this recording use the following:
https://musicbrainz.org/ws/2/recording/5845e975-33b4-4b0d-8e74-8f57d128b3d1?inc=releases&fmt=json

Note that a recording may appear on multiple releases so you may need to pick one to get more information.
Your example just has the 1 release so lets get some info about that.
http://musicbrainz.org/ws/2/release/60c1413d-870c-4d56-8794-33f7715d5e7b?inc=release-rels+recordings&fmt=json

You can include more inc fields to get the information you want so in the above i have requested the recordings on that release to be included.

See the documentation
https://wiki.musicbrainz.org/Development/XML_Web_Service/Version_2


#9

Thanks @dns_server. That will help me. Also I posted another question related to this and I got an answer. Seems like the query :

https://musicbrainz.org/ws/2/isrc/USRC11600201?inc=releases&fmt=json

is not returning the expected response and its due to some issue with Musicbrainz, When I do the same query with json I get the correct response in xml :

https://musicbrainz.org/ws/2/isrc/USRC11600201?inc=releases

The response with the above query is in xml with the mbid of the album as well.

Link to the question.