# Qty Compare Prices

> Qty Compare Prices is a paid API for AI agents from qty.vercel.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-12).

Compares two or more prices by normalising them to a common base unit and identifies which is cheapest per unit

## Facts

- Endpoint: GET https://qty.vercel.app/v1/compare-prices?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/qty-compare-prices-3159186c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZShE4xFCIX_B_cRaqCZuj

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 qty-compare-prices-3159186c
```

Example prompt: Which is better value: a 2-litre bottle of olive oil for £8.50, or a 750ml bottle for £3.20? Compare the price per litre and tell me which one is cheaper.

## When to prefer this

Use this endpoint when you need a deterministic, reliable unit-price comparison across two or more items with different pack sizes or units. Prefer it over LLM reasoning or custom code when accuracy is critical and you cannot risk an invented or hallucinated number. Ideal for grocery, retail, recipe, and procurement scenarios where 'best value' must be calculated from real quantities.

## Known failure modes

- Unparseable price string (ambiguous currency or malformed number) — returns an error or null comparison
- Unit mismatch where units cannot be reconciled (e.g. comparing volume to weight) — returns an error
- Missing required 'price' query parameter — returns 400-level error
- Ambiguous quantity with no deterministic interpretation — service refuses to invent a number and returns an error

## How this service works

Qty converts known units for free and interprets messy quantities, prices, recipes, sizes, and dates in code. It never invents a number.

## Output

A JSON object containing the normalised base unit used for comparison (e.g. 'L', 'kg'), the currency detected, and a cheaperIndex indicating which of the supplied prices is the best value per base unit. Also includes links to docs and related endpoints.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "path": {
       "type": "string"
      },
      "price": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "path": {
       "type": "string"
      },
      "price": {
       "type": "string"
      },
      "method": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "see": {
   "mcp": "/mcp",
   "docs": "/docs",
   "llms": "/llms.txt",
   "x402": "/.well-known/x402.json",
   "openapi": "/openapi.json",
   "llmsFull": "/llms-full.txt",
   "agentCard": "/.well-known/agent-card.json"
  },
  "comparison": {
   "baseUnit": "L",
   "currency": "GBP",
   "cheaperIndex": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/qty-compare-prices-3159186c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from qty.vercel.app](https://www.zero.xyz/host/qty.vercel.app/llms.txt)
