Get more records in several api calls

I have been trying to extract all the information regarding companies using the new api /crm/v3/objects/companies, however I have a limit of 100 records/api call therefore I was looking at ways to perform multiple api calls until I have all the records. I read quite a bit and it seems like in the previous version of the API there was the option to implement this using the hasMore and Offset parameters, whcih appear to be decrepated in the new version (). How would I be able to achieve something similar using the new API.

Thank you for your time

Hey @iff

Welcome to the Community!

In the new API, there is paging which will provide you with an object that will contain “after” and “link”

It will look something like this:

"next": {
 "after": "4835913070",
 "link": "https://api.hubapi.com/crm/v3/objects/companies?limit=100&after=4835913070"
 }

You should be able to pull that data for your next request.

Hey Dennis,
Thank you so much for replying to my question! I have found the `paging` section in the request. I am just wondering if I could get some more clarification should “next” == None when no more companies are found?
Thank you in advance
iff

@iff

You got it!

Thank you so much!
Really helpful :grinning_face_with_smiling_eyes: