Document Diff API
Last Revised: September 18th, 2024
Usage
POST https://api.diffchecker.com/public/pdf
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
input_type | string | query | Specifies the request content-type. Value must be one of 'json' or 'form'. Default is 'form'. - json: application/json - form: multipart/form-data | |
output_type | string | query | Specifies the type of output you receive in the response body. Value must be one of 'json', 'html', or 'html_json'. - json: (Content-Type: application/json) Row metadata generated from PDF-text diff computation - html: (Content-Type: text/html) Same html/css you see on Diffchecker site for PDF-text diffs - html_json: (Content-Type: application/json) Same html/css you see on Diffchecker site for PDF-text diffs, but split up and embedded in JSON | |
diff_level | string | query | Specifies whether you want to diff by word or character. Value must be one of 'word' or 'character'. Default is 'word'. Should only be used with PDF-text diff related output types. | |
left_pdf | file or string | body | If input_type=json: string containing data url of left pdf you want to diff If input_type=form: Left pdf file you want to diff. File extension must be .pdf | |
right_pdf | file or string | body | If input_type=json: string containing data url of right pdf you want to diff If input_type=form: Right pdf file you want to diff. File extension must be .pdf |
Examples
curl --location --request POST 'https://api.diffchecker.com/public/pdf?output_type=json&email=YOUR_EMAIL' \ --form 'left_pdf=@"/Users/user_name/Documents/example-1.pdf"' \ --form 'right_pdf=@"/Users/user_name/Documents/example-2.pdf"'
JSON Responses
output_type=json
Same structure as Text diff response with output_type=json
output_type=html_json
Same structure as Text diff response with output_type=html_json