Reference

Endpoint Get List Members


Name

get_list_members

Description

Get information about members in a specific Mailchimp list. [API reference]

Related Tables

ListMembers

Parameters

Parameter Required Options
Name: ListId

Label: List Id

The ID of the list for which you like to perform this operation.
YES
Name: email_type

Label: Email Type

The email type.
Option Value
html html
text text
Name: status

Label: Status

The subscriber's status. Possible values: subscribed, unsubscribed, cleaned, pending, transactional, or archived.
Option Value
subscribed subscribed
unsubscribed unsubscribed
cleaned cleaned
pending pending
transactional transactional
archived archived
Name: since_timestamp_opt

Label: Since Timestamp Opt (Format: 2015-10-21T15:41:36)

Restrict results to subscribers who opted-in after the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
Option Value
today today
yesterday yesterday
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
Name: before_timestamp_opt

Label: Before Timestamp Opt (Format: 2015-10-21T15:41:36)

Restrict results to subscribers who opted-in before the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
Option Value
today today
yesterday yesterday
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
Name: since_last_changed

Label: Since Last Changed (Format: 2015-10-21T15:41:36)

Restrict results to subscribers whose information changed after the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
Option Value
today today
yesterday yesterday
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
Name: before_last_changed

Label: Before Last Changed (Format: 2015-10-21T15:41:36)

Restrict results to subscribers whose information changed before the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
Option Value
today today
yesterday yesterday
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
Name: unique_email_id

Label: Unique Email Id

A unique identifier for the email address across all Mailchimp lists.
Name: vip_only

Label: VIP Only

A filter to return only the list's VIP members. Passing true will restrict results to VIP list members, passing false will return all list members.
Option Value
true true
false false
Name: interest_category_id

Label: Interest Category Id

The unique id for the interest category.
Name: interest_ids

Label: Interest Ids

Used to filter list members by interests. Must be accompanied by interest_category_id and interest_match. The value must be a comma separated list of interest ids present for any supplied interest categories.
Name: interest_match

Label: Interest Match

Used to filter list members by interests. Must be accompanied by interest_category_id and interest_ids. 'any' will match a member with any of the interest supplied, 'all' will only match members with every interest supplied, and 'none' will match members without any of the interest supplied. Possible values: 'any', 'all', or 'none'.
Name: since_last_campaign

Label: Since Last Campaign

Filter subscribers by those subscribed/unsubscribed/pending/cleaned since last email campaign send. Member status is required to use this filter.
Option Value
true true
false false
Name: unsubscribed_since

Label: Unsubscribed Since (Format: 2015-10-21T15:41:36)

Filter subscribers by those unsubscribed since a specific date. Using any status other than unsubscribed with this filter will result in an error.
Option Value
today today
yesterday yesterday
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_WSTR nvarchar(200) 200
ListId DT_WSTR nvarchar(200) 200
EmailAddress DT_WSTR nvarchar(200) 200
UniqueEmailId DT_WSTR nvarchar(200) 200
ContactId DT_WSTR nvarchar(200) 200
FullName DT_WSTR nvarchar(100) 100
WebId DT_I4 int
EmailType DT_WSTR nvarchar(20) 20
Status DT_WSTR nvarchar(20) 20
ConsentsToOneToOneMessaging DT_BOOL bit
FirstName DT_WSTR nvarchar(50) 50
LastName DT_WSTR nvarchar(50) 50
AddressLine1 DT_WSTR nvarchar(200) 200
AddressLine2 DT_WSTR nvarchar(200) 200
City DT_WSTR nvarchar(200) 200
State DT_WSTR nvarchar(100) 100
Zip DT_WSTR nvarchar(20) 20
Country DT_WSTR nvarchar(100) 100
Phone DT_WSTR nvarchar(50) 50
Birthday DT_WSTR nvarchar(50) 50
StatsAvgOpenRate DT_I4 int
StatsAvgClickRate DT_I4 int
IpSignup DT_WSTR nvarchar(200) 200
TimestampSignup DT_DBTIMESTAMP datetime
IpOpt DT_WSTR nvarchar(200) 200
TimestampOpt DT_DBTIMESTAMP datetime
MemberRating DT_I4 int
LastChanged DT_DBTIMESTAMP datetime
Language DT_WSTR nvarchar(100) 100
Vip DT_BOOL bit
EmailClient DT_WSTR nvarchar(200) 200
Latitude DT_I4 int
Longitude DT_I4 int
LocationGmtOff DT_I4 int
LocationDstOff DT_I4 int
CountryCode DT_WSTR nvarchar(100) 100
TimeZone DT_WSTR nvarchar(100) 100
Region DT_WSTR nvarchar(100) 100
Source DT_WSTR nvarchar(100) 100
TagsCount DT_I4 int
Tags DT_WSTR nvarchar(4000) 4000
If the column you are looking for is missing, consider customizing Mailchimp Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime.

Examples

SSIS

Use Mailchimp Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Source

This Endpoint belongs to the ListMembers table, therefore it is better to use it, instead of accessing the endpoint directly:

API Source - Mailchimp
Read / write MailChimp Campaigns, Lists, Members, Reports and more in without coding.
Mailchimp
ListMembers
Required Parameters
List Id Fill-in the parameter...
Optional Parameters
Email Type
Status
Since Timestamp Opt (Format: 2015-10-21T15:41:36)
Before Timestamp Opt (Format: 2015-10-21T15:41:36)
Since Last Changed (Format: 2015-10-21T15:41:36)
Before Last Changed (Format: 2015-10-21T15:41:36)
Unique Email Id
VIP Only
Interest Category Id
Interest Ids
Interest Match
Since Last Campaign
Unsubscribed Since (Format: 2015-10-21T15:41:36)
SSIS API Source - Read from table or endpoint

API Destination

This Endpoint belongs to the ListMembers table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to get list members:

API Destination - Mailchimp
Read / write MailChimp Campaigns, Lists, Members, Reports and more in without coding.
Mailchimp
ListMembers
Select
Required Parameters
List Id Fill-in the parameter...
Optional Parameters
Email Type
Status
Since Timestamp Opt (Format: 2015-10-21T15:41:36)
Before Timestamp Opt (Format: 2015-10-21T15:41:36)
Since Last Changed (Format: 2015-10-21T15:41:36)
Before Last Changed (Format: 2015-10-21T15:41:36)
Unique Email Id
VIP Only
Interest Category Id
Interest Ids
Interest Match
Since Last Campaign
Unsubscribed Since (Format: 2015-10-21T15:41:36)
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Get list of members within a specific list/audience in your Mailchimp account

SELECT * FROM get_list_members 
WITH (ListId='e246f7e24d')

Get a list member by Email from a Mailchimp List

SELECT * FROM ListMembers 
WITH (ListId='e246f7e24d', Id='test@abc.com')

Get list of all members within all lists/audiences in your Mailchimp account

SELECT * FROM ListMembers --scan all lists and then fetch members for each list

Get specific columns in list of members within a specific list/audience in your Mailchimp account

SELECT Id, ListId, EmailAddress, UniqueEmailId, ContactId, FullName, WebId, EmailType, Status, ConsentsToOneToOneMessaging, FirstName, LastName, AddressLine1, AddressLine2, City, State, Zip, Country, Phone, Birthday, StatsAvgOpenRate, StatsAvgClickRate, IpSignup, TimestampSignup, IpOpt, TimestampOpt, MemberRating, LastChanged, Language, Vip, EmailClient, Latitude, Longitude, LocationGmtOff, LocationDstOff, CountryCode, TimeZone, Region, Source, TagsCount, Tags 
FROM ListMembers 
WITH (ListId='e246f7e24d')

get_list_members endpoint belongs to ListMembers table(s), and can therefore be used via those table(s).

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Get list of members within a specific list/audience in your Mailchimp account

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_list_members 
WITH (ListId=''e246f7e24d'')';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

Get a list member by Email from a Mailchimp List

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM ListMembers 
WITH (ListId=''e246f7e24d'', Id=''test@abc.com'')';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

Get list of all members within all lists/audiences in your Mailchimp account

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM ListMembers --scan all lists and then fetch members for each list';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

Get specific columns in list of members within a specific list/audience in your Mailchimp account

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT Id, ListId, EmailAddress, UniqueEmailId, ContactId, FullName, WebId, EmailType, Status, ConsentsToOneToOneMessaging, FirstName, LastName, AddressLine1, AddressLine2, City, State, Zip, Country, Phone, Birthday, StatsAvgOpenRate, StatsAvgClickRate, IpSignup, TimestampSignup, IpOpt, TimestampOpt, MemberRating, LastChanged, Language, Vip, EmailClient, Latitude, Longitude, LocationGmtOff, LocationDstOff, CountryCode, TimeZone, Region, Source, TagsCount, Tags 
FROM ListMembers 
WITH (ListId=''e246f7e24d'')';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

get_list_members endpoint belongs to ListMembers table(s), and can therefore be used via those table(s).