# AgentTools URL Parser

> AgentTools URL Parser is a paid API for AI agents from agenttools-hub.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Parses any URL into its constituent components: protocol, hostname, port, path segments, query parameters, hash, and credentials.

## Facts

- Endpoint: GET https://agenttools-hub.vercel.app/api/v1/dev/url-parser?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agenttools-url-parser-cedea88f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NxkjWBP7guLheYe7a3OJn

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 agenttools-url-parser-cedea88f
```

Example prompt: Can you parse this URL for me and break it down into all its parts — protocol, hostname, port, path, query parameters, and hash? The URL is: https://example.com:8080/api/v2/search?q=hello+world&page=2#results

## When to prefer this

Use this endpoint when an agent needs a deterministic, programmatic breakdown of any URL into its components without manual string manipulation or regex. Ideal when you need query parameters as a clean key-value object, need to extract the hostname for routing logic, or must validate URL structure before making downstream HTTP calls.

## Known failure modes

- Malformed or invalid URL string returns an error or empty fields
- Missing required 'url' query parameter returns a 400-level error
- Relative URLs without a protocol may fail to parse correctly
- URLs with unusual encoding or non-standard schemes may produce partial results

## How this service works

Parse a URL into all its components: protocol, hostname, port, path segments, query parameters (as a clean object), hash and credentials. Exact — no guessing by eye. Use this when an agent needs to break any URL into protocol, host, path and params.

## Output

Returns a structured object with all URL components: protocol (e.g. 'https'), hostname, port (if specified), path segments as an array, query parameters as a clean key-value object, hash/fragment, and any embedded credentials — no ambiguity, exact parsing.

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "URL"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

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