Pagination

Limit/offset pagination pattern for traversing large result sets.

Overview

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 | 25 (parcels) / 50 (sales) | 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/parcels/search?county_id=58&limit=25&offset=0" \
  -H "Authorization: Bearer your_api_key_here"

Get the second page:

Code
curl "https://api.aribatax.com/parcels/search?county_id=58&limit=25&offset=25" \
  -H "Authorization: Bearer your_api_key_here"

Response Metadata

Paginated responses include a meta object:

Code
{
  "type": "FeatureCollection",
  "features": ["..."],
  "meta": {
    "total": 847,
    "limit": 25,
    "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

Parcel endpoints (/parcels/search, /parcels/spatial) return GeoJSON FeatureCollections with results in features; sales endpoints (/sales/search) return results in a data array. Both carry the same meta object.

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;

Fetching All Pages

Code
async function getAllParcelsInCounty(apiKey: string, countyId: number) {
  const allFeatures = [];
  let offset = 0;
  const limit = 100;

  while (true) {
    const res = await fetch(
      `https://api.aribatax.com/parcels/search?county_id=${countyId}&limit=${limit}&offset=${offset}`,
      { headers: { Authorization: `Bearer ${apiKey}` } },
    );
    const page = await res.json();
    allFeatures.push(...page.features);

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

  return allFeatures;
}

Watch your per-minute rate limit and monthly quota when bulk-fetching -- see Rate Limits.

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.