# Collate all pages from GET response to one variable

**URL:** <https://community.postman.com/t/collate-all-pages-from-get-response-to-one-variable/17939>\
**Category:** Help Hub\
**Tags:** variables\
**Created:** [November 22, 2020, 2:53am UTC](https://community.postman.com/t/collate-all-pages-from-get-response-to-one-variable/17939 "2020-11-22T02:53:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![deedo11](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@deedo11](https://community.postman.com/u/deedo11)\
**Post date:** [November 22, 2020, 2:53am UTC](https://community.postman.com/t/collate-all-pages-from-get-response-to-one-variable/17939/1 "2020-11-22T02:53:18Z")

</div>

Hi Community,

I am running a GET request. The response has 501,000 results and there a limit of 100 results on a page. Is there a way for me to collate all the results into one variable using a Test script?

 ![Screen Shot 2020-11-21 at 7.52.54 PM](https://us1.discourse-cdn.com/getpostman/original/3X/c/9/c9f53aeab9fc501ed9d2b453625d6c56728e7f7c.png)

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [November 23, 2020, 9:41am UTC](https://community.postman.com/t/collate-all-pages-from-get-response-to-one-variable/17939/2 "2020-11-23T09:41:24Z")

</div>

Hello @deedo11,

As far I know, whenever there’s a pagination implemented and your results has a limit, only the current response can be stored in a variable. To parse through this you can set your index and reach till the end of result. But each time, you can save the current response only (100 records limit), and even the Tests are applicable only to them.

---

<div class="post-metadata">

**Author:** ![deedo11](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@deedo11](https://community.postman.com/u/deedo11)\
**Post date:** [November 24, 2020, 12:46am UTC](https://community.postman.com/t/collate-all-pages-from-get-response-to-one-variable/17939/3 "2020-11-24T00:46:13Z")

</div>

Hi @bpricilla I see, that’s a bit disappointing.  
Thank you.

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [November 24, 2020, 3:36am UTC](https://community.postman.com/t/collate-all-pages-from-get-response-to-one-variable/17939/4 "2020-11-24T03:36:01Z")

</div>

@deedo11 I understand how it will be 🙂 But May I know the purpose of storing the entire response into a single variable? Based on your results, I could vaguely imagine a the size of the response 🙄

Just a suggestion, check your API documentation and try adding the filters to extract the desired response .

---

<div class="post-metadata">

**Author:** ![deedo11](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@deedo11](https://community.postman.com/u/deedo11)\
**Post date:** [November 24, 2020, 1:21pm UTC](https://community.postman.com/t/collate-all-pages-from-get-response-to-one-variable/17939/5 "2020-11-24T13:21:48Z")

</div>

Hi @bpricilla I am playing around with the [Etsy API.](https://www.etsy.com/developers/documentation/reference/listing#method_findalllistingactive)  
I want to get listings that have\>1000 views for each Taxonomy ID I specify. I also want the listings sorted in descending order by the number of views.

The only parameter I can use based on the activeListing method is Taxonomy ID (e.g. 66 for Art). I use a test script to filter by views and sort in descending order.

The issue I have which you mentioned is the test script only applies to the page not the entire response.
