# URL Normalizer

> URL Normalizer is a paid API for AI agents from url-text-tools.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-21).

Normalizes a URL for de-duplication by lowercasing scheme/host, dropping default ports, resolving dot segments, and tidying percent-escapes.

## Facts

- Endpoint: GET https://url-text-tools.x402tookit.com/url-normalize?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/url-normalizer-1027cf30
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nDwPFMeGcW73JOtehVkVi

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-normalizer-1027cf30
```

Example prompt: Can you normalize this URL for me so I can deduplicate my list? Here it is: 'HTTP://Example.COM:80/foo/../bar?z=1&a=2#section' — please sort the query parameters and drop the fragment.

## When to prefer this

Choose this endpoint when you need to canonicalize URLs for deduplication, comparison, or storage — especially when your URLs may differ only in scheme case, host case, default port presence, dot segments, or percent-encoding style. Prefer it over manual string manipulation when you need documented, RFC-compliant normalization with an audit trail of exactly what changed and why.

## Known failure modes

- Missing or malformed 'url' query parameter returns an error
- Non-absolute URL (relative URL) may return an error or unexpected result
- Unsupported URL schemes may not normalize correctly
- Network or service errors returning 4xx/5xx HTTP responses
- Malformed percent-encoding in input may cause parse failures

## How this service works

Normalize a URL for de-duplication: lowercase scheme/host, drop default port, resolve dot segments, tidy %-escapes.

## Output

Returns the normalized URL alongside the original input, a count of how many changes were made, a list of reasons describing each normalization applied, a plain-English summary, a verdict, and any disclaimer about limitations. Also includes an 'asOf' timestamp and a 'degraded' flag if the service is running in a reduced-quality mode.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "Absolute URL to normalize"
      },
      "sortQuery": {
       "type": "string",
       "description": "true to sort query parameters (default false; order can matter to a server)"
      },
      "dropFragment": {
       "type": "string",
       "description": "true to remove the #fragment (default false)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "input": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "changes": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "normalized": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/url-normalizer-1027cf30/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from url-text-tools.x402tookit.com](https://www.zero.xyz/host/url-text-tools.x402tookit.com/llms.txt)
