Skip to main content

How to get Subscriber Growth data via API


Forum|alt.badge.img+4

Hi Klaviyo Developer Community,

I am working on a project where I need to retrieve total email subscribers, new subscribers, and exclusions data via the Klaviyo API. I aim to use this data to have similar chart in Looker Studio.

I have attached a screenshot for reference, which shows the specific metrics I am trying to obtain via the API. However, I am uncertain about which API endpoints or metrics to use to achieve this.

Could you please guide me on how to fetch:

  1. Total email subscribers
  2. New subscribers
  3. Exclusions

Any advice or examples of API calls that can help me get this data would be greatly appreciated.

Thank you for your assistance!

Best regards,
Santi

 

 

Did this topic or the replies in the thread help you find an answer to your question?

4 replies

chloe.strange
Community Manager
Forum|alt.badge.img+41
  • Community Manager
  • 425 replies
  • May 24, 2024

Hi @santiagosanti

Profiles can be listed and one of the filters passed in are Suppression. See this page for how a profile could have been suppressed. A list of profiles can be fetched via Get Profiles. 

Exclusions: When you say exclusions can you be more specific? Are you referring to profiles that might have been suppressed by Klaviyo due to email bounces etc? If so, you can identify profiles that have been suppressed based on filtering the Get Profiles API and pass in subscriptions.email.marketing.suppression.timestamp and pass in a date range via greater-than and less-than.

I would recommend using the metrics APIs. First, query the Get Metrics API in order to get a list of all available metrics and their associated metric_id. From there, you can call the QueryMetricAggregates API and pass in the metric_id , interval, and filter by time range. 

~Chloe


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • 25 replies
  • June 5, 2024

Hi Chloe,

When I say exclusions i mean sum of data from sources below


I am already using “Get Profiles” and “Query Metric Aggregates” endpoint, but i am unable to get data like Subsciber growth report data from the screenshot below. I tried summing available metrics mentioned in sources still some source are missing as metrics, kindly help me out here!

 



Best regards,
Santi


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • 25 replies
  • September 17, 2024

Hi, 

can anyone help me on this?

Best regards,
Santi


Forum|alt.badge.img
  • Problem Solver II
  • 13 replies
  • January 27, 2025

Hi Santi,

The endpoint that you are looking for it the Query Segment Series. Here you can fetch the data related to segment growth (members added and dropped). You just need to add the segments that you wish to track.

I would suggest a segment with the criteria “can receive email marketing”. Those added to the segment are “new subscribers” and those dropping can be labelled as “suppressed” or “unsubscribed”. Just be sure to star the segment as you do not wish for them to go inactive (and stop tracking growth).

Let me know if this works for you!

 

All best,

Andrés @ Melusine Studio

www.melusine.studio