# CoCo URL Parser

> CoCo URL Parser is a paid API for AI agents from cocoeatsai.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

Parses a URL string into its constituent components (scheme, host, path, port, query, fragment, tracking params, etc.)

## Facts

- Endpoint: GET https://cocoeatsai.com/area4/agent/tools/url-parse?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coco-url-parser-e9c9926f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__3CaTcOL7oHA9VR8OAPxn

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 coco-url-parser-e9c9926f
```

Example prompt: Can you parse the URL 'https://example.com/products?ref=newsletter&id=42#section2' and tell me its host, path, query parameters, and any tracking params?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call URL parsing utility via the x402 micropayment protocol — ideal for agents that occasionally need to decompose URLs without standing up their own parser, or when you need tracking parameter detection and clean URL extraction in a single call.

## Known failure modes

- Missing or empty 'url' query parameter returns an error or empty result
- Malformed URL that cannot be parsed may return partial or error response
- Very long or deeply encoded URLs may behave unexpectedly
- Non-HTTP URLs (e.g. ftp://, mailto:) may not be fully supported

## How this service works

Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.

## Output

A JSON object containing the parsed URL components: scheme (e.g. 'https'), host, path, port (null if absent), query (object of key-value pairs), fragment, decoded full URL, clean URL with tracking params removed, a list of detected tracking parameters, and a boolean indicating if a username is present in the URL.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ]
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "scheme"
     ],
     "properties": {
      "scheme": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "host": "cocoeatsai.com",
  "path": "/area4/",
  "port": null,
  "query": {},
  "scheme": "https",
  "decoded": "https://cocoeatsai.com/area4/",
  "fragment": "",
  "clean_url": "https://cocoeatsai.com/area4/",
  "tracking_params": [],
  "username_present": false
 },
 "exampleNote": "Computed offline with demonstration inputs; time/random values are illustrative."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coco-url-parser-e9c9926f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cocoeatsai.com](https://www.zero.xyz/host/cocoeatsai.com/llms.txt)
