Skip to main content

Hi Team, 

I wanted to integrate Klaviyo in my product. So, i have been analysing Klaviyo API’s for past few days.One of the major limitation i am having with Klaviyo API is RATE LIMIT which i am getting often. Is there a possibility to minimise the occurrence of  rate limit error or increase the API calls per second?. 

Secondly, as of now, there is no API for getting all Profiles in an account. So, is there any other way to fetch all profiles from an account or any other alternate solution for it?.

Thank you,

Hirthikraj

Regarding your second point, couldn’t you make a segment for all profiles in your account and then use this endpoint:


@DavidSandel Its not only about my account.If an user have more than 20K or 30K profiles. It is a tedious process to fetch all profiles by passing each list id’s/segment id’s. It would be easier if we can fetch all profiles using bulk API.

If there is no option for it, at least it would be great if we get all the profile information through this API by passing list or segment id.

As of now, through this API, we are getting only profile ID and profile Email.

 


So, you’re trying to get all the contacts and each of their associated properties as well?

 

Still, I believe creating a segment in your account that includes all your contacts would remove the need to fetch all profiles by passing each list id/segment id since you’d already have them all in one place. But yeah, getting the associated properties is currently problematic…..but it would be great if we could all that.


@DavidSandel Okay. Can u give me the brief explanation about the Rate Limits.I read the Rate Limit Doc that you have posted but i am not convinced with that. I am getting rate limit error very frequently. So, can u please explain about the calls per second and range? 


I don’t know anything about rate limits, nor did I post anything about them. That’s why I only addressed your second point in the original post.


I think Klaviyo’s rate limits are set to 350/minute.  Not sure if that’s just the identify API or all of them. 

I’ve seen some programmers handle rate limits by adding a pause after each request.  6000/350 = 17 so a 17milisecond pause will probably avoid the rate limits altogether.  

I went a different route. Klaviyo is nice enough to return a json payload with a retryAfter property so watch for the 429 status and pause for that amount of time before resuming updates. 

 

Here’s an example from our logs

{"detail":"Request was throttled. Expected available in 4 seconds.","retryAfter":4}

 

I agree it would be nice to have an endpoint to get all contacts regardless of list.  We are forced to maintain a subscribers and unsubscribers list just so we can download all the contacts nightly. 


Reply