How to fetch more than 10,000 records using Hubspot API

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

“limit”: 100,

“after”: “0”,

“properties”: [ “firstname”, “email”, “lastname”],

“filterGroups”:[

{

“filters”:[

{

“propertyName”: “lastmodifieddate”,

“operator”: “GTE”,

“value”: “{last date to get from}”

},

{

“propertyName”: “hs_object_id”,

“operator”: “GT”,

“value”: “{last id stored value (default to 0)}”

}

]

}

],

“sorts”: [

{

“propertyName”: “id”,

“direction”: “ASCENDING”

}

]

}