Skip to main content
July 13, 2016
Question

API- How to get the count of Leads in the List

  • July 13, 2016
  • 1 reply
  • 3936 views

Hi,

I have a requirement, where I want to know the count of leads in  List.

I see API methods which can give me batch of Leads, but what I am interested in the total count in the list.

Thanks,

Siraj

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Jim_Thao7
Level 8
July 13, 2016

When you pull the leads from the list using Get Multiple Leads by List Id » Marketo Developers just do a count on the returned arrays (arrays = leads) using whichever language you choose to use. 

July 13, 2016

Thank you for the response.

Assume if I have 1M leads in a List.

And Marketo API call will give me only 300 leads per call… so I need to make ~ 333 calls to get the total lead counts.

But what I am interested over here is to just know the count in the list.

Thanks,

Siraj

SanfordWhiteman
Level 10
July 13, 2016

Can't AFAIK.

A way to simulate this, if you are very thorough in making sure to catch both adds and deletes, is to create a special "resource lead" that holds metadata for the list.  Then you can have a score field on the resource lead that stores, as closely as possible, the number of leads currently in the list.  Update the resource lead itself via webhook.