> ## Documentation Index
> Fetch the complete documentation index at: https://docs-neevlegal.neeved.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination

> How to page through large result sets in the NeevLegal API.

List endpoints support pagination through two request parameters.

## Request Parameters

| Parameter | Type | Default | Description |
| :- | :- | :- | :- |
| `page` | integer | `1` | The page number to retrieve, starting from 1 |
| `perPage` | integer | `20` | Number of results per page. Maximum is `100` |

For `POST` endpoints such as `/case-search`, these go in the JSON body. For `GET` list endpoints, they go as query parameters.

## Response Envelope

```json theme={null}
{
  "success": true,
  "response": {
    "totalCount": 84,
    "page": 1,
    "limit": 10,
    "pages": 9,
    "cases": []
  }
}
```

| Field | Description |
| :- | :- |
| `totalCount` | Total records matching the query across all pages |
| `page` | The page returned in this response |
| `limit` | The page size used for this response |
| `pages` | Total number of available pages |

When `page` equals `pages`, you are on the last page.

## Example

```bash theme={null}
curl -X POST https://api-neevlegal.neeved.com/api/v1/case-search \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{ "petitioner": "Reliance Industries", "page": 1, "perPage": 10 }'
```

> [!TIP]
>
> Cache results locally when iterating through large result sets. Each page request for a search endpoint consumes credits.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.