Is there any way to retrieve list counts via the API?

Anonymous
Not applicable

Is there any way to retrieve list counts via the API?

Ideally I'd just like to make a REST call to retrieve the Person Count of a specific list ID but I can't find any way to do that in the documentation.

Our end state is to automatically produce a report external to Marketo that allows us to describe things like "new names in last week", "total names in program X", etc. It would be fantastic if I could return similar counts against smart lists or segments but understand that that may be more difficult.

Any ideas?

Thank you,

Mark

5 REPLIES 5
Anonymous
Not applicable

Re: Is there any way to retrieve list counts via the API?

Hi Mark.

Does this do the trick?  You will need to add on to the example code to do the count, but it should provide the data. *from what I remember the call always passes a paging token even if the next page has 0 results, although it may behave differently now.

Get Multiple Leads by List Id » Marketo Developers

For "Total Names in program X" I like this call: will need a count function as well.

Get Multiple Leads by Program Id » Marketo Developers

Additionally, there is an option to get multiple leads by a custom field value. This is handy! Set a field conditionally with smart campaigns and then pull the data from the API.

Get Multiple Leads by Filter Type » Marketo Developers

hope it helps!

Anonymous
Not applicable

Re: Is there any way to retrieve list counts via the API?

Thank you Mark.

I appreciate the detail and the ideas for each these calls. I like the Leads By Filter Type idea.

I was afraid that I would have to follow the techniques you described but paging through 500K+ names just to get a count seemed like it would be both slow and overkill for this. I'll likely hit my API limit too.

The SOAP API call getMultipleLeads looks as though it returns "Remainingcount". I'm may chase that.

getMultipleLeads » Marketo Developers

In the end it may make sense for me to synch all of this data offline just so I can run simple reports. Kind of crazy...

Thanks again,

Mark

Anonymous
Not applicable

Re: Is there any way to retrieve list counts via the API?

Hi Mark

if API first response includes the numbers of total rows, it's best, IMO.

Anonymous
Not applicable

Re: Is there any way to retrieve list counts via the API?

I agree and up-voted this. Thank you.

Kenny_Elkington
Marketo Employee

Re: Is there any way to retrieve list counts via the API?

You can use Member of List to get a count through paging, but I really like Takehiro's feature request.