How to Find My Mailchimp List ID and Interest ID with a Mac Now That the API Playground Is Dead
It used to be pretty easy to find a Mailchimp List ID or Interest ID because Mailchimp had created an API Playground that allowed us to explore the API without actually having to write a line of code.
But for whatever reason, Mailchimp has killed the API Playground and so we are left to fend for ourselves.
First you’ll need your API key — if you don’t have one, you can create one by following these instructions: Find My API Key
Once you have an API key you’ll need to take note which Mailchimp server your account is tied to by looking at the suffix on your API key.
Mine is "-us20"
Then you’ll want to open up Terminal by hitting Cmd+Space and typing “Terminal”
Now we’re ready to return all your list IDs. Modify this code to use your own api key and Mailchimp server id (from your API key suffix) and paste it into the terminal and press Enter.
curl -H "Authorization: apikey YOURAPIKEY" https://us20.api.mailchimp.com/3.0/lists
You’ll get a lot of information back from the API server, so copy and paste the returned data and find the list ID that has an interest category you want to get an ID for and use the list ID (along with your API key and Mailchimp server id):
curl -H "Authorization: apikey YOURAPIKEY" https://us20.api.mailchimp.com/3.0/lists/YOURLISTID/interest-categories
Then once you have the list ID you can use this code to get a specific interest ID like this:
curl -H "Authorization: apikey YOURAPIKEY" https://us20.api.mailchimp.com/3.0/lists/YOURLISTID/interest-categories/YOURINTERESTCATEGORYID/interests
And that’s it!
Now you can get on to coding bigger and better things!