This has probably been asked before: with python API, how can I get an Album name candidate from Artist and Track names?

python3
python
musicbrainzngs
Tags: #<Tag:0x00007f23c21766b8> #<Tag:0x00007f23c2176578> #<Tag:0x00007f23c2176410>

#1

I have a lot of songs for which only the Artist and Track name are available, and am trying to use the python API to get album name and album cover metadata. Using the track name in the query for the search_releases function seems to fail at random (e.g. the first result for “Immigrant Song” when calling
search_releases("Immigrant Song", arid=ID) [where ID is the proper artist ID for Led Zeppelin] is Led Zeppelin II, while it actually appeared in Led Zeppelin III). One method would be to get every single recording, and filter those belong to releases of type ‘Album’, but that is rather slow. Was hoping to find a more efficient solution.