# Penniless Data Utilities – Text Diff

> Penniless Data Utilities – Text Diff is a paid API for AI agents from penniless-json-repair.sjaman.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Computes a unified line-level diff between two text inputs, returning added/removed line counts and a unified diff string

## Facts

- Endpoint: POST https://penniless-json-repair.sjaman.workers.dev/diff
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/penniless-data-utilities-text-diff-904a7781
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MfVj70dbGaZVs_2VlaiPT

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 penniless-data-utilities-text-diff-904a7781 -d '<json body>'
```

Example prompt: Can you diff these two versions of my config file and show me exactly which lines were added or removed in unified diff format? Original: 'a\nb\nc' and updated: 'a\nB\nc'

## When to prefer this

Choose this endpoint when you need a deterministic, low-cost ($0.001 USDC) line-level diff with no LLM involvement — ideal for comparing config files, code snippets, prompt templates, or any plain text where you want an exact unified diff output. Prefer it over AI-based summarization when you need a precise machine-readable patch format rather than a natural language summary of changes.

## Known failure modes

- Missing required body fields returns an error with ok: false
- Non-text or unparseable body content may result in a processing error
- Insufficient USDC balance or failed x402 micropayment causes a 402 Payment Required response before the computation runs
- Very large inputs may be truncated or timeout at the edge worker

## How this service works

Deterministic, dependency-free data utilities served over x402 micropayments (USDC on Base). None of these call another AI model.
Keyword: JSON repair
Keyword: malformed JSON
Keyword: broken JSON from LLM
Keyword: fix JSON output
Keyword: JSON sanitizer
Keyword: truncated JSON recovery
Keyword: YAML to JSON
Keyword: convert YAML
Keyword: parse YAML config
Keyword: cron next run
Keyword: cron parser
Keyword: when does cron run next
Keyword: unified diff
Keyword: line diff
Keyword: text diff
Keyword: HTML to text
Keyword: extract links
Keyword: extract emails
Keyword: scrape text
Keyword: whois lookup
Keyword: domain registration
Keyword: registrar
Keyword: domain expiry date
Keyword: RDAP
Keyword: dns lookup
Keyword: MX records
Keyword: TXT records
Keyword: A record
Keyword: DNS over HTTPS
Keyword: github repo stats
Keyword: github stars
Keyword: repository popularity
Keyword: OSS project metadata
Keyword: email validation
Keyword: verify email address
Keyword: check MX deliverability
Keyword: email syntax
Use case: repair a JSON code block wrapped in Markdown fences
Use case: turn a docker-compose or CI YAML file into JSON
Use case: compute the next UTC fire time of a cron expression
Use case: produce a unified diff between two versions of a file
Use case: strip HTML tags and pull out links, emails, and headings
Use case: look up a domain's registrar, status and expiry before purchase
Use case: check when a domain registration lapses
Use case: resolve A, AAAA, MX, TXT or NS records for a hostname
Use case: find a domain's mail servers and SPF TXT record
Use case: compare GitHub repository stars, forks and activity for market research
Use case: check whether an email address is well-formed and its domain accepts mail

## Output

Returns a JSON object with: ok (boolean success flag), added (count of added lines), removed (count of removed lines), unified (the full unified diff string with @@ hunks), and identical (boolean indicating whether the two inputs were the same)

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "old": {
       "type": "string",
       "description": "Original text"
      },
      "new": {
       "type": "string",
       "description": "Changed text"
      },
      "context": {
       "type": "number",
       "description": "Context lines per hunk (default 3)"
      }
     },
     "required": [
      "old",
      "new"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "added": 1,
  "removed": 1,
  "unified": "@@ -1,3 +1,3 @@\n a\n-b\n+B\n c",
  "identical": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/penniless-data-utilities-text-diff-904a7781/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from penniless-json-repair.sjaman.workers.dev](https://www.zero.xyz/host/penniless-json-repair.sjaman.workers.dev/llms.txt)
