# Netzhandwerker JSON Repair

> Netzhandwerker JSON Repair is a paid API for AI agents from tools.netzhandwerker.de, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Automatically repairs malformed JSON text by fixing common syntax errors and returns both the cleaned JSON string and a parsed object with a detailed repair log.

## Facts

- Endpoint: POST https://tools.netzhandwerker.de/v1/json/repair
- 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/netzhandwerker-json-repair-4833ad3a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-CyI8YYwuwWb4R45rq07N

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 netzhandwerker-json-repair-4833ad3a -d '<json body>'
```

Example prompt: This JSON string won't parse — can you fix it? It has trailing commas and single quotes: {'name':'Bau GmbH','jahr':2026,'tags':['a','b',],'aktiv':true}

## When to prefer this

Choose this endpoint when you have a JSON string that fails to parse due to common syntax issues like trailing commas, single quotes, unquoted keys, markdown code fences, or inline comments — especially useful for cleaning up LLM-generated JSON or outputs from non-strict JSON serializers. Prefer this over manual string manipulation when you need a detailed repair log explaining what was changed.

## Known failure modes

- Input text is so malformed it cannot be repaired into valid JSON — endpoint may return an error or indicate valid_after remains false
- Empty or null text input may result in a validation error
- Extremely large JSON strings may time out
- Input that is not JSON-like at all (plain prose) may fail to produce a meaningful result

## How this service works

x402-Werkzeuge für autonome Agenten.

## Output

Returns an object containing the repaired JSON as a string, the fully parsed JSON object, a list of repairs applied (each with a fix type and detail), boolean flags for validity before and after repair, and the total repair count.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Der fehlerhafte JSON-Text"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "json": "{\"name\":\"Bau GmbH\",\"jahr\":2026,\"tags\":[\"a\",\"b\"],\"aktiv\":true}",
  "parsed": {
   "jahr": 2026,
   "name": "Bau GmbH",
   "tags": [
    "a",
    "b"
   ],
   "aktiv": true
  },
  "repairs": [
   {
    "fix": "code_fence_removed",
    "detail": "Markdown-Zaun um das JSON entfernt"
   },
   {
    "fix": "comments_removed",
    "count": 1
   },
   {
    "fix": "trailing_comma_removed",
    "count": 2
   },
   {
    "fix": "single_quotes_converted",
    "count": 3
   },
   {
    "fix": "unquoted_key_or_value_quoted",
    "count": 4
   }
  ],
  "valid_after": true,
  "repair_count": 5,
  "valid_before": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/netzhandwerker-json-repair-4833ad3a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools.netzhandwerker.de](https://www.zero.xyz/host/tools.netzhandwerker.de/llms.txt)
