Skip to main content
Solved

GET profiles API giving less information.

  • June 29, 2023
  • 3 replies
  • 140 views

Devphoenix
Active Contributor III
Forum|alt.badge.img+4

Hi Team,

I've been trying to retrieve 100k contacts (profiles) using the GET API {{baseUrl}}/api/lists/:id/profiles/, but every time I try it, it only returns 20 contacts (profiles).

My account id - gourav.gupta+klaviyo@brevo.com

 

curl --location 'https://a.klaviyo.com/api/lists/:id/profiles/' \
--header 'revision: 2023-06-15' \
--header 'Accept: application/json' \
--header 'Authorization: Klaviyo-API-Key pk_-------------------'

 

Best answer by Brian Turcotte

Hi @Devphoenix!

This can be adjusted by using the page[size] parameter, which controls how many objects are returned per call:

Get Profiles

 

This endpoint has a minimum (default) of 20, and maximum of 100. If you want to get more than that, you will have to use the page[cursor] parameter to paginate through the response: 

 

I hope this helps, and thanks for using the Community!

- Brian

 

3 replies

Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • June 29, 2023

Hi @Devphoenix!

This can be adjusted by using the page[size] parameter, which controls how many objects are returned per call:

Get Profiles

 

This endpoint has a minimum (default) of 20, and maximum of 100. If you want to get more than that, you will have to use the page[cursor] parameter to paginate through the response: 

 

I hope this helps, and thanks for using the Community!

- Brian

 


Devphoenix
Active Contributor III
Forum|alt.badge.img+4
  • Author
  • Active Contributor III
  • 22 replies
  • June 29, 2023

Thanks @Brian Turcotte 

is it possible to increase the size from 100 to 1000 or 10000 in one go?

As the system needs to scale.


Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • June 29, 2023

Hi @Devphoenix!

For now, the maximum one-page value is 100, so you’d have to use the pagination functionality to get more than that.

 

Best,

Brian