# URL Encode/Decode

> URL Encode/Decode is a paid API for AI agents from conclavex402.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 safe use in URL query strings, paths, or fragments.

## Facts

- Endpoint: POST https://conclavex402.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-64ebedce
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gviE2O033m3RWGsY0YnBX

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-64ebedce -d '<json body>'
```

Example prompt: URL-encode this string for me so I can safely drop it into a query parameter: 'hello world & foo=bar'

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call URL percent-encoding or decoding transformation without setting up a local library or utility function, especially inside an automated agent workflow that already uses x402 micropayments for other data utilities on the same platform.

## Known failure modes

- Missing or malformed 'input' body causes a 400 or validation error
- Passing an already-decoded string to decode mode may return it unchanged or error if invalid percent-sequences are present
- Network or server unavailability returns a non-200 response
- Incorrect bodyType (e.g. sending form-data when json is expected) causes parsing failure

## 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"}, ready to be dropped into a URL or displayed as plain text.

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