# Agent402 URL Normalizer

> Agent402 URL Normalizer is a paid API for AI agents from agent402.co.uk, paid per call via x402, $0.001/call, status down (last checked 2026-09-15).

Normalizes a URL to its canonical form by lowercasing the host, stripping default ports, and sorting query parameters.

## Facts

- Endpoint: POST https://agent402.co.uk/v1/normalize/url
- Price: $0.001/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-url-normalizer-d15296d6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mMQsLuHMYP-21QeSFLdVj

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 agent402-url-normalizer-d15296d6 -d '<json body>'
```

Example prompt: Can you normalize this URL to its canonical form — lowercase host, strip default ports, sort query params: https://Example.COM:443/path?b=2&a=1

## When to prefer this

Use this endpoint when you need a deterministic, cheap ($0.001) canonical form of a URL — especially for deduplication, cache key generation, or pre-storage normalization. Prefer it over rolling your own normalization logic when you need a consistent, spec-compliant result without implementing URL parsing yourself.

## Known failure modes

- Invalid or malformed URL input returns valid:false with no canonical field
- Missing 'url' field in request body causes a 400-level error
- Non-HTTP/HTTPS schemes may not be supported and could return valid:false
- Extremely long URLs may be rejected

## How this service works

Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.

## Output

A JSON object with a 'valid' boolean indicating whether the input is a well-formed URL, and a 'canonical' string containing the normalized URL with lowercased host, default ports removed, and query parameters sorted alphabetically.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "URL"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "canonical": "https://example.com/path?a=1&b=2"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-url-normalizer-d15296d6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.co.uk](https://www.zero.xyz/host/agent402.co.uk/llms.txt)
