Export API

Our Export API gives customers a way to access large sets of data that would otherwise be difficult or slow to retrieve with API 3.0. The Export API allows you to get List information and Subscriber Activity quickly, although it doesn’t support filtering, sorting, or paging the results like API 3.0.

Submit URL & Parameters

The <dc> part of the URL corresponds to the data center for your account. For example, if the last part of your Mailchimp API key is us6, all API endpoints for your account are available at https://us6.api.mailchimp.com/export/1.0.

Authentication and Request Parameters

Request data is passed to the API by POSTing JSON objects to the API endpoints with the appropriate parameters.

Output Formats

Currently, the only output format supported is streamed JSON. This means that a call to this API will not return a single valid JSON object but, rather, a series of valid JSON objects separated by newline characters.

While this may seem counter-intuitive at first, the format is better suited to large datasets than a single JSON object would be. Rather than needing to receive and process the entire response (which could be many megabytes of data) and generating a similarly large JSON object to work with, each item can be operated on immediately. This allows your application to perform the desired actions on the item and then discard the data, keeping the memory footprint of your application low.

HTTPS / Secure Connections

We give a valid, signed certificate for all API methods. If you’re manually coding submit URLs, change http to https in the URL, and make sure your connection library supports HTTPS.

List Export

Exports members of a list and all of their associated details. This is a very similar to exporting via the web interface.

Full URL:

https://<dc>.api.mailchimp.com/export/1.0/list/

Request Parameters:

Parameter

Description

apikey

a valid API Key for your user account.

id

the list id to get members from

status

optional – the status to get members for - one of (subscribed, unsubscribed, cleaned), defaults to subscribed

segment

optional – pull only a certain Segment of your list.

since

optional – only return member whose data has changed since a GMT timestamp – in YYYY-MM-DD HH:mm:ss format

hashed

optional – if, instead of full list data, you’d prefer a hashed list of email addresses, set this to the hashing algorithm you expect. Currently only “sha256” is supported.

Returns:

Parameter

Description

text

a plain text dump of JSON objects. The first row is a header row. Each additional row returned is an individual JSON object. Rows are delimited using a newline (\n) marker, so implementations can read in a single line at a time, handle it, and move on.

Subscriber Activity Export

Exports all Subscriber Activity for the requested campaign.

Full URL:

https://<dc>.api.mailchimp.com/export/1.0/campaignSubscriberActivity/

Request Parameters:

Parameter

Description

apikey

a valid API Key for your user account.

id

the campaign id to get subscriber activity from

include_empty

optional – if set to “true” a record for every email address sent to will be returned even if there is no activity data. defaults to “false”

since

optional – only return activity recorded since a GMT timestamp – in YYYY-MM-DD HH:mm:ss format

Returns:

Parameter

Description

text

a plain text dump of JSON objects. The first row is a header row. Each additional row returned is an individual JSON object. Rows are delimited using a newline (\n) marker, so implementations can read in a single line at a time, handle it, and move on.