# x402 URL Parser

> x402 URL Parser is a paid API for AI agents from x402-utils.558686.xyz, paid per call via x402, $0.0001/call, status unknown (last checked 2026-10-20).

Parses a URL string into structured components including protocol, host, pathname, query parameters, and origin

## Facts

- Endpoint: POST https://x402-utils.558686.xyz/v1/tools/url-parse?utm_source=zero.xyz
- Price: $0.0001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-url-parser-2c1496de
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JLfONw0L9NzY_JSb7xcra

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 x402-url-parser-2c1496de -d '<json body>'
```

Example prompt: Can you parse this URL for me — https://example.com/products?category=shoes&size=10 — and break it down into its protocol, host, pathname, and query parts?

## When to prefer this

Use this endpoint when you need to programmatically decompose a URL into its structural components and get deterministic JSON output. Prefer this over manual string splitting or regex when you need reliable, structured parsing of protocol, host, path, query, and origin fields in a single call.

## Known failure modes

- Invalid or malformed URL input returns an error response
- Missing required 'url' field in request body returns validation error
- Non-string URL value causes schema validation failure
- Relative URLs without a host may return incomplete components

## How this service works

A compact x402 utility surface for agents that need cheap, repeatable non-LLM transformations before spending on heavier routes: CSV cleanup, JSON Schema checks, timestamp conversion, JWT decode, URL normalization, hashes, codecs, and text utilities.

## Output

Returns a deterministic JSON object containing structured URL components: protocol (e.g. 'https:'), host (e.g. 'example.com'), pathname (e.g. '/products'), query string, and origin (e.g. 'https://example.com')

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "url-parse",
  "input": {
   "url": "https://x402-utils.558686.xyz/v1/tools/hash-text?algorithm=sha256"
  },
  "route": "/v1/tools/url-parse",
  "result": {
   "host": "host_example",
   "href": "href_example",
   "query": {},
   "pathname": "pathname_example"
  },
  "project": "x402-utility-tools",
  "deterministic": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-url-parser-2c1496de/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-utils.558686.xyz](https://www.zero.xyz/host/x402-utils.558686.xyz/llms.txt)
