Skip to content
Fourohtwo

Differences between two texts

api.sitecheck-api.workers.dev/api/text/diff

Differences between two texts: mode lines, words or chars; the added, removed and unchanged parts with counts, a similarity ratio (2 x unchanged / both texts' units), and a unified diff for lines. Body { a, b, mode }: lines and words up to 50 KB each, chars up to 20 KB each (capped for the Worker's CPU budget). Pure code using the diff package (BSD-3-Clause).

BaseSolanaArcPolygonArbitrumWorld Chain+1Answering
POSThttps://api.sitecheck-api.workers.dev/api/text/diff

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://api.sitecheck-api.workers.dev/api/text/diff", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"a":"one\ntwo\nthree","b":"one\n2\nthree","mode":"lines"}),
});
console.log(await res.json());

Example input

{
  "a": "one\ntwo\nthree",
  "b": "one\n2\nthree",
  "mode": "lines"
}

More from SiteCheckProvider status