function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Piyush jadavPiyush jadav 

Best way to call external API more then 300 times in Apex?

What is the best way to call external API in loop more then 300 times.
VinayVinay (Salesforce Developers) 
Hi Piyush,

Why do you want to call external API for more than 300 times,  there is a chance that you might hit API limits.  You can use batch apex to process the records in chunks using API's.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm

Please mark as Best Answer if above information was helpful.

Thanks,