Simples curl call that can pull all the interest categories ids from a list of mailchimp.
$apiKey = [YOUR-API-KEY]; $url = 'https://us18.api.mailchimp.com/3.0/lists/[YOUR-LIST-ID]/interest-categories'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_USERPWD, 'user:' . $apiKey); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); $err = curl_error($ch); curl_close($ch); if ($err) { echo "cURL Error #:" . $err; } else { $response = json_decode($result); }