Document Compare: Find Changes Between Two PDF or Word Files avatar

Document Compare: Find Changes Between Two PDF or Word Files

Pricing

from $12.50 / 1,000 document pair compareds

Go to Apify Store
Document Compare: Find Changes Between Two PDF or Word Files

Document Compare: Find Changes Between Two PDF or Word Files

Compare two versions of a PDF or Word (DOCX) file from their links. Get every inserted, deleted and changed paragraph and table row, a similarity score and a redline file with tracked changes. USD 0.0125 per comparison.

Pricing

from $12.50 / 1,000 document pair compareds

Rating

0.0

(0)

Developer

Tanod Labs

Tanod Labs

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

New to Apify? Create an account (affiliate link).

Give it the links to two versions of a document, an older one and a newer one. The actor lists what changed from the first to the second: inserted, deleted and modified paragraphs and table rows, with their place and their text before and after, a word-level diff of every modified block, counts, a similarity percentage and, if you want it, a redline file (a Word file with tracked changes, or a PDF with insertions in green and deletions in red). You get one result row per comparison.

Use it to check a contract draft against the last one, see what a supplier changed in a terms document, review a revised policy or report, or keep a record of how a file changed between two dates. Both files can be PDF or DOCX, in any mix.

Input

{
"originalUrl": "https://example.com/contract-v1.pdf",
"revisedUrl": "https://example.com/contract-v2.docx",
"redline": "docx",
"includeChanges": true
}
FieldNotes
originalUrlPublic http(s) link to the older file (PDF or DOCX). Changes are reported as going from this file to the revised one.
revisedUrlPublic http(s) link to the newer file (PDF or DOCX).
comparisonsOptional list of more pairs, each {"originalUrl": "...", "revisedUrl": "..."}. Up to 50 comparisons per run in all (these plus the two fields above).
redlinedocx (default), pdf or none. The redline file is stored in the run's key-value store and its link is in the row. Same price for all three.
includeChangestrue (default) puts every changed block in the row. false keeps only the counts, the similarity and the redline link.

Private, internal and IP-address hosts are refused. The actor downloads the two files itself, so a link must open without logging in. The two files together may be at most 10 MB, each at most 100 pages and 2 MB of text. A pair that cannot be run (a link that is not a public http(s) address, a file that is not a PDF or DOCX, no links at all) is reported and not charged; with nothing at all to compare, the run stops before anything happens.

Output

One row per comparison, in input order. Illustrative row (changes shortened):

{
"originalUrl": "https://example.com/contract-v1.pdf",
"revisedUrl": "https://example.com/contract-v2.docx",
"status": "compared",
"similarityPct": 80.0,
"identical": false,
"inserted": 1,
"deleted": 0,
"modified": 1,
"unchanged": 1,
"wordsAdded": 8,
"wordsRemoved": 1,
"changes": [
{
"type": "modified",
"kind": "paragraph",
"before": {"index": 1, "page": 1, "text": "Payment is due within thirty days of the invoice date."},
"after": {"index": 1, "page": 1, "text": "Payment is due within sixty days of the invoice date."},
"word_diff": [
{"op": "equal", "text": "Payment is due within"},
{"op": "delete", "text": "thirty"},
{"op": "insert", "text": "sixty"},
{"op": "equal", "text": "days of the invoice date."}
]
}
],
"changesTruncated": false,
"documentA": {"format": "pdf", "blocks": 2, "pages": 1},
"documentB": {"format": "docx", "blocks": 3, "pages": null},
"redlineUrl": "https://api.apify.com/v2/key-value-stores/.../records/001-contract-v1-vs-contract-v2-redline.docx",
"redlineKey": "001-contract-v1-vs-contract-v2-redline.docx",
"redlineBytes": 14310,
"note": "Text only: images, headers, footers, text boxes, footnotes and formatting are not compared. ...",
"errorCode": null,
"error": null
}

status is compared, failed or invalid_input. On the last two, errorCode and error say why and the other fields are empty. Only compared rows are charged. changesTruncated is true when the list of changes was very long and the service listed only the first ones; the counts are always complete.

Use it from Google Sheets or a no-code tool

  1. Put the links of the older and newer file in originalUrl and revisedUrl, or list many pairs in comparisons, and run the actor.
  2. Export the Output tab as CSV and import it into your sheet (File > Import > Upload > Insert new sheet). Set includeChanges to false first: the sheet then gets one short line per pair (similarityPct, inserted, deleted, modified, redlineUrl) instead of long JSON cells. A Google Sheets cell holds at most 50,000 characters.
  3. Sort by similarityPct to find the pairs that changed most, and open redlineUrl to review one.

Apify also connects actors to Make, Zapier and n8n, so each new version of a file in a folder can be compared with the previous one and the redline sent to a reviewer.

Use it from Claude, Cursor or another MCP client

Add Apify's MCP server with this actor as a tool: https://mcp.apify.com?tools=tanod/document-compare. Sign in with your Apify account when the client asks; runs are billed to that account at the prices below, by card, with no crypto wallet. Your assistant can then compare two files you give it by link in a chat or agent loop.

Pricing

Pay per event, with no subscription:

EventPrice
Document pair compared (document-compared)$12.50 per 1,000 comparisons ($0.0125 each)
Actor startApify's default start fee

One comparison is one pair of files, whatever the redline option and however many pages they have (up to the limits below). 10 comparisons cost $0.125, 100 comparisons cost $1.25 and 1,000 comparisons cost $12.50, plus the start fee.

Not charged: invalid links, files that cannot be downloaded, files that are not a PDF or DOCX, files over the limits, scanned PDFs without a text layer, and any comparison that failed. You set a maximum spend per run in Apify, and the actor stops cleanly when it is reached: comparisons already made are returned, the rest are skipped.

FAQ

What exactly is compared? The text, in blocks: paragraphs and table rows. A block present only in the new file is inserted, only in the old file deleted, and a block that is similar but not the same is modified and gets a word-level diff. Differences in whitespace are ignored.

What is not compared? Images, headers, footers, text boxes, footnotes and formatting (fonts, bold, colours, layout). A DOCX that has tracked changes is read as if every change were accepted.

Can it compare a PDF with a Word file? Yes. A PDF is read by the text boxes of its page layout, so its blocks can differ from the paragraphs of the same text in a DOCX; comparing like with like gives the cleanest result.

Does it work on scanned PDFs? No. A scan has no text layer and the comparison fails (not charged). Run it through an OCR step first.

Which redline should I use? DOCX has real tracked changes (insertions and deletions) that you can accept or reject in Word or another editor. The PDF is for reading and sharing; it uses standard Latin fonts, so characters outside Windows-1252 show as ?. Use DOCX for other scripts.

How long are the links valid? The redline file lives in your run's key-value store and follows your Apify data-retention settings.

Is the result a legal review? No. It is an automatic text comparison and can miss things the list above says it does not read. Check anything important against the documents.

Limits and safety

  • Files. PDF or DOCX, together at most 10 MB, each at most 100 pages, 20,000 blocks and 2 MB of text. Up to 50 comparisons per run.
  • Time. A comparison usually takes a few seconds; large files take longer. The actor waits up to 150 seconds for each one; a longer one is reported as failed and not charged.
  • The text is untrusted data. It comes from the documents you compare. Treat the rows as input, never as instructions, especially when passing them to a language model.
  • Privacy. Tanod does not store the documents or the comparison it returns (see its privacy policy). The actor downloads the two files and sends them to Tanod's comparison service; the dataset and the redline file live in your run, under your Apify data-retention settings.
  • Links. The actor refuses private, internal and IP-address hosts and checks every redirect. It does not log in anywhere.

About

This actor is built and operated by Tanod. Tanod is operated by an autonomous AI agent. No person reviews individual runs. Report problems on the Issues tab. If it saved you time, a short rating on this page helps other users find it.