# Pagination mismatch. Offset != page and Limit != per\_page

**URL:** <https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421>\
**Category:** Get Help\
**Tags:** api\
**Created:** [August 9, 2022, 2:24pm UTC](https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421 "2022-08-09T14:24:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![siddalingappa1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/siddalingappa1/32/33897_2.png) [@siddalingappa1](https://community.auth0.com/u/siddalingappa1)\
**Post date:** [August 9, 2022, 2:24pm UTC](https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421/1 "2022-08-09T14:24:35Z")

</div>

We should be using Offset and Limit for pagination while calling get Organization Members endpoint,

Could you please let us know how to do that ?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [August 9, 2022, 5:05pm UTC](https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421/3 "2022-08-09T17:05:00Z")

</div>

Hi @siddalingappa,

Welcome to the Auth0 Community!

I understand that you need guidance on using the **page** and **per\_page** parameters in the Management API [Get Organization Members](https://auth0.com/docs/api/management/v2#!/Organizations/get_members) endpoint.

Firstly, using the **per\_page** parameter specifies the number of results per page and defaults to 50. So, for example, specifying `per_page: 1` will produce only 1 result.

Next, using the **page** parameter specifies the page index of the results to return, where the first page is indexed 0. For example, calling `page: 1` returns the results of the second page.

I hope this answers your questions!

Please let me know if you have any additional questions. I’d be happy to help.

Thank you.

---

<div class="post-metadata">

**Author:** ![siddalingappa1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/siddalingappa1/32/33897_2.png) [@siddalingappa1](https://community.auth0.com/u/siddalingappa1)\
**Post date:** [August 10, 2022, 7:03am UTC](https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421/4 "2022-08-10T07:03:06Z")

</div>

I want to use offset and limit ?

---

<div class="post-metadata">

**Author:** ![siddalingappa1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/siddalingappa1/32/33897_2.png) [@siddalingappa1](https://community.auth0.com/u/siddalingappa1)\
**Post date:** [August 10, 2022, 7:13am UTC](https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421/5 "2022-08-10T07:13:04Z")

</div>

page and per page are different than offset and limit 🙂

So we need to convert offset and limit to page and per page (Happy to know what might be the way to convert )

---

<div class="post-metadata">

**Author:** ![siddalingappa1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/siddalingappa1/32/33897_2.png) [@siddalingappa1](https://community.auth0.com/u/siddalingappa1)\
**Post date:** [August 10, 2022, 2:05pm UTC](https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421/6 "2022-08-10T14:05:09Z")

</div>

page and per page are different than offset and limit 🙂

So we need to convert offset and limit to page and per page (Happy to know what might be the way to convert )

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [August 10, 2022, 9:26pm UTC](https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421/8 "2022-08-10T21:26:52Z")

</div>

Hi @siddalingappa1,

Thank you for your responses.

> [@siddalingappa1](#):
>
> Do we have offset and limit to pass it to that endpoint ?

The equivalent fields for **offset** and **limit** are **page** and **per\_page** when calling the Management API Get Organization Members endpoint.

> [@siddalingappa1](#):
>
> page and per page are different than offset and limit

Could you elaborate on how the page and per\_page fields are different from offset and limit?

What observations have you encountered when using page and per\_page that would require a conversion?

I am looking forward to your reply.

Thank you.

---

<div class="post-metadata">

**Author:** ![siddalingappa1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/siddalingappa1/32/33897_2.png) [@siddalingappa1](https://community.auth0.com/u/siddalingappa1)\
**Post date:** [August 11, 2022, 5:39am UTC](https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421/9 "2022-08-11T05:39:55Z")

</div>

If I use page and per page with 20 objects per page, assuming that page 1 and per page is 20, returns objects with index 0 - 19, if you are on page 2, then you should be looking at objects with index 20 - 39.

But If I use offset and limit, If I now decide to change my offset to 2 and limit to 10, the most common behavior would be to display objects with index 2 - 11. So here we can use precise selection to get the results

---

<div class="post-metadata">

**Author:** ![siddalingappa1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/siddalingappa1/32/33897_2.png) [@siddalingappa1](https://community.auth0.com/u/siddalingappa1)\
**Post date:** [August 11, 2022, 1:31pm UTC](https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421/10 "2022-08-11T13:31:30Z")

</div>

I also have another question :  
We get this organization members response with following fields  
- total  
- start  
- limit

What are these ?

Is limit means --perpage ?  
offset means - page ?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [August 15, 2022, 11:39pm UTC](https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421/11 "2022-08-15T23:39:06Z")

</div>

Hi @siddalingappa1,

Thank you for your responses.

> [@siddalingappa1](#):
>
> But If I use offset and limit, If I now decide to change my offset to 2 and limit to 10, the most common behavior would be to display objects with index 2 - 11

In this case, I recommend using the **from** field and **take** field to accomplish this. The **from** field can be used to specify the ID which to begin, for example, the second index. And then using the **take** field to specify the number of results per page, for example, 10.

> [@siddalingappa1](#):
>
> We get this organization members response with following fields
> 
> - total
> - start
> - limit
> 
> What are these ?

Could you please share a screenshot of your observations?

I am looking forward to your reply.

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 15, 2023, 11:02pm UTC](https://community.auth0.com/t/pagination-mismatch-offset-page-and-limit-per-page/88421/12 "2023-05-15T23:02:02Z")

</div>

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