Some of my members share a specific tag I have assigned them - ie: tag123
What api command can I use to retrieve all members who have this tag assigned to them?
Some of my members share a specific tag I have assigned them - ie: tag123
What api command can I use to retrieve all members who have this tag assigned to them?
You can't use /search_members
end point to do that.
That endpoint only searches in email, FNAME and LNAME. You need to get all members in your list, and after that search in your php script or whatever.
You can try using the search-members GET API call with the specific tag set in the query field. (More on https://developer.mailchimp.com/documentation/mailchimp/reference/search-members/#read-get_search_members)
e.g.
curl --request GET \
--url 'https://usX.api.mailchimp.com/3.0/search-members?query=tag123' \
--user 'anystring:apikey' \
--include