# Data Toolkit – JSON Document Merge

> Data Toolkit – JSON Document Merge is a paid API for AI agents from data.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-15).

Deep-merges two or more JSON documents into one, with later documents overriding earlier ones

## Facts

- Endpoint: POST https://data.openverbs.com/v1/merge
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/data-toolkit-json-document-merge-0da91384
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eBT2dNov_e4zgchfcpc1N

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 data-toolkit-json-document-merge-0da91384 -d '<json body>'
```

Example prompt: Merge these two JSON configs where the second one takes priority over the first: {"theme": "light", "fontSize": 14, "lang": "en"} and {"theme": "dark", "notifications": true}

## When to prefer this

Use this endpoint when you need a reliable, hosted deep-merge of JSON documents with clear precedence ordering and don't want to implement custom merge logic yourself. It is especially useful for layered configuration management (defaults → environment → user overrides) or combining partial API responses. Prefer it over custom in-code merge when working in an agent pipeline where an external stateless call is safer than executing arbitrary merge code.

## Known failure modes

- Fewer than 2 documents provided — API requires minItems: 2 in the documents array
- Invalid or non-JSON values passed as documents — items must be valid JSON values
- Malformed request body — bodyType must be 'json', 'form-data', or 'text'
- Network or payment failure (x402 protocol) — insufficient USDC balance or payment not accepted

## How this service works

Deep-merge an ordered list of JSON documents, left to right. Objects are merged key-by-key; arrays, scalars and null in a later document replace the earlier value (last-wins, no array concatenation).

## Output

A single merged JSON document combining all input documents, where later documents in the array override earlier ones for any conflicting keys (last-write-wins semantics for deep merge)

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "documents"
     ],
     "properties": {
      "documents": {
       "type": "array",
       "items": {
        "description": "Any JSON value (object, array, string, number, boolean or null)."
       },
       "minItems": 2,
       "description": "The documents to merge, in precedence order (later wins)."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/data-toolkit-json-document-merge-0da91384/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from data.openverbs.com](https://www.zero.xyz/host/data.openverbs.com/llms.txt)
