> ## Documentation Index
> Fetch the complete documentation index at: https://developers.myhero.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Compare document version

> What changed in a document since a saved version, or between two versions (withVersionId): the passages added, removed and changed, in document order…

`compare_document_version`

What changed in a document since a saved version, or between two versions (withVersionId): the passages added, removed and changed, in document order, each as read\_document\_text shows it, with the clause or heading it falls under (`section`). A long passage that changed is shown around the change. Renumbering alone is no change. `summary` counts them all; `changes` is paged: while page.nextOffset is present, pass it as offset.

## Parameters

**documentId** `string` *required*

The HERO document.

**versionId** `string` *required*

The version, from list\_document\_versions.

**withVersionId** `string`

Another version to compare with, instead of the document as it is now.

**offset** `integer`

Where to start. Pass the previous result's page.nextOffset. Minimum: 0.

**limit** `integer`

How many to return at most; the result may hold fewer to fit. Minimum: 1.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.