# Pagination in postman

**URL:** <https://community.postman.com/t/pagination-in-postman/36690>\
**Category:** Help Hub\
**Tags:** postman-api\
**Created:** [June 29, 2022, 11:39am UTC](https://community.postman.com/t/pagination-in-postman/36690 "2022-06-29T11:39:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhisheksingh25](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@abhisheksingh25](https://community.postman.com/u/abhisheksingh25)\
**Post date:** [June 29, 2022, 11:39am UTC](https://community.postman.com/t/pagination-in-postman/36690/1 "2022-06-29T11:39:55Z")

</div>

hello everyone i m new to postman i dont know much  
i m using fresh desk api to get data i read there documentation to get all data we need to do pagination so . in postman header part i can see there is link for second page so question is how can i do pagination Do i have to manually copy that link then press send or there is a automated way ??

_How I found the problem_:

_I’ve already tried_:

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [June 30, 2022, 2:40pm UTC](https://community.postman.com/t/pagination-in-postman/36690/2 "2022-06-30T14:40:21Z")

</div>

Hi @abhisheksingh25

What are you trying to do?  
Are you just loading the pages manually on the screen?  
Or are you extracting data from the response body (of each page) to be used elsewhere?

---

<div class="post-metadata">

**Author:** ![abhisheksingh25](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@abhisheksingh25](https://community.postman.com/u/abhisheksingh25)\
**Post date:** [July 1, 2022, 7:37am UTC](https://community.postman.com/t/pagination-in-postman/36690/3 "2022-07-01T07:37:37Z")

</div>

i want extract data from response but issue is that fresh desk api allow only 100 data at a time and in result header i can see second page link soo do i have to manually copy that link and hit request till last page ???  
Hope i explain properly

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [July 1, 2022, 8:40am UTC](https://community.postman.com/t/pagination-in-postman/36690/4 "2022-07-01T08:40:04Z")

</div>

I don’t know if this is the sort of thing you are looking for but, you could write a script that grabs the URL for the next page. Something like this;

```auto

let nextURL = pm.response.headers.get('WhatEverYourHeaderIsCalled');
console.log(nextURL);

const options = {
    url: nextURL, // <-- variable from above
    method: 'GET',
    header: {
        'Content-Type': 'application/json'
    }
}

pm.sendRequest(options, (error, response) => {
    if (error) throw new Error(error);
    //DO STUFF HERE
    //For examples;
    let responseBody = response.json();
    console.log(responseBody);
});

```
