Musicbrainz Api to get mbid for a list of artist

Hey everyone.
im trying to use the musicbrainz api to give me a list of artist mbid’s so i can further get metadata on them
however, when i run my code:
def get_tags(artist):
mine = mb.search_artists(artist)[‘artist-list’][0]
return mine

file[“test”] = file.apply(lambda x: get_tags([‘artist’]), axis=1)

it gives me the same mbid for each entry in my list, which corresponds to a standard entry
anyone know how to solve this problem.

You are passing a list to search_artists, but it expects a string with a search query. See MusicBrainz API / Search - MusicBrainz and org.apache.lucene.queryparser.classic (Lucene 7.7.2 API) for details on how to perform searches.

2 Likes

Thank you, I managed to make it work