API Documentation

Getting Started

Compare text, documents, images, and spreadsheets programmatically with the Diffchecker API.

Base URLhttps://api.diffchecker.com/public
OpenAPI Spec

The Diffchecker API provides HTTP endpoints for comparing text, PDF and Word documents, images, and Excel spreadsheets. Document endpoints include PDF plain-text and rich-text comparisons plus DOCX redlines with Microsoft Word tracked changes.

Canonical PDF comparison routes use `/document/plaintext` and `/document/richtext`. The legacy `/pdf`, `/pdf/plaintext`, and `/pdf/richtext` routes remain supported for compatibility.

1

Authentication

There are two ways of interacting with the Diffchecker API:

  • Email: Just pass your email as a query string parameter. This method does not require you to have a Diffchecker account and will allow you to make as many diffs as free tier limits allow.
  • API Key: Every paid subscriber gets their own API key, which needs to be passed as the request's X-Api-Key header. This will allow you to make as many diffs as your paid plan allows.
  • When both are provided, email gets ignored in favor of the API key. The examples in these docs assume you are authenticating via email.

    2

    Rate Limiting

    API requests are rate-limited based on your authentication method. Free tier (email) users have lower limits than paid subscribers using an API key. If you exceed the rate limit, the API will return a `429 Too Many Requests` response.

    Every public API response includes an `X-Credits-Used` response header. For backwards compatibility, JSON responses also continue to include the same value in the `creditsUsed` response body field.

    Some `429` responses are returned for exhausted free or paid diff quotas. Zero-credit failed requests are also throttled separately and may include a `retryAfterSeconds` field in the JSON body.

    3

    Resources

    You may find the following resources helpful when dealing with PDF, Image, or Excel diffs:

  • Data URLs (MDN)
  • FormData (MDN)