Skip to content
Seal
Esc
↑↓navigate↵open⌘Jpreview

Text-level compare of two draft PDFs

Extracts text from both documents (pdftotext -layout in the pdf-tools container) and returns a per-page line diff (added/removed). Read-only — no storage mutation. Honours the org egress.allow_convert gate.

POST/documents/pdf/compare
Authorization
AuthorizationBearer token · headerrequired

Pass your API key as a Bearer token. API keys are scoped to specific operations — configure scopes in your organization's Settings → Developer → API Keys.

Request body
requiredapplication/json
idstringrequired
other_idstringrequired
Responses
200

Diff result

successboolean
document_aobject
Show properties
idstring
public_idstring
namestring
document_bobject
Show properties
idstring
public_idstring
namestring
pages_differentinteger
lines_addedinteger
lines_removedinteger
pagesobject[]
Show properties
Array of object
pageinteger
addedstring[]
removedstring[]
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST "https://api.seal.nyc/api/v1/documents/pdf/compare" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "string",
  "other_id": "string"
}'
Response
{
  "success": true,
  "document_a": {
    "id": "string",
    "public_id": "string",
    "name": "string"
  },
  "document_b": {
    "id": "string",
    "public_id": "string",
    "name": "string"
  },
  "pages_different": 0,
  "lines_added": 0,
  "lines_removed": 0,
  "pages": [
    {
      "page": 0,
      "added": [
        "string"
      ],
      "removed": [
        "string"
      ]
    }
  ]
}