# PennyRail URL Parser

> PennyRail URL Parser 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).

Parses a URL string into its constituent components (protocol, host, pathname, query, etc.)

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/url.parse--url-components
- 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-parser-9d7579b5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Wjw3SNG4D0qUSrZtmuqgw

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-parser-9d7579b5 -d '<json body>'
```

Example prompt: Can you parse this URL for me — https://example.com:8080/api/v2/users?id=42&active=true#profile — and tell me what the host, path, query params, and hash are?

## When to prefer this

Use this endpoint when you need a quick, paid, machine-readable decomposition of a URL string into structured components without running your own URL-parsing logic. Useful in agent workflows where URL manipulation is needed server-side and the $0.001 per-call cost is acceptable for the convenience of a hosted API.

## Known failure modes

- Malformed or non-URL input string returns an error or empty/null fields
- Missing input field returns a validation error
- Relative URLs without a protocol may parse incorrectly or partially
- Very long URLs may be truncated or cause unexpected behavior
- Payment failure (402) if USDC balance is insufficient

## How this service works

Machine-readable settlement service

## Output

A JSON object containing the parsed components of the input URL, which may include fields such as protocol, host, hostname, port, pathname, search (raw query string), query (parsed key-value pairs), hash, href, and origin.

## 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-parser-9d7579b5/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)
