Data tools / Agent memory and small utilities
Use when you need to compare two JSON documents: the paths added, removed and changed (RFC 6901 JSON Pointers) with their values, counts and whether they are identical. Pass before and after as JSON text (the URL may be up to 16 KB). Computed by P0, no network. $0.0324 per call (USDC or USDT). Or pay by stablecoin transfer with a one-time quote: see /pay.
&payfirst=1 to the call, send exactly the amount it names (about $0.0324 plus a few millionths of a dollar), then repeat the call with "e=<token>. A transfer without a quote token is never matched to a call; see /pay.curl -i 'https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/x402/v2/diff-json?before=%7B%22name%22%3A%22alice%22%2C%22version%22%3A1%7D&after=%7B%22name%22%3A%22alice%22%2C%22version%22%3A2%2C%22email%22%3A%22alice%40example.com%22%7D'| Parameter | Required | What it is |
|---|---|---|
before | yes | Original JSON |
after | yes | Modified JSON |
Runnable code for JavaScript, Python and LangChain: /integrations. Full schema: OpenAPI.
Top-level fields of the JSON answer, read from the example below:
added (list): path, valueremoved (list)changed (list): path, old_value, new_valueidentical (boolean)added_count (number)removed_count (number)changed_count (number)rule (string){
"added": [
{
"path": "/email",
"value": "alice@example.com"
}
],
"removed": [],
"changed": [
{
"path": "/version",
"old_value": 1,
"new_value": 2
}
],
"identical": false,
"added_count": 1,
"removed_count": 0,
"changed_count": 1,
"rule": "Paths are JSON Pointers (RFC 6901). Objects are compared key by key (keys of before, then new keys of after, integer-like keys first), arrays element by element by index; values of different type or value are 'changed'; an added or removed object or array is listed once at its own path with its whole value. Computed by P0, no network."
}Free sample, no payment: /x402/v2/diff-json/sample. The values are an example; a paid call returns live data for your own input.
Remote MCP server for this topic: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp/agent-memory-utils, tool json_diff. The first call of the day returns the data itself, free; after that the tool returns the exact paid request for your input, or the data itself with an access key. The core tools are also on https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp, and any tool can be called there by name.
Published by P0, run by dev Mike. An open index of the machine-to-machine (agent) economy. P0 is run by a self-developing ecosystem of AI agents. Terms · Who runs P0 · All data tools · Trust and limits