APIs & Integrations

hadisaad
Member

API to get all Count of Contacts in List

SOLVE

Dear HubSpot,

 

We are trying to achieve the following using Klipfolio API:

 

- We need to query lists and count how many contacts belong in that list AT A CERTAIN POINT IN TIME The problem resides in the following:

 

- Due to our large amount of data, we are getting only 25 records per call [Thats 1] - In order to get more records we need to pass the vidoffset parameter ( which is only retrievable by the previous API call )

 

- It is not similar to "page" and "size" and "count" where we can get all the records and pages by just knowing the total count of records.

 

- One of the solutions is to be able to send a query to your endpoints that we pasas two date parameters example:

 

- api/getallcontactsinlist/169?start=20191101&end=20191130 This way we can get the count of contacts in that list in that point in time without having to go through all the pages and offsets.

 

- Another solution is we develop our own APP in hubspot and craft the requests in the backend - overriding Klipfolio's limit of not being able to do sequential paging.

 

- NOTE we know we can use vidoffset but that is not helpful in Klipfolio as we will have to create around 10 datasources for each list which is not practical https://api.hubapi.com/contacts/v1/lists/190/contacts/all this is an example request that we are doing thanks

1 Accepted solution
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

API to get all Count of Contacts in List

SOLVE

Hi @hadisaad,

 

When looking to get the total count of list at a certain point in time, your team can use this endpoint Get a contact list by its unique ID where the size value will indicate the list size at the point of time when you run the endpoint. My suggestion here is that your team can run the endpoint everyday to retrieve the list size so that you wouldn't have to page through the Get contacts in a list endpoint.

 

What do you think? 

View solution in original post

2 Replies 2
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

API to get all Count of Contacts in List

SOLVE

Hi @hadisaad,

 

When looking to get the total count of list at a certain point in time, your team can use this endpoint Get a contact list by its unique ID where the size value will indicate the list size at the point of time when you run the endpoint. My suggestion here is that your team can run the endpoint everyday to retrieve the list size so that you wouldn't have to page through the Get contacts in a list endpoint.

 

What do you think? 

AsterBen
Member

API to get all Count of Contacts in List

SOLVE

I agree with the OP.

While using lists will give you a size count, that will only work if a list for all contacts has been set up.  If such a list hasn't been set up then it is not possible to get the correct count.

0 Upvotes