Compute the diff between two texts (a → b) — no git needed
Compute the diff between two texts (a → b) — no git needed. Returns a standard unified patch (line-oriented in both modes, applies with git apply or patch), added/removed counts, and in word mode a token-level change list for inline highlighting (capped at 20…
by 402utils.com · discovered, not yet claimed by its owner · updated 2026-09-18
Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.
What it does
Compute the diff between two texts (a → b) — no git needed. Returns a standard unified patch (line-oriented in both modes, applies with git apply or patch), added/removed counts, and in word mode a token-level change list for inline highlighting (capped at 2000 entries). CRLF line endings and missing trailing newlines are preserved byte-exactly. Caps: 1 MB UTF-8 per input; pathologically divergent inputs return 422 diff_too_complex.
Tags: bazaar
Use with an agent
- Discover. Agents find this listing with
GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP toolsearch_resources, or/discovery/resources. - Inspect. Fetch
/resources/5903.jsonfor the price and payment options. - Pay. Call
GET https://402utils.com/v1/diff. The provider answers402with its payment requirements. An x402 client signs one of the options below and retries withPAYMENT-SIGNATURE. - Execute. The provider returns
200with the data. Agent Bazaar is not in the request path and never sees your payment.
For humans
You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.
Pricing & payment
- Price
- $0.002 / request
- Protocol
- x402 v2
- Auth
- No account or API key. Pay per request.
- Networks
- Base
- Uptime
- 0 of the last 1 checks answered
- Calls (30d)
- 1 · 1 unique payers (third-party data from the public x402 Bazaar)
x402 payment requirements
| Scheme | Network | Asset | Amount | Pay to | Timeout |
|---|---|---|---|---|---|
| exact | Base eip155:8453 | USDC | $0.002 | 0xc55A2D530b53CBaD1001e4AfD4720B7E71f9C291 | 60s |
accepts[] (raw JSON)
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0xc55A2D530b53CBaD1001e4AfD4720B7E71f9C291",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "2000",
"amountUsd": 0.002,
"maxTimeoutSeconds": 60
}
]Schemas
Output schema (JSON Schema)
{
"bazaar": {
"info": {
"input": {
"body": {
"a": "name: farm\nprice: 1 USDC\n",
"b": "name: farm\nprice: 2 USDC\n"
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"identical": false,
"mode": "line",
"patch": "===================================================================\n--- a\n+++ b\n@@ -1,2 +1,2 @@\n name: farm\n-price: 1 USDC\n+price: 2 USDC\n",
"stats": {
"added": 1,
"removed": 1
}
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"description": "Two texts to compare, byte-exactly (no line-ending normalization).",
"properties": {
"a": {
"description": "Original text. Max 1 MB UTF-8.",
"type": "string"
},
"b": {
"description": "New text. Max 1 MB UTF-8.",
"type": "string"
},
"context": {
"description": "Unchanged context lines around each patch hunk. Default 3.",
"maximum": 10,
"minimum": 0,
"type": "integer"
},
"mode": {
"description": "Granularity of stats/changes. The patch is always a line-oriented unified diff. Default \"line\".",
"enum": [
"line",
"word"
],
"type": "string"
}
},
"required": [
"a",
"b"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"description": "Unified patch plus change statistics.",
"properties": {
"changes": {
"description": "Word mode only (omitted when identical): token runs in order, capped at 2000 entries. Unchanged runs have added=removed=false.",
"items": {
"properties": {
"added": {
"type": "boolean"
},
"removed": {
"type": "boolean"
},
"value": {
"description": "Text of the run.",
"type": "string"
}
},
"required": [
"value",
"added",
"removed"
],
"type": "object"
},
"type": "array"
},
"identical": {
"description": "True when a and b are identical; patch is then empty.",
"type": "boolean"
},
"mode": {
"description": "Echo of the requested mode.",
"enum": [
"line",
"word"
],
"type": "string"
},
"patch": {
"description": "Unified diff patch (--- a / +++ b headers). Line-oriented in both modes; empty when identical.",
"type": "string"
},
"stats": {
"description": "Counts in lines (mode line) or words (mode word).",
"properties": {
"added": {
"description": "Lines/words added in b.",
"type": "integer"
},
"removed": {
"description": "Lines/words removed from a.",
"type": "integer"
}
},
"required": [
"added",
"removed"
],
"type": "object"
},
"truncated": {
"description": "Word mode only: true when `changes` was capped at 2000 entries.",
"type": "boolean"
}
},
"required": [
"identical",
"patch",
"stats",
"mode"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
}
}Example shape — generated from the schema, not a captured live response
nullExamples
curl "https://402utils.com/v1/diff"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paidconst res = await fetch("https://402utils.com/v1/diff");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}import httpx
res = httpx.get("https://402utils.com/v1/diff")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerDetails
- Provider
- 402utils.com
- Endpoint
- https://402utils.com/v1/diff
- Machine-readable
/resources/5903.json