I was hoping someone could give me a pointer as to how I can retrieve the first year a track was released? I have written an application to scan through a collection of audio tracks and then look up this date using the artist name and track name. The tracks are well known but some are simply not found so you end up with the compilation date. One track I failed to find was “Elton John” and “Rocket Man”. In this compilation (Sounds of the ‘70s) I could find about 50%. Clearly I am not accessing the data base correctly and have tried the things suggested by ChatGTP. What might I be doing wrong?
I did not find that release.
Please give us the URL.
And then the track is linked to a recording, like this one, for example. It shows earliest release in 1972.
Shown as first-release-date, with web service.
It’s pretty simple. Do a GET querry to this url (replace {mbid} by the mbid):
https://musicbrainz.org/ws/2/recording/{mbid}?fmt=json
You’ll recieve the following json:
{"length":236245,"id":"5bd34060-c8a9-4109-abba-2791b589403a","first-release-date":"2023-09-11","video":false,"title":"The Law","disambiguation":""}
With "first-release-date" as your release date. Just parse it, and get your year
Apologies for the delay, winter illness.
That looks positive, however I am a newbie and would have to generate the mbid from the artist and track names. This is a step I am not familiar with and I suppose it is possible to have multiple mbid’s generated from an artist and track. Would I then have to make multiple calls for each? Thanks.
Apologies for the delay, winter illness. The search you tried was “Sounds of the 79s”. The URL I have been using is in these lines of code:
string query = $“artist:\”{artist}\" AND recording:\“{title}\”";
string url = $“https://musicbrainz.org/ws/2/release-group/?query={Uri.EscapeDataString(query)}&fmt=json”;
I expect there is some error in this URL. Any suggestions?
I do appreciate your assistance ![]()