Happy Business Starts Here

Savvy Scholar

PostQuery and pagination of standard ZOQL

Hi Zuora team,


I have a question regarding standard ZOQL (not Export ZOQL). I'm using PostQuery API: https://apisandbox.zuora.com/apps/api/batch-query/

For ex:

"format" : "csv",
"version" : "1.2",
"name" : "Example",
"encrypted" : "none",
"useQueryLabels" : "true",
"dateTimeUtc" : "true",
"queries"  : [{
    "name" : "account",
    "query" : "select Id from Account",
    "type" : "zoql"

As I read from here: https://knowledgecenter.zuora.com/DC_Developers/SOAP_API/M_Zuora_Object_Query_Language#Number_of_Rec..., the limit for each batch is 2000 records, but since there is no large dataset on sandbox, I couldn't test the behavior of having more than 2000 records. So my question is: how can I retrieve next page with PostQuery API and standard ZOQL? SOAP is not an option for me, and there is no "LIMIT" clause for standard ZOQL.


Thank you,


Zuora Alumni

Re: PostQuery and pagination of standard ZOQL

Hi @tvhung83,


From the content of your query, it looks like it is an AQuA query. The output of AQuA query is a file instead of the result.

We can get the AQuA query file by AQuA job finder.



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Savvy Scholar

Re: PostQuery and pagination of standard ZOQL

Hi @Dennis


Yes, the output are files, but I was confused about the 'limit' between 'zoql' and 'zoqlexport'. In 'Export ZOQL' page, it explicitly stated that the limit of output file is 2047MB, but since the section is 'Export ZOQL', I couldn't guess that it will apply for 'zoql' as well. I've tested with 'zoql' and no limit of 2000 records.


Thank you for your response.