[SalesForce] the data transfer limit while using REST API in salesforce

I have a requirement where in I need to call an API that will return me up to 100 fields and every field would contain maximum 255 characters.

My question is is there any limitation in salesforce that is related to size of data I can read in an API call. This size will help me in defining my Batch size.

Thanks

Best Answer

Here's my advice: don't overthink it. You can't possibly harm the platform with any size you might set, because the platform will reduce the batch size dynamically as the number of fields and/or size of the fields changes. Your main concern should be if your client can handle it. For mobile devices, and really, anything that a user interacts with directly, should probably use smaller values, because it'll be more responsive for the user experience (e.g. use less memory and data bandwidth). For large-scale data replication to desktops or servers, feel free to set it to 2,000; if the system can't accommodate you, it'll make the batch size smaller.