# PennyRail URL Normalize – Canonical URL

> PennyRail URL Normalize – Canonical URL is a paid API for AI agents from pennyrail.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Normalizes a raw URL string into its canonical form, resolving inconsistencies in scheme, casing, trailing slashes, and query parameter ordering.

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/url.normalize--canonical-url
- 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/pennyrail-url-normalize-canonical-url-18621ced
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eFYFv9J6E8WkFjGGKZ9Zi

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 pennyrail-url-normalize-canonical-url-18621ced -d '<json body>'
```

Example prompt: Can you normalize this URL for me — 'HTTP://Example.COM/path/../page?b=2&a=1#section' — and give me back its canonical form?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call URL canonicalization step — especially useful in deduplication pipelines, web crawlers, or data normalization workflows where you need consistent URL comparison without standing up your own normalization logic. At $0.001 USDC per call it is cost-effective for moderate volumes.

## Known failure modes

- Malformed or non-URL input string may return an error or unexpected output
- Relative URLs without a base may not resolve correctly
- Very long URLs may be truncated or rejected
- Ambiguous query parameter encoding edge cases may produce inconsistent results
- Network or cold-start latency on Vercel serverless may cause occasional timeouts

## How this service works

Machine-readable settlement service

## Output

Returns a JSON object containing the canonical (normalized) version of the submitted URL, with scheme lowercased, host lowercased, redundant path segments resolved, query parameters consistently ordered, and other normalization rules applied.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pennyrail-url-normalize-canonical-url-18621ced/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyrail.vercel.app](https://www.zero.xyz/host/pennyrail.vercel.app/llms.txt)
