Issue with fecthing all contacts. Is there no way with Keap to get all contacts when it's more than 10,000 contacts?

When I try to fetch all contacts I will always face an issue at 10,000…

When you try to offset more than 10,000 there will be
“[502] Body buffer overflow” error.

The same error happens with V2, when you set 10,000th ID as page_token.
Still the same error at first offset when I tried to reverse the order.
i.e)
×/rest/v1/contacts?order_by=id&order_direction=ascending&offse=10000
×/rest/v1/contacts?order_by=id&order_direction=descending&offse=1000
×/rest/v2/contacts?order_by=id&page_token=44978(10,000th Contact ID)

Is there no way with Keap API to get all contacts??

Hi Kan,

I cannot comment on the REST API, but I have not seen this issue with the XML-RPC API.
I recommend that you raise a Developer Support Ticket below.

https://developer.infusionsoft.com/support/tickets/create/

Work around solution would be try sorting the list by different fields, which is not ideal.
If you are really need to pull all the data, then you can use the XML-RPC API instead.

https://developer.infusionsoft.com/docs/xml-rpc/#data-query-a-data-table

https://developer.infusionsoft.com/docs/table-schema/#Contact

In the worse case scenario that the XML-RPC fails as well, then it sounds like you may have large amounts of data being stored in the Contacts. You can limit the amount of Contacts being queried to see if it improves things.

My guess is this is a data issue. Something in that page of data is probably causing issues making the response too big. Please file a ticket so support can take a look at it.