I am fetching cases from salesforce using python salesforce api. I have more than 800k cases. SOQL query Limit is 2000. if i am using OFFSET also, maximum offset value i can give is 2000. I want to fetch all 800k rows for analysis. i know there is a querymore() method in java . But How to achieve this using python ?

1 Answer 1


You could use either java or python to access either the salesforce SOAP or REST webservices.

SOAP will provide the query locator id that you can use to query more records.

The REST api provides a "nextRecordsUrl" for queries that exceed the set batch size for the query, and it functions essentially the same way. Make sure you are using the


endpoint and not a custom endpoint that has apex run the query.

  • Thanks for the quick response!! i did not notice that there is also a queryall() method available in python rest api , which uses nextrecordsurl to fetch all the data.
    – sabya
    Commented Apr 11, 2017 at 9:16
  • Nice, if your application can handle all that data all at once, that sounds like it would be convenient to use.
    – martin
    Commented Apr 11, 2017 at 9:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .