Searching for an exact artist name match

Hi!

I’d like for my program to only return results of artists whose names are an exact match with what I searched.

I’m trying to figure out a way to alter the below example into code that only returns artists with an EXACT match with what I put between the quotes. Currently, it returns exact matches and other artists with similar names. I don’t want that as I want the loop in my program to break as soon as it’s collected info from the artist name I’ve queried for and not continue through similarly spelt artists.

musicbrainzngs.search_artists(artist="xx")

How can I do this?

This is not possible. You’d have to filter the results client-side.

4 Likes

According to the documentation, you could try to give as much information as you already know, like the TYPE or COUNTRY in this example:

I’m not sure what exactly the STRICT option controls:

Ahhh, found it:

3 Likes