# Pagination using Json RPC?

**URL:** https://discuss.tryton.org/t/pagination-using-json-rpc/5345
**Category:** Developer
**Created:** [June 11, 2022, 9:21am UTC](https://discuss.tryton.org/t/pagination-using-json-rpc/5345 "2022-06-11T09:21:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![deathrake](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/b487fb/32.png) [@deathrake](https://discuss.tryton.org/u/deathrake)
#### Post date: [June 11, 2022, 9:21am UTC](https://discuss.tryton.org/t/pagination-using-json-rpc/5345/1 "2022-06-11T09:21:46Z")

</div>

Hey All

I am working on a angular apps that simply fetches customer shipment . i was able to fetch customer shipments . it first fetch id using `search` and the read the data from that id using `read`. I was thinking is there some how I could limit the id to 5 records and on next request it shows next 5 id on 2nd page

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [June 11, 2022, 10:12am UTC](https://discuss.tryton.org/t/pagination-using-json-rpc/5345/2 "2022-06-11T10:12:17Z")

</div>

The [`ModelStorage.search`](https://docs.tryton.org/projects/server/en/latest/ref/models.html#trytond.model.ModelStorage.search) method has limit and offset parameter which could be used for pagination. But you must ensure to use a predictive order to avoid duplicates or missing records. Also it is not safe against new record being inserted.

But there is a safer way to do pagination as explained in [Better pagination than offset (#4522) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue4522)  
It is not supported yet by Tryton’s clients but you may be able to implement it on your application.
