Get year given artist/song?

I would like to develop a script to get the year of a song given the artist and song title. My motivation is to fix the tracks in compilation albums so that they have their proper release date rather than compilation date.

Any thoughts about which web source this could be developed against? Is it even possible?



I've made a script for musicbrainz some time ago to get the original album of a song based on title and artist.
You can easily change it to grab the year instead of the album. (888 Bytes)

Thanks, I'll give it a shot.

I've been looking around MusicBrainz. Most of the albums don't seem to have release information (at least what I checked out) and tracks don't seem to have any metadata for the year they're recorded.

I'm gathering it's pretty hard to automate this. For each track on a compilation album, you have to search through all the albums it was released on and take the year of the earliest release. Not easy.

Guess there isn't a database anywhere of when a song was actually recorded?

Try So far it's mostly electronic music, but they are expanding quickly.

I have been using Google with the search string

"AMG - %artist% - %title%"

to locate album information for specific tracks. Adding AMG brings All Music Guide info to the front of the search results.

"AMG - Van Morrison - Into the Mystic"

The search usually returns the album and release info in the first returned values.

I am a new user of MP3Tag so not sure how this can be automated. It is also possible that you may be able to script into All Music Guide directly. Still reading and learning.


right now I'm also trying to find a way to automate this for "orphaned" files (e.g. not from an album).
This thread is 4 years old, has anybody posted a solution on the forums? I've not found one by searching.

It shouldn't be impossible with a websource like discogs or musicbrainz to retrieve the date. But I've never written a source... maybe someone who knows how to do this could help?
Discogs often has the earliest release as the first search result - but not always. So it seems you need to compare all the possible dates and then keep the oldest one.
I would love to be able to select multiple songs, and the script should look up each one (by Artist and Title) and put the earliest found date into the "year" tag. If its a compilation, you could put the release date of the compilation in another tag (comment?) or just add a second "year" tag.

Is anybody interesting in writing such a websource-script?
thank you already in advance!

I too would really like to have this option. Can anyone speculate whether this is at all possible to achieve?

Mp3Tag Web Scripts can only get tags for multiple songs if there is a database, which has stored the information about these songs in one place/under one URL. Most database have have one page for a album/release, so Mp3Tag scripts can only get information from one album/complilation/single in one go. It is no problem with the scripts if you don't have the complete album or only one track, the tracks will be tagged as if there was the whole album.

You can test my discogs script. You can search there for artist + title and you will get all releases by the artist with the title on it in the index, displayed with the release year, so you see which is the first release. Compilations are only shown there if you leave the artist blank or set it to "Various". I think dano's web script does this, too.

[WS] Discogs (pone mod)
[WS] Discogs Album search + VA

You need a database which shows these two dates in one page. does not do so.

If you can find a database which shows songs from different albums or release date + original date on one page, I will tell you if it possible to write a web scource script.

Note that AMG/ has complained about scripts for their site, so these scripts are not allowed here anymore.

Thanks for replying, pone.

Well, given that such a database would have to display, on one single page, tens of thousands of tracks to be at all effective, I guess that rules out a tag source script.

Is there any alternative to this method, though? Looking through this forum, I've noticed that one particular user (ResidualImages), has created a programme that finds lyrics for whole batches of songs, which he integrates with Mp3Tag by way of the "Customise Tool" function in Options. The method is explained in more detail in the help document that comes with the download, found here.

Assuming that the database from which this app acquires the lyrics from uses multiple url's, it should in theory be possible to apply the same method to the problem at hand. I'm no programmer though, so I don't know how practical this would be to make. I'm guessing it's a lot of work though. What do you think?

There could be a database which shows something like all tracks by an artist on one page. That could be a start where a track script would make sense. Although I don't no any such site.

I have seen this but did not test it. But this goes way beyond a simple scipt and way beyond my simple knowledge of programming. As far as I understand it's a external application which just imports the filelist from mp3tag, than does it's own lyrics tagging based on the artist and title tags.

Unfortunatelly it's web source,, does not provide release years. So you would have to write a similar application for another web source. I'm also guessing it's a lot of work. And I also have no idea how to do this.

Actually, I believe the artist + title of selected tracks are first exported to the external programme, then the lyrics are downloaded and imported back into Mp3Tag and merged with their corresponding tracks. I've not yet tried it out, but it seems that the whole process is controlled from within Mp3Tag.

Yeah, that's what I was inferring. I think it's possible, the only problem is that for anyone actually willing and able to do this, it's a lot of trouble to go to just for the purpose discussed here. I could see this method being very useful to the entire userbase if its scope were expanded. Anyway, I appreciate you taking the time to make things clear for me. I see now the inherent difficulty in what at first seemed a simple problem.

Automated usage of web browser functionalities is a standard concept and practical application since years in the area of data mining from web pages. For myself I use such techniques for different purposes about at least eight years. See other applications how wonderful it works, for example AlbumArtDownloader.
The only problem is, likely the same as Mp3tag's Websource concept: if the webpage has changed internally, then the data mining interface must be changed and adapted.


Yes, I'm aware of that. I'm referring to Mp3Tag specifically here. All I'm tying to say is that this method seems underutilised, if you consider as I do that it's superior in many ways to using scripts. ResidualImages has the right idea, if only it could be expanded to include data other than lyrics. Just my 2p. :unsure:

Reviving an old topic, I'm looking to do the same thing for some compilation albums I have.
For example, A State of Trance Classics compilations

Has there been any changes to enable this to happen since it was last discussed?