# AgentTools URL Parser

> AgentTools URL Parser is a paid API for AI agents from agentstoolshub.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-12).

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

## Facts

- Endpoint: GET https://agentstoolshub.com/api/v1/dev/url-parser?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agenttools-url-parser-91d9e87e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2ojEp0ofz8l780tQFBX2Y

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-91d9e87e
```

Example prompt: Can you break apart this URL for me — https://user:pass@api.example.com:8080/v2/users?sort=asc&page=2#results — and tell me the protocol, hostname, port, path, query params, and hash?

## When to prefer this

Use this endpoint when an agent needs a precise, programmatic decomposition of any URL without manual string splitting or regex. Ideal when downstream logic depends on individual URL components (e.g. routing on hostname, iterating path segments, reading specific query params) and correctness is critical over guessing by eye.

## Known failure modes

- Malformed or non-URL string passed — likely returns an error or empty/null fields
- Missing required 'url' query parameter — returns a validation error
- Relative URLs without a scheme may not parse correctly
- URLs with unusual encoding may produce unexpected segment splits

## 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

A structured object containing all parsed URL components: protocol/scheme, hostname, port, full path broken into segments, query parameters as a clean key-value object, hash/fragment, and any embedded credentials (username/password).

## 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-91d9e87e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentstoolshub.com](https://www.zero.xyz/host/agentstoolshub.com/llms.txt)
