---
title: Pagination Best Practices
description: Efficient pagination with limit and offset
url: https://docs.intuition.systems/docs/v1/graphql-api/best-practices/pagination
markdown_url: https://docs.intuition.systems/docs/v1/graphql-api/best-practices/pagination.md
version: V1
llms_index: https://docs.intuition.systems/docs/v1/llms.txt
---

Always use limit and offset for efficient pagination with consistent ordering.

## Best Practice

```graphql
query GetAtomsPage($limit: Int!, $offset: Int!) {
  total: atoms_aggregate {
    aggregate {
      count
    }
  }
  atoms(
    limit: $limit
    offset: $offset
    order_by: { created_at: desc }
  ) {
    term_id
    label
  }
}
```

## Key Points

1. **Always include order_by** for consistent results
2. **Fetch total count** using aggregates
3. **Use reasonable limits** (10-100 items per page)
4. **Calculate offset** as `(page - 1) * limit`
