# PennyRail URL Parse

> PennyRail URL Parse 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 component parts (protocol, host, path, query, etc.) via a paid micro-API

## Facts

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

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-parse-f77929f7 -d '<json body>'
```

Example prompt: Can you parse this URL for me and tell me the hostname, path, and any query parameters: 'https://example.com/products?id=42&color=blue#reviews'?

## When to prefer this

Choose this endpoint when you need a quick, cheap, programmatic URL decomposition without setting up a local parsing library — especially useful in serverless or agent workflows where you want to offload URL parsing as a micro-service call. Ideal for pipelines that process arbitrary URL strings and need structured component extraction at $0.001 per call.

## Known failure modes

- Invalid or malformed URL string may return an error or null fields
- Empty input string returns an error requiring a non-empty input
- Relative URLs without a protocol may parse with null protocol/host fields
- Network timeout or cold-start latency on Vercel serverless function
- Payment failure (x402) if USDC balance is insufficient

## How this service works

Machine-readable settlement service

## Output

Returns a JSON object containing the parsed components of the input URL, typically including fields such as protocol, slashes, host, hostname, port, pathname, search, query (as key-value pairs), hash, and the original href. The exact shape follows Node.js url.parse conventions.

## 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-parse-f77929f7/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)
