Skip to main content

Hi, today we started seeing this header in the api limits when we pull get-profile with include lists = True:

1, 1;w=1, 15;w=60

 

Is this a new value? I guess it corresponds to XS?

This means that the limits changed for this endpoint and are now less than before? Which means we can’t pull more than 15 profiles and their list per minute (so 1 per 4 seconds)? This doesn’t sound good, it will take ages to pull just a few hundreds of profiles.

Also, we get those headers in the response:

ratelimit-limit: 1, 1;w=1, 15;w=60
ratelimit-remaining: 0
ratelimit-reset: 0

 

In the docs it says:

 

All non-rate-limited (i.e., non 429) responses will contain the following HTTP response headers that indicate the state of the steady rate limit window to the client.

 

but in this case, it seems it corresponds to the BURST RATE LIMIT, since the steady limit needs ~40-50 seconds in order to reset (which I can see when I hit the limits, getting 429 throttled with Retry-After ~40 seconds).

Are those bugs? How this should work? Are the docs wrong / outdated?

Hi there, Paul from Klaviyo here, 

This has always been the rate limit for the endpoint when including lists, but due to an issue with our API framework, it was not applied. We’ve pushed a fix and now the correct rate limit is being applied. 

 

How many profiles are in your account? What are you doing with that data once you get it? That’ll help me see what the best solution is for you. 


Hello, thank you for your reply!

 

We want to pull contacts’ list subscriptions updated since a given date, but only from a specific list(s). We first pull a list of contacts updated since the given date, and then for each of those contacts we pull their profile info (get-profile API call), including the lists they are subscribed to. At the time of working on that, there was no other way to do so. Then on our end, we filter out those profiles, keeping only those that exist in the list(s) we are interested it.

 

Is there a more efficient way of doing this? I am not sure how many emails exist in our clients’ address books, as we do this for a number of accounts, but I can tell you that imports that used to last a few minutes now last 3+ days, mainly because we have to sleep in order to avoid 429 errors.

 

Any help / suggestion would be greatly appreciated!


Right now to pull list membership for profiles, you have a few options: 

  • Pull membership by list ID (https://developers.klaviyo.com/en/reference/get_list_profiles)
  • Pull list membership by profile what you’re currently doing
  • Create a periodic sync for “subscribed to list” and “unsubscribed to list”, which will include the list_id in the payload, and manage your source of membership through those. 

We are exploring higher throughput ways to enable what you’re trying to do, but for now those would be the three options available. 


Reply