# AgentResolver URL Parser

> AgentResolver URL Parser is a paid API for AI agents from agentresolver.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-18).

Parses a URL string into its structured components: protocol, hostname, port, pathname, query parameters, and fragment

## Facts

- Endpoint: POST https://agentresolver.vercel.app/api/url-parse
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentresolver-url-parser-55b8c9ae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nW2nXxX5zERUFXNpu8RQj

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 agentresolver-url-parser-55b8c9ae -d '<json body>'
```

Example prompt: Can you parse 'https://example.com:8080/search?q=hello&page=2#results' and tell me the hostname, pathname, and query parameters separately?

## When to prefer this

Use this endpoint when you need a simple, cheap ($0.001 USDC) programmatic decomposition of a URL into its structured parts without writing custom parsing logic. It is best suited for agents that receive arbitrary URL strings and need to extract specific components like query parameters, hostnames, or paths for downstream processing. Prefer this over manual regex parsing or language-level URL parsers when operating in a tool-use context where calling a dedicated service is more reliable.

## Known failure modes

- Malformed or non-URL input returns an error — the url field must be a valid URI string
- Missing required 'url' field in the request body causes a validation error
- Relative URLs without a protocol may fail to parse correctly
- Network or server errors on the AgentResolver platform (5xx responses)

## How this service works

Verify an x402 endpoint before paying: live payTo, USDC quote, network, asset, resource binding, TLS and endpoint safety for $0.001 on Base or Solana.

## Output

Returns a structured JSON object with the full href, origin (scheme + host + port), protocol, hostname, port (null if default), pathname, a key-value map of query parameters, and the fragment/hash (null if absent).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "maxLength": 4096
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentresolver-url-parser-55b8c9ae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentresolver.vercel.app](https://www.zero.xyz/host/agentresolver.vercel.app/llms.txt)
