Pagination

Limit/offset pagination pattern for traversing large result sets.

Overview

All list endpoints in the Indiana Property Data API use limit/offset pagination. This pattern is simple, predictable, and works well with traditional UI pagination controls.

Parameters

| Parameter | Type | Default | Max | Description | |-----------|------|---------|-----|-------------| | limit | integer | 20 | 100 | Number of results per page | | offset | integer | 0 | -- | Number of results to skip |

Basic Usage

Get the first page of results:

Code
curl "https://api.aribatax.com/v1/parcels/search?county_id=49&limit=20&offset=0" \
  -H "X-API-Key: your_api_key_here"

Get the second page:

Code
curl "https://api.aribatax.com/v1/parcels/search?county_id=49&limit=20&offset=20" \
  -H "X-API-Key: your_api_key_here"

Response Metadata

Every paginated response includes a meta object:

Code
{
  "data": [...],
  "meta": {
    "total": 847,
    "limit": 20,
    "offset": 0
  }
}
  • total -- The total number of matching records (for computing total pages)
  • limit -- The limit used for this request
  • offset -- The offset used for this request

Computing Total Pages

Code
const totalPages = Math.ceil(meta.total / meta.limit);
const currentPage = Math.floor(meta.offset / meta.limit) + 1;
const hasNextPage = meta.offset + meta.limit < meta.total;
const hasPrevPage = meta.offset > 0;

TypeScript Example

Code
import { PropertyDataClient } from "@property-data/sdk";

const client = new PropertyDataClient({ apiKey: process.env.API_KEY! });

async function getAllParcelsInCounty(countyId: number) {
  const allParcels = [];
  let offset = 0;
  const limit = 100;

  while (true) {
    const response = await client.parcels.search({
      county_id: countyId,
      limit,
      offset,
    });

    allParcels.push(...response.data);

    if (offset + limit >= response.meta.total) break;
    offset += limit;
  }

  return allParcels;
}

Best Practices

  • Use the maximum limit (100) when fetching data programmatically to minimize round trips.
  • Don't paginate past 10,000 results. For very large datasets, use filters to narrow the result set first.
  • Cache total counts when possible. The total value is computed on each request, which adds overhead for large datasets.
  • Use consistent sort order to ensure stable pagination. Results are sorted by state_parcel_id by default.