Developers

CatchDiff API

Compare two PDF documents programmatically. Built for scripts, integrations, and AI assistants — ChatGPT and Claude can call CatchDiff directly.

REST API

POST JSON with two PDF URLs, get a structured diff back.

ChatGPT Actions

Import our OpenAPI spec into a Custom GPT.

Claude Desktop (MCP)

Run our MCP server so Claude can compare PDFs.

REST API

One endpoint. Send two PDF URLs, receive a JSON diff.

Endpoint

POST https://catchdiff.com/api/v1/compare

Authentication

Pass your API key as a bearer token. Request a key at support@catchdiff.com.

Authorization: Bearer cd_live_your_key_here

Request

curl -X POST https://catchdiff.com/api/v1/compare \
  -H "Authorization: Bearer cd_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "pdf_a_url": "https://example.com/contract-v1.pdf",
    "pdf_b_url": "https://example.com/contract-v2.pdf"
  }'

Response

{
  "summary": {
    "pages_a": 12,
    "pages_b": 13,
    "chars_added": 340,
    "chars_removed": 88,
    "pages_changed": 3,
    "pages_inserted": 1,
    "pages_deleted": 0,
    "identical": false
  },
  "pages": [
    { "type": "match", "page_a": 1, "page_b": 1,
      "similarity": 0.97, "chars_added": 10, "chars_removed": 4 },
    { "type": "inserted", "page_a": null, "page_b": 5,
      "similarity": null, "chars_added": 1200, "chars_removed": 0 }
  ],
  "scanned": {
    "pdf_a": { "total": 12, "scanned": 0 },
    "pdf_b": { "total": 13, "scanned": 0 }
  }
}

ChatGPT Actions

Add CatchDiff to a Custom GPT so ChatGPT can compare PDFs for users.

  1. In the GPT editor, open Configure → Actions → Create new action.
  2. Choose Import from URL and paste:
https://catchdiff.com/api/v1/openapi
  1. Set authentication to API Key → Bearer and paste your cd_live_ key.
  2. Save. ChatGPT can now call comparePdfs automatically.

Claude Desktop (MCP)

Run the CatchDiff MCP server so Claude Desktop can compare PDFs natively.

  1. Get the MCP server from the mcp-server/ folder in our repo, run npm install.
  2. Add it to claude_desktop_config.json:
{
  "mcpServers": {
    "catchdiff": {
      "command": "node",
      "args": ["/path/to/mcp-server/index.mjs"],
      "env": { "CATCHDIFF_API_KEY": "cd_live_your_key_here" }
    }
  }
}

Restart Claude Desktop, then ask it to compare two PDF URLs.

Limits & notes

  • • Each PDF must be at a publicly fetchable URL, max 50 MB.
  • • Rate limits depend on your key tier (default 100 requests/24h).
  • • CatchDiff compares extracted text — image-only changes aren't detected.
  • • PDFs are processed in memory and never stored.

Need a key or a higher limit? support@catchdiff.com