# Pagination Contract Audit

> Pagination Contract Audit is a paid API for AI agents from api.zfinia.com, paid per call via x402, $0.24/call, status unknown (last checked 2026-10-19).

Audits a pagination contract definition to detect data-loss and row-duplication bugs including non-unique sort fields, mutable-sort offsets, unbounded page sizes, and mixed cursor/offset usage.

## Facts

- Endpoint: POST https://api.zfinia.com/x402/v1/pagination-contract-audit?utm_source=zero.xyz
- Price: $0.24/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pagination-contract-audit-7368faa8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SVfIONXtaHpiwbYT3gf6Z

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pagination-contract-audit-7368faa8 -d '<json body>'
```

Example prompt: Can you audit this pagination contract for me — it uses offset-style pagination, sorted by 'created_at' which is not unique and is mutable, with a default page size of 20 and a max of 500?

## When to prefer this

Use this endpoint when you need to programmatically verify that a paginated API contract is free of row-loss and row-duplication bugs before shipping or reviewing it — especially when the sort fields, pagination style, or page size bounds are developer-supplied and need a deterministic structural audit rather than a general code review.

## Known failure modes

- Missing or malformed contract object returns a validation error
- Sort array items missing required fields like 'field' or 'unique' may cause incomplete analysis
- No findings returned if the contract appears sound — not an error, just a clean audit
- Sort array exceeding 20 items is rejected by schema limit
- Invalid enum value for style field causes request rejection

## How this service works

Audit a pagination contract for the ways it loses or repeats rows. The central finding is the one almost every paginated API has at first: a sort on a non-unique field with no unique tiebreaker, so rows that compare equal have no defined order and a caller walking the pages can get one row twice and never get its neighbour, with nothing failing. Also reports offset pagination over a mutable sort, an unbounded page size, contradictory bounds, and a cursor contract that also takes an offset.

## Output

A structured audit report listing all detected pagination contract problems: non-unique sort fields lacking a unique tiebreaker (the central finding), offset pagination over mutable sorts, unbounded or contradictory page size bounds, and cursor contracts that also accept an offset parameter — each finding described with enough detail for the developer to understand the data-loss or row-duplication risk.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "contract": {
   "type": "object",
   "properties": {
    "sort": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "field": {
        "type": "string",
        "maxLength": 200
       },
       "unique": {
        "type": "boolean"
       },
       "mutable": {
        "type": "boolean"
       }
      }
     },
     "maxItems": 20
    },
    "style": {
     "enum": [
      "cursor",
      "keyset",
      "offset",
      "page"
     ],
     "type": "string"
    },
    "page_size_max": {
     "type": "integer",
     "minimum": 1
    },
    "max_total_results": {
     "type": "integer",
     "minimum": 1
    },
    "page_size_default": {
     "type": "integer",
     "minimum": 1
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pagination-contract-audit-7368faa8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.zfinia.com](https://www.zero.xyz/host/api.zfinia.com/llms.txt)
