# API Usage Numeric Row Ordering

> API Usage Numeric Row Ordering is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-24).

Sorts up to 200 API usage records (by requests or latency_ms) into numeric row order locally, with no external enrichment.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-sector-analytics-api-usage-sort?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-usage-numeric-row-ordering-87636db4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h0wNr1BbrJLpXJoG3g-F4

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 api-usage-numeric-row-ordering-87636db4 -d '<json body>'
```

Example prompt: Sort these API usage records by requests count — I have 4 rows: row-1 for group-a on 2026-10-01 with 10 requests and 1ms latency, row-2 for group-b on 2026-10-02 with 20 requests and 2ms latency, row-3 for group-a on 2026-10-03 with 15 requests and 3ms latency, and row-4 for group-b on 2026-10-04 with 30 requests and 4ms latency.

## When to prefer this

Choose this endpoint when you need a fast, cheap, local numeric sort of API usage records (up to 200 rows) by either request count or latency without any external data enrichment, forecasting, or aggregation. Ideal for lightweight data preprocessing steps in agent workflows that need ordered API metrics before further analysis.

## Known failure modes

- Submitting more than 200 rows returns a validation error
- Missing required fields (row_id, endpoint, date, requests, latency_ms) causes schema rejection
- Invalid date format (not YYYY-MM-DD) fails pattern validation
- Null values in both numeric fields may affect sort stability
- Field enum value outside 'requests' or 'latency_ms' is rejected
- Empty rows array is rejected (minItems: 1)

## How this service works

API usage - Numeric row ordering: Numeric row ordering for API usage. Up to 200 supplied typed records. Local numeric and data-quality processing; no external enrichment or forecasting. One of 25 profiles or calculations across 20 shared operations in this sector. 0.01 USDC includes one bounded numeric row ordering deliverable.

## Output

Returns the submitted API usage rows reordered numerically by the specified field (requests or latency_ms), processed locally without external enrichment. The output is a bounded, sorted list of up to 200 typed records.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "row_id",
     "endpoint",
     "date",
     "requests",
     "latency_ms"
    ],
    "properties": {
     "date": {
      "type": "string",
      "default": "",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "maxLength": 10
     },
     "row_id": {
      "type": "string",
      "default": "",
      "maxLength": 80,
      "minLength": 1
     },
     "endpoint": {
      "type": "string",
      "default": "",
      "maxLength": 80
     },
     "requests": {
      "type": [
       "number",
       "null"
      ],
      "maximum": 1000000000000,
      "minimum": -1000000000000
     },
     "latency_ms": {
      "type": [
       "number",
       "null"
      ],
      "maximum": 1000000000000,
      "minimum": -1000000000000
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "date": "2026-10-01",
     "row_id": "row-1",
     "endpoint": "group-a",
     "requests": 10,
     "latency_ms": 1
    },
    {
     "date": "2026-10-02",
     "row_id": "row-2",
     "endpoint": "group-b",
     "requests": 20,
     "latency_ms": 2
    },
    {
     "date": "2026-10-03",
     "row_id": "row-3",
     "endpoint": "group-a",
     "requests": 15,
     "latency_ms": 3
    },
    {
     "date": "2026-10-04",
     "row_id": "row-4",
     "endpoint": "group-b",
     "requests": 30,
     "latency_ms": 4
    }
   ],
   "maxItems": 200,
   "minItems": 1
  },
  "field": {
   "enum": [
    "requests",
    "latency_ms"
   ],
   "type": "string",
   "default": "requests"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-usage-numeric-row-ordering-87636db4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
