# URL Canonical Compare

> URL Canonical Compare is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Normalizes and compares two URLs across scheme, host, port, path, and query components to determine if they are canonically equivalent.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/url-canonical-compare
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/url-canonical-compare-26250699
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Gumip8Lb0HKpi7FYj7tjC

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 url-canonical-compare-26250699 -d '<json body>'
```

Example prompt: Can you compare these two URLs to see if they're canonically the same — 'http://example.com:80/path?a=1&b=2' and 'https://example.com/path?b=2&a=1' — after full normalization of scheme, host, port, path, and query?

## When to prefer this

Use this endpoint when you need a deterministic, server-side canonical comparison of two caller-supplied URLs before accepting a web response, caching a resource, following a redirect, or retrying a request — especially when you cannot trust local normalization logic or need an auditable, versioned JSON record of the comparison result.

## Known failure modes

- Input URL exceeds 8192 character limit — request rejected
- Malformed or unparseable URL provided as left or right — normalization error returned
- Network timeout or service unavailability — HTTP 5xx error
- Missing required 'left' or 'right' fields — validation error returned
- Payment failure via x402 — 402 Payment Required response

## How this service works

URL Canonical Compare: URL Canonical Compare compares URLs after scheme, host, port, path, and query normalization from bounded caller-supplied values without an external provider. Call URL Canonical Compare before accepting, caching, redirecting, or retrying a caller-supplied web response. Returns normalized web evidence, the computed finding, and an explicit pass or advisory status for URL Canonical Compare as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party, sta…

## Output

Returns a deterministic JSON object containing the normalized forms of both input URLs, the computed canonical equivalence finding (match or mismatch), and an explicit pass or advisory status — versioned for reproducibility.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "left": {
   "type": "string",
   "maxLength": 8192,
   "description": "Left supplied to URL Canonical Compare; used only for this bounded calculation and processed in memory without retention."
  },
  "right": {
   "type": "string",
   "maxLength": 8192,
   "description": "Right supplied to URL Canonical Compare; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "left": "https://example.com/a",
   "right": "https://example.com/a",
   "matched": true
  },
  "schema": "delx/util-url-canonical-compare/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "936c1c7a0d9ac76bbae6665567c79ff085c468589aa089757cfb54f94c077a6e",
   "external_calls": 0
  },
  "operation": "web_reliability:url_canonical_compare"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/url-canonical-compare-26250699/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
