How to fetch more than 10,000 records using Hubspot API
SOLVE
Hi,
I am using Deal search API to fetch records with some conditions on it, but I found from the docs that search API is limited to 10,000 records and we can't paginate more than that, and also there is request limit of 4 request/second. So I suppose that even I can't get all the 10, 000 records since that would contain 100 API calls.
My Question is there way I can fetch all the available records with any other API with some conditions applied on the properties
How to fetch more than 10,000 records using Hubspot API
SOLVE
Going off of the previous posts, the way I have solved this is to re-index instead of paging thorugh. To do this, on the "get" I am sorting by the ID ascending, and storing the last id (array[99]) since I am grabbing 100 at a time. On the next time through I am then checking for hs_object_id to be greater than that stored last id. This is my pseudo code to make this possible and it is pretty seamless
How to fetch more than 10,000 records using Hubspot API
SOLVE
Going off of the previous posts, the way I have solved this is to re-index instead of paging thorugh. To do this, on the "get" I am sorting by the ID ascending, and storing the last id (array[99]) since I am grabbing 100 at a time. On the next time through I am then checking for hs_object_id to be greater than that stored last id. This is my pseudo code to make this possible and it is pretty seamless
How to fetch more than 10,000 records using Hubspot API
SOLVE
The Search API returns records starting with the lowest object ID, by default. Therefore, in order to get around this, you'd need to implement a check in your code that logs 2 things.
1. The "after" value
2. The last ID
Once the after value reaches 10,000, you'll need to jump to a new loop in your code that resets the after value, and does a seach for record IDs greater than the last ID value from above. Every time you hit the 10000 after value, you'll need to restart your loop.