Print this page

What is the maximum number of rows returned by SOQL queries over the REST API before a subsequent GET to the "nextRecordsURL" is needed?

Knowledge Article Number 000181883
Description What is the official number of rows at which the results will be broken up and a subsequent GET to the "nextRecordsURL" is needed? Is it based on the size of the response? 
  • The maximum result size is 2000, but this can be smaller if you have selected several fields or if you have included blob fields (e.g. long text area fields, rich text area fields) in your SOQL query.
  • The maximum query length on REST is bound by the URL limit imposed by our app servers, around 20,000 characters. 
  • The maximum query length is likely to be smaller than 20,000 characters because SOQL queries get translated and augmented with more information needed by the server side to execute the query (e.g. user name, org, complex formulas showing relationships etc.)
  • Responses can be sent transfer-encoding: chunked, which has no fixed or estimated response size (content-length). The underlying reason for limiting the number of records is database performance, not application server performance.

promote demote