# Mat Web & Data Toolkit – Text Encoder

> Mat Web & Data Toolkit – Text Encoder is a paid API for AI agents from automatom.matt-d59.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-18).

Encodes a text string into multiple formats (hex, URL-encoding, HTML entities, base64, base64url) and returns all results as JSON.

## Facts

- Endpoint: GET https://automatom.matt-d59.workers.dev/encode?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mat-web-data-toolkit-text-encoder-0424c2e8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uFj2c_u-L3oqGXtut8oDJ

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 mat-web-data-toolkit-text-encoder-0424c2e8
```

Example prompt: Can you encode the text 'hello world' into base64, hex, and URL-safe formats all at once?

## When to prefer this

Choose this endpoint when you need a single call to get multiple common text encodings simultaneously (hex, URL, HTML, base64, base64url) without running separate encoding libraries. Ideal for lightweight agent workflows where installing or calling separate encoding utilities is impractical, or when you need a quick, consistent encoding reference across formats in one JSON response.

## Known failure modes

- Missing required 'text' query parameter returns an error
- Non-GET HTTP methods may return 405
- Payment not provided or insufficient USDC results in 402 Payment Required
- Very long text strings may hit Cloudflare Worker size or timeout limits
- Invalid 'op' parameter value may produce unexpected or empty results

## How this service works

Fetches a public web page and returns its title, meta description, outbound links and readable plain text as JSON.

## Output

A JSON object with an 'op' field set to 'encode' and a 'results' object containing the input text rendered in five formats: hex (e.g. '68656c6c6f'), url (percent-encoded), html (HTML entity encoded), base64 (standard), and base64url (URL-safe base64 without padding).

## 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": [
      "text"
     ],
     "properties": {
      "op": {
       "type": "string"
      },
      "text": {
       "type": "string"
      },
      "format": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "op": "encode",
  "results": {
   "hex": "68656c6c6f20776f726c64",
   "url": "hello%20world",
   "html": "hello world",
   "base64": "aGVsbG8gd29ybGQ=",
   "base64url": "aGVsbG8gd29ybGQ"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mat-web-data-toolkit-text-encoder-0424c2e8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from automatom.matt-d59.workers.dev](https://www.zero.xyz/host/automatom.matt-d59.workers.dev/llms.txt)
