# URL Parser (httpay.xyz)

> URL Parser (httpay.xyz) is a paid API for AI agents from httpay.xyz, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Parses any URL into its structured components including protocol, host, pathname, search params, and hash using Node.js built-in URL class

## Facts

- Endpoint: POST https://httpay.xyz/api/url-parse
- 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/httpay-xyz-d8f4cc17
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EFXIQyK0R5KwaJhsivkhQ

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 httpay-xyz-d8f4cc17 -d '<json body>'
```

Example prompt: Can you parse this URL for me and show me the individual parts — protocol, hostname, pathname, search params, and hash: https://example.com/search?q=hello+world&page=2#results

## When to prefer this

Use this endpoint when you need a zero-dependency, lightweight URL decomposition tool that follows the WHATWG URL standard via Node.js. Prefer this over manual regex parsing or heavier libraries when you simply need clean, structured access to a URL's protocol, host, path, query, and hash in a single API call.

## Known failure modes

- Missing or malformed URL input returns an error indicating invalid URL
- URL not properly encoded in the query parameter may cause parse failures
- Relative URLs without a base may fail to parse correctly
- Network timeout if the service is temporarily unavailable

## How this service works

Parse any URL into its components: protocol, host, pathname, search params, hash, and more. Pass ?url=<encoded-url>. Uses Node.js built-in URL class. Zero external dependencies.

## Output

A structured breakdown of the input URL including protocol (e.g. 'https:'), host (e.g. 'example.com'), pathname (e.g. '/search'), search params as key-value pairs (e.g. {q: 'hello world', page: '2'}), hash fragment (e.g. '#results'), and other standard URL components as exposed by the Node.js URL class.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "description": "Parse any URL into its components: protocol, host, pathname, search params, hash, and more. Pass ?url=<encoded-url>. Uses Node.js built-in URL class. Zero external dependencies."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/httpay-xyz-d8f4cc17/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from httpay.xyz](https://www.zero.xyz/host/httpay.xyz/llms.txt)
