# ProfitCollector URL Parser

> ProfitCollector URL Parser is a paid API for AI agents from api.bakhour.ca, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Parses a URL string into its constituent components (scheme, hostname, path, port, query, fragment, username presence)

## Facts

- Endpoint: GET https://api.bakhour.ca/url/parse
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/profitcollector-url-parser-ed28195f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MnHy4zp8rbL-9ICSilgli

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 profitcollector-url-parser-ed28195f
```

Example prompt: Can you break down the URL 'https://user@example.com:8080/search?q=hello#results' into its parts — give me the scheme, hostname, port, path, query string, fragment, and whether a username is present?

## When to prefer this

Use this endpoint when you need a deterministic, paid, agent-friendly URL parser that returns structured JSON components without requiring you to run custom string parsing logic. Ideal for automated workflows needing reliable decomposition of URLs into scheme, host, path, query, and fragment fields.

## Known failure modes

- Missing or malformed 'url' query parameter returns an error
- Non-HTTP/HTTPS URL schemes may behave unexpectedly
- Payment not included or rejected results in 402 response
- Relative URLs without a scheme may fail to parse correctly

## How this service works

Decision-grade security/due-diligence outcome reports ($20-$100) plus deterministic paid utilities ($0.001+) for software agents and automated workflows.

## Output

A JSON object containing: scheme (e.g. 'https'), hostname (e.g. 'example.com'), path (e.g. '/path'), port (number or null), query (e.g. 'q=1'), fragment (e.g. ''), and username_present (boolean).

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/path",
  "port": null,
  "query": "q=1",
  "scheme": "https",
  "fragment": "",
  "hostname": "example.com",
  "username_present": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/profitcollector-url-parser-ed28195f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.bakhour.ca](https://www.zero.xyz/host/api.bakhour.ca/llms.txt)
