Diff API

Two strings in, structured diff out. Text mode returns a line-level unified patch plus added/removed/changed counts. JSON mode returns a path-aware deep diff. Auto mode picks JSON when both inputs parse cleanly, text otherwise.

A (before)

B (after)

Edit either side — diff updates automatically.

Use cases

Changelog generationDiff a config file or schema across two releases — render the structured output straight into release notes.
Audit-log reviewCompare a redacted document to the original; flag every PII span that escaped redaction by its JSON path.
Test snapshot reviewOne CI step compares yesterday’s golden snapshot to today’s; reviewers see only the changed paths, not 5,000 lines of context.
Config driftPeriodically diff prod config against the source-of-truth in git. Path-aware output makes it trivial to alert on the keys that matter.

Use it from your code

curl -X POST https://kiprio.com/v1/diff \
  -H "X-API-Key: $WORKSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":"hello world","b":"hello, world","mode":"text"}'

# JSON deep diff
curl -X POST https://kiprio.com/v1/diff \
  -H "X-API-Key: $WORKSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":"{\"plan\":\"free\"}","b":"{\"plan\":\"pro\"}","mode":"json"}'

Why use this?

One endpoint, three modesText, JSON, or auto. Stop maintaining a regex-soup wrapper around diff and a separate JSON differ.
Path-aware JSONEach change carries a $.users[0].email-style path, not a flattened key list.
Privacy by defaultInputs are processed in memory and discarded after the response. No retention on Free, audit log opt-in on Pro+.
DeterministicSame input → same output. Pure stdlib pipeline. Typical 5KB diff in <10ms.

Pricing

Free

$0
  • 200 req/day
  • 50k chars/req
  • Text + JSON + auto modes
  • No retention

Pro

$9 /mo
  • 100k req/month
  • 500k chars/req
  • Audit log 30 days
  • Priority queue

Business

$49 /mo
  • 1M req/month
  • 2M chars/req
  • Custom output format
  • SLA on request

FAQ

Does it return a unified patch I can pipe to patch(1)?

Yes — in text mode the response includes unified_patch, the standard --- a / +++ b format with configurable context lines (0–20).

How does JSON mode handle arrays?

Element-by-element, with index in the path. Extra elements at the end appear as added; missing ones as removed. We don’t attempt longest-common-subsequence on arrays — it’s deterministic and fast, which matters in CI.

What does auto mode actually do?

It tries to json.loads both inputs. If both succeed, you get a JSON deep diff. If either fails, you get a text diff. The response includes auto_resolved_to: "json" or "text" so you know which path ran.

Are inputs stored?

No retention on Free. Pro and Business include opt-in audit logging (30 days) for compliance reviews. We never log the diff content itself unless audit is on.

Rate limits when I exceed quota?

HTTP 429 with a Retry-After header. Daily quotas reset on a rolling 24-hour window, not midnight UTC.

Get an API key View health endpoint →

Built by kiprio.com · Free demo capped at 4,000 chars and 20 requests / minute / IP.