Search - marcocusano/mailchimp-php GitHub Wiki

Search all of an account’s campaigns for the specified query terms or search the account or a specific list for members that match the specified query terms.

campaigns

Search all campaigns for the specified query terms.

$params = array(
    "fields" => { ... },
    "exclude_fields" => { ... },
    "query" => "The search query used to filter results."
);
$mailchimp->search->campaigns($params);

members

Search for list members. This search can be restricted to a specific list, or can be used to search across all lists in an account.

$params = array(
    "fields" => { ... },
    "exclude_fields" => { ... },
    "query" => "The search query used to filter results.",
    "list_id" => "YOUR_LIST_ID"
);
$mailchimp->search->members($params);