Skip to main content
Solved

How to get all profiles with just one call API?

  • December 29, 2022
  • 2 replies
  • 544 views

Forum|alt.badge.img+2

I just learned about Klaviyo API and know that currently Klaviyo only returns up to 20 profiles per call.

Is it possible to get all profiles in one call? (don’t using lists or segments).

Thanks for help.

Best answer by KeviSunshine

Hi @tungnk,

I’ve never used the Get Profiles endpoint, but looking at the documentation, it’s clear that it can’t return all profiles in a single API call. You’ll need to use the pagination parameter to fetch more profiles after the first 20. They document how pagination works here: https://developers.klaviyo.com/en/reference/api_overview#pagination.

So my advice would be to run your calls in a loop–fetch 20 profiles, then each subsequent call asks for 20 more profiles until there are no pages left.

Not as convenient, but it’s pretty standard to limit the number of response records so nothing out of the ordinary.

 

Cheers,

Kevin.

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

2 replies

KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 158 replies
  • Answer
  • December 29, 2022

Hi @tungnk,

I’ve never used the Get Profiles endpoint, but looking at the documentation, it’s clear that it can’t return all profiles in a single API call. You’ll need to use the pagination parameter to fetch more profiles after the first 20. They document how pagination works here: https://developers.klaviyo.com/en/reference/api_overview#pagination.

So my advice would be to run your calls in a loop–fetch 20 profiles, then each subsequent call asks for 20 more profiles until there are no pages left.

Not as convenient, but it’s pretty standard to limit the number of response records so nothing out of the ordinary.

 

Cheers,

Kevin.


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 2 replies
  • December 29, 2022

Hi @KeviSunshine!

Thanks  for your help.