Loop through limited results

Hi Team,

I’m new to post man and have following requirement if anyone can help please -

  1. We have total of 50k records and seems like GET API in postman is returning around 5k in one go, so need to know how can we fetch next set of records until we reach 50K
  • For this we have a createDate that I can also supply to get details, but want that to automatically be picked by last record and being used in next GET call.
  1. For each set of 5K records, I would want them to be in the file (text/anything is okay) as I need to do some data checks and then delete duplicate records.

Can anyone assist please ? Thanks in advance.

What have you tried so far?

Does your API return the total number of records in the response alongside the current number? This is called pagination, and is how you loop through large datasets. Postman has a function called setNextRequest() which allows you to keep looping the same request. (Please check the forum and Learning Center for usage examples).

If your request returns 5k records at a time, you can save the response to disk.

If you are new to Postman and API’s, I would recommend a trip to the Learning Centre first.

Overview | Postman Learning Center

Including the Postman Training links under “Resources”.


I would recommend the “Galaxy APIs 101” course first as it gets you used to the application features.

Then the “Galaxy Testing and Automation” course which teaches you how to assert the responses.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.