Compare Documents (Plain Text PDF)

Compute a plain-text diff between two PDF documents. Supports both multipart/form-data file uploads and JSON with base64-encoded data URLs.

post/document/plaintext

Request

  • Base URL: https://api.diffchecker.com/public
  • URL: https://api.diffchecker.com/public/document/plaintext
  • Auth: one of:
    • API key in header X-Api-Key
    • API key in query parameter email

Query parameters

emailstring email

Your email address. Required if not using an API key.

input_type'json' | 'form'

Specifies the request content-type.

  • form: multipart/form-data (default)
  • json: application/json
output_type'json' | 'html' | 'html_json' required

Specifies the type of output you receive in the response body.

  • json: Row metadata generated from PDF-text diff computation (Content-Type: application/json)
  • html: Same HTML/CSS you see on the Diffchecker site for PDF-text diffs (Content-Type: text/html)
  • html_json: Same HTML/CSS, but split up and embedded in JSON (Content-Type: application/json)
diff_level'word' | 'character'

Specifies whether you want to diff by word or character. Default is word. Should only be used with PDF-text diff related output types.

Headers

Diffchecker-Version'1'

API version to serve the request with. Defaults to the newest version, currently 1, when omitted. An unsupported version is rejected with 400 UNSUPPORTED_API_VERSION. See Versioning and Deprecation in the getting started guide.

Request body

left_pdfstring required

Data URL of the left PDF (data:application/pdf;base64,...).

right_pdfstring required

Data URL of the right PDF (data:application/pdf;base64,...).

Response

Diff computed successfully. Same response structure as Text diff.

OR

Changes

No recorded changes to this operation across all 1 revision of this API.