SOLVED

Export Smart List Via API

Go to solution
Anonymous
Not applicable

Export Smart List Via API

We are attempting to export data from specific fields in a smart list to an external database via Marketo API.

I am having trouble finding documentation or other questions that cover this, can it be done?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Export Smart List Via API

Stephen, like Kenny said, Smart Lists are not accessible via API (when you think about the complexity and computation time that could potentially go into a SL, and the expectation that an API call will get the freshest data, it's understandable that this hasn't/yet been enabled).

A common workaround is adding to a static list via a batch campaign and then using the Get Leads by List ID method.

But if you are desperate to get Smart Lists as-is, you could think about using SL subscriptions and then processing the report with an email-to-database app.  Something to think about.  For a current client, I'm wondering if their client (the owners of the Mkto instance) might find setting up an SL subscription easier than giving us API access, since they seem very touchy and the whole SL-to-static might be a no-go.

View solution in original post

11 REPLIES 11
Kenny_Elkington
Marketo Employee

Re: Export Smart List Via API

Smart lists currently can't be extracted via the API.  You can use either Get Leads by Filter Type or Get Leads by List ID to extract them from a static list.

SanfordWhiteman
Level 10 - Community Moderator

Re: Export Smart List Via API

Stephen, like Kenny said, Smart Lists are not accessible via API (when you think about the complexity and computation time that could potentially go into a SL, and the expectation that an API call will get the freshest data, it's understandable that this hasn't/yet been enabled).

A common workaround is adding to a static list via a batch campaign and then using the Get Leads by List ID method.

But if you are desperate to get Smart Lists as-is, you could think about using SL subscriptions and then processing the report with an email-to-database app.  Something to think about.  For a current client, I'm wondering if their client (the owners of the Mkto instance) might find setting up an SL subscription easier than giving us API access, since they seem very touchy and the whole SL-to-static might be a no-go.

Anonymous
Not applicable

Re: Export Smart List Via API

A couple of years back when 'smart list subscription' was not yet there, I used a combination of smart campaign and a web hook to pull the leads out in external table. Since web hooks are not allowed in a batch campaign, I had to do some smart campaign to make that happen.

I second Sanford's suggestions now those mechanisms (smart list subscription and API calls) are available. If adding smart lists contents to a static lead is acceptable for your business case, that might work better.

Email to database app is a good idea too but a bit more moving pieces and can be difficult to manage / debug.

Rajesh

gayathripandian
Level 1

Re: Export Smart List Via API

See that this thread is from 2016 and we are faced with the same challenge. Has there been any functional changes that will help us pull the Smart Lists via API as of date? Or exporting the Segments via API

 

Please let know if there are other work arounds too. 

 

Thank you!

SanfordWhiteman
Level 10 - Community Moderator

Re: Export Smart List Via API

Yes! https://developers.marketo.com/rest-api/bulk-extract/bulk-lead-extract/ and the smartListId or smartListName options.

Sumedha_Parab__
Level 2

Re: Export Smart List Via API

Hi Everyone,

 

I am also looking to capture leads from SmartList. 

The Bulk Lead Extract filter accepts only 1 smart list id. 😯

 

I want to fetch leads from multiple smartlists, presently, I'll have to create a bulk job for each smart list. 

 

Thanks and Regards,

Sumedha.

SanfordWhiteman
Level 10 - Community Moderator

Re: Export Smart List Via API

It’s one at a time.
Sumedha_Parab__
Level 2

Re: Export Smart List Via API

Okay.

Thank you @SanfordWhiteman .

Ryan_Benton
Level 2

Re: Export Smart List Via API

@SanfordWhiteman Is there an example syntax for filtering a bulk export by smartListId? All I've found are examples with createdAt as the filter. Here's the relevant part of what I'm feeding in and getting an error for (with anything in < > replaced with my values: 

 

-d '{
    "fields": ["email", "firstName", "lastName"],
    "filter": {
		"smartListId": {
          "listId": <my list ID>
        }
	 }
  }' \
  "https://<my instance id>.mktorest.com/bulk/v1/leads/export/create.json?format=csv"