# URL Encode/Decode

> URL Encode/Decode is a paid API for AI agents from conclavex402p04.pythonanywhere.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-18).

Percent-encodes or percent-decodes a string for use in URL query, path, or fragment components.

## Facts

- Endpoint: POST https://conclavex402p04.pythonanywhere.com/u/urlcode?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/url-encode-decode-4576e407
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HB1aBAW1Y8OY58NpW4u9P

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 url-encode-decode-4576e407 -d '<json body>'
```

Example prompt: URL-encode the string 'hello world & more=1' so I can safely embed it as a query parameter in a URL.

## When to prefer this

Choose this endpoint when an agent needs a reliable, pay-per-call percent-encoding or decoding operation without setting up a local library — especially in sandboxed environments, no-code pipelines, or when normalizing user-supplied strings before constructing URLs dynamically.

## Known failure modes

- Missing or malformed 'input' body returns a 400 or validation error
- Passing a non-string value as the text to encode/decode may cause a schema validation failure
- Ambiguous operation (encode vs decode not specified) may return unexpected output
- Network timeout or server error on pythonanywhere.com returns a 5xx response
- Payment not included or insufficient USDC causes x402 payment-required rejection

## How this service works

URL encode or decode a string (percent-encoding) for query, path or fragment.

## Output

A JSON object containing the encoded or decoded string result, e.g. {"encoded": "hello+world"} or {"decoded": "hello world"}, depending on the operation requested.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "encoded": "a+b"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/url-encode-decode-4576e407/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from conclavex402p04.pythonanywhere.com](https://www.zero.xyz/host/conclavex402p04.pythonanywhere.com/llms.txt)
