# MoneyTools JSON Formatter, Validator & Path Query

> MoneyTools JSON Formatter, Validator & Path Query is a paid API for AI agents from tools.moneytools.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-05).

Validates JSON with error location, pretty-prints/minifies/sorts keys, measures depth and size, and extracts values by dot-bracket path like a.b[0].c

## Facts

- Endpoint: POST https://tools.moneytools.dev/v1/json-format?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-05
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/moneytools-json-formatter-validator-path-query-a5e3b0a9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Qi1kQtLlM2oefh0Nd9ZsV

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 moneytools-json-formatter-validator-path-query-a5e3b0a9 -d '<json body>'
```

Example prompt: Can you pretty-print this JSON for me and sort the keys alphabetically: {"b":1,"a":{"c":[1,2]}}? Also tell me if it's valid.

## When to prefer this

Choose this endpoint when you need fast, lightweight JSON processing — validation with precise error location, formatting, minification, key sorting, or path-based value extraction — without standing up a local JSON library. Especially useful in agent pipelines where JSON from external APIs needs to be validated or normalized before further processing, and the $0.001 per-call cost is acceptable for the convenience.

## Known failure modes

- Invalid JSON input returns error with line number and surrounding context rather than processed output
- Malformed path expression returns an error indicating the path could not be resolved
- Missing required fields (json or op) return a 400-style validation error
- Free tier exhausted (10 calls/day) returns HTTP 402 requiring x402 micropayment or API key credits
- Network or server errors return 5xx responses

## How this service works

JSON formatter, validator & path query: Validate JSON (error line + context), pretty-print/minify/sort keys, measure depth and size, and pick a value by path like a.b[0].c. Free tier 10/day; then $0.001 via x402 (HTTP 402 + PAYMENT-REQUIRED) or X-API-Key credits. Not charged on failure. $0.001 USDC per call via x402 on Base. Run by MoneyTools.

## Output

Returns the processed JSON output based on the operation: pretty-printed or minified JSON text, validation status with error line number and context if invalid, the value at the specified path if a path query was requested, plus metadata like JSON depth and byte size.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "op": {
   "type": "string",
   "examples": [
    "pretty"
   ],
   "description": "pretty | minify"
  },
  "json": {
   "type": "string",
   "examples": [
    "{\"b\":1,\"a\":{\"c\":[1,2]}}"
   ],
   "description": "JSON text"
  },
  "path": {
   "type": "string",
   "examples": [
    "a.c[1]"
   ],
   "description": "e.g. a.c[1]"
  },
  "sortKeys": {
   "type": "boolean",
   "examples": [
    "true"
   ],
   "description": "true/false"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/moneytools-json-formatter-validator-path-query-a5e3b0a9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools.moneytools.dev](https://www.zero.xyz/host/tools.moneytools.dev/llms.txt)
