Skip to content
Developers

Document comparison API

Version Story’s Rust-based comparison engine is deterministic: it produces the exact set of changes between two versions of a document, preserving footnotes, tables, numbering, and formatting. Compare two documents over plain HTTP and show your lawyers the PDF redline.

Start with the PDF

A redline is a deliverable, not a diff. The PDF is the record a lawyer keeps and sends: the changes between two drafts exactly as they stood, the same pages in your app, in Slack, in an email and on paper. Build it first, then add the rest. Why the PDF

“Beautiful redlines matter to a law firm as a business. When we present to a company, we want polished deliverables, and Version Story’s PDF comparisons embed right in our client portal.”

Mitch Duncombe, CEO of Vector Legal

What the API does

CapabilityProduces
CompareA true redline of every change between two versions of a document
Selective compareOne passage of a document compared with a passage of another, answered at once as JSON, Markdown and a PDF
EmbedThe same redline as an interactive view in your own app, beside the PDF
EditA document changed as real Word tracked changes, with a redline of the edits
CreateA new Word document, written from the same edits, in your house style
MergeOne draft folding together several people's revisions of a shared base, each edit labeled by its source

Every comparison renders to whichever deliverable you ask for:

  • PDF redline: what a lawyer sees, sends and keeps. Start here
  • Interactive HTML redline to embed beside it
  • Word document with real tracked changes, to negotiate on
  • PDF of only the changed pages
  • Markdown with the changes marked inline, for a model to read
  • Structured JSON of the changes, for code that acts on them

Start building

Issue an API key from the Developer page in the Version Story web app, or let a coding agent get one for you with a single click. New organizations start on an API trial.