so on each response i will get the 100 companies info + offset number + the has-more will be true..
so i ended up in an infinite loop… so how i can get all the 9,000 records? as i am unable to know when i should stop , as seems i will always get an offset number and the has-more will always be true??
Hey, @johnjohn123. Again, the documentation states: In addition to the list of companies, each request will also return two values, offset and has-more . If has-more is true, you’ll need to make another request, using the offset to get the next page of company records. So, your first request will return up to 250 company records and: “has-more”: true, “offset”: some_value Your next request will include offset=some_value and so forth.
The reason I say “IFhas-more is true” is because it will turn false once you have paged through all the companies. Basically, keep calling the endpoint with each offset value returned until the endpoint returns "has-more": false. Then you can stop because you have gotten all the companies.