I am with an agency using Klaviyo for multiple accounts, and we are working to build out more consolidated reporting by querying the Klaviyo API.
One of our ongoing metrics is the list / segment size. As far as I can tell, the only way to do that through the current API is to query all the way through the current list or segment members (e.g. /v2/group/LIST_OR_SEGMENT_ID/members/all).
Does anyone know if there is a simpler/quicker/less taxing way to get this number? And if not is there an enterprising Klaviyo API Dev/Product Manager who wants to cut down on the number of API requests I need to make daily . I was hoping it would just be an aggregate number tacked onto v2/list/LIST_ID
Bonus Points if I could somehow get this as a historical value (e.g. to track list size historically) through metrics..
Best answer by Dov
Thank you for sharing your question with the Klaviyo Community.
Yes, currently the only way to gather all emails for a given list or segment is to use https://a.klaviyo.com/api/v2/group/list_or_segment_id/members/all. With that said, I understand your point and see how fetching the overall count can be useful to include in this request. I have submitted it as a proposal for our product team to consider. In the meantime, you can either continue using this endpoint or you can export lists and segments through a .csv file to capture total list and/or segment count.
Thanks and have a great day.