10

Is is possible to search for members in a MailChimp list by merge field using the MailChimp API v3.0?

The documentation for the Search Members endpoint links to a separate page, Search for Campaigns and Contacts in Your Account, which details how to manually search using the GUI, but mentions that the keyword search can include merge fields in the format merge3:keyword, so it looks like it should be possible.

However, in both the GUI and using the MailChimp API php wrapper, I get no results - the GUI returns the error Invalid search request, try again, while the php API returns an empty array with nothing in getLastError() or getLastResponse().

Searching using a subscriber's name or email address does, however, work as expected.

James
  • 311
  • 5
  • 17
Armstrongest
  • 15,181
  • 13
  • 67
  • 106

2 Answers2

2

As mentioned by @Kalyan Sangartula it is not possible to search using other merge fields.

But I think an alternative, for now, to this could be using segments. You can create segments based on filters you want (api route "/lists/{list_id}/segments") and get members from those segments (api route "/lists/{list_id}/segments/{segment_id}/members").

Haseeb Ahmad
  • 524
  • 1
  • 5
  • 12
0

"/search-members" endpoint only supports merge1, merge2, and merge3 fields (the Email, Fname, and Lname) fields for members. It doesn't support any other fields or merge fields except the mentioned above.

Sample API call for search-members: "/3.0/search-members?query=abc@example.com"