# apiacre.com Structured JSON/YAML Diff

> apiacre.com Structured JSON/YAML Diff is a paid API for AI agents from apiacre.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Produces path-level semantic differences between two JSON or YAML documents, identifying additions, removals, and modifications by field path.

## Facts

- Endpoint: POST https://apiacre.com/v1/developer/structured-diff
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/apiacre-com-structured-json-yaml-diff-c2ee5279
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gwgS4jjkwAaAel1lOa-Y6

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 apiacre-com-structured-json-yaml-diff-c2ee5279 -d '<json body>'
```

Example prompt: Compare these two JSON documents and show me the path-level changes — what was added, removed, or modified between them.

## When to prefer this

Choose this endpoint when you need semantic, path-aware diffing of structured data (JSON or YAML) rather than line-by-line text diffing. It is ideal for comparing API payloads, configuration files, or schema versions where you care about which logical fields changed, not just which lines differ. Prefer it over a generic text diff endpoint when the documents are structured and you need machine-readable change records keyed by field path.

## Known failure modes

- Malformed JSON or YAML input returns a parse error
- Passing two identical documents returns an empty diff with no changes
- Extremely large documents may exceed payload size limits
- Mixing incompatible formats (e.g. one JSON, one plain text) may return a format error
- Missing required input fields (original or modified document) returns a 400 validation error

## How this service works

Compare JSON or YAML deterministically and return source hashes plus machine-readable additions, removals, and replacements by path with explicit truncation evidence.

## Output

A structured list of path-level changes between the two input documents, where each change entry includes the JSON or YAML path (e.g. '/user/address/city'), the type of change (addition, removal, or modification), and the before/after values where applicable.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "after": {
   "type": "string"
  },
  "before": {
   "type": "string"
  },
  "format": {
   "enum": [
    "json",
    "yaml"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "format": "json",
   "changed": true,
   "changes": [
    {
     "op": "replace",
     "path": "$.features.export",
     "after": true,
     "before": false
    }
   ],
   "afterSha256": "1491b575597fbdbb636572aa4cf9ac93e424273a4aa920242398844866dd2a0f",
   "changeCount": 2,
   "beforeSha256": "242eb38c815b9bab51819f9aa7ebd832666455dbfce03671aae54cc93abafcdb",
   "changesReturned": 2,
   "changesTruncated": false
  },
  "meta": {
   "cached": false,
   "sources": [],
   "warnings": [],
   "duration_ms": 42,
   "next_actions": []
  },
  "service": "developer.structured-diff",
  "version": "1",
  "request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apiacre-com-structured-json-yaml-diff-c2ee5279/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from apiacre.com](https://www.zero.xyz/host/apiacre.com/llms.txt)
