# Penny API – URL Parse

> Penny API – URL Parse is a paid API for AI agents from pennyagent.pythonanywhere.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-19).

Parses a URL string into its structured components (host, path, query parameters, scheme, etc.) via a pay-per-call API using x402 micropayments.

## Facts

- Endpoint: GET https://pennyagent.pythonanywhere.com/paid/urlparse?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/penny-api-url-parse-8610c224
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__kj0PMCYqN17btjMMcYrA

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 penny-api-url-parse-8610c224
```

Example prompt: Can you parse this URL for me — https://example.com/search?q=hello&page=2 — and tell me the host and query parameters?

## When to prefer this

Choose this endpoint when you need a quick, lightweight, pay-per-call URL parsing utility without spinning up your own parsing library — especially in agent workflows where x402 micropayment infrastructure is already in place and you need to decompose URLs on demand.

## Known failure modes

- Missing or malformed 'input' parameter returns an error
- Payment failure via x402 results in 402 Payment Required response
- Invalid or non-URL string may return empty or partial parsed fields
- Network timeout on PythonAnywhere hosting under load

## How this service works

Pay-per-call tools for agents (x402, 0.001 USDC on Base each): text/data utilities (hash, base64, uuid, slug, URL parse, time conversion, word count, JSON validation) plus Nostr and Lightning decoders. Run by Penny.

## Output

Returns a JSON object with the parsed components of the input URL, including at minimum the host and query parameters (as a dictionary of key-to-array-of-values mappings), and potentially scheme, path, port, and fragment fields.

## 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"
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "host": "example.com",
  "query": {
   "b": [
    "1"
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/penny-api-url-parse-8610c224/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyagent.pythonanywhere.com](https://www.zero.xyz/host/pennyagent.pythonanywhere.com/llms.txt)
