Zum Inhalt
HALOWERK

Medienwerk

doc diff

Takes two documents, by URL, inline base64 or raw text, extracts the text of each and compares them. Paragraphs are the unit: the answer lists every block that was removed, added, or kept but reworded, and for reworded blocks it names the individual words that went and came, so a single changed number in a long clause is visible instead of the whole clause being flagged. Alongside the content diff a structural comparison reports headings, paragraph, list and table-line counts on both sides.

POST https://medien.halowerk.com/v1/doc-diff

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
aobjectJaThe earlier version. Exactly one of url, content_base64 or text.
bobjectJaThe later version. Same shape as a.
ignore_whitespacebooleanNeinTreat runs of spaces and tabs as one space before comparing.
ignore_casebooleanNeinCompare case-insensitively.
include_unchangedbooleanNeinAlso list the unchanged blocks. Off by default — the changes are the answer.
max_blocks_returnedintegerNeinCeiling on returned blocks. What is dropped is counted and reported, never silently cut.
block_char_limitintegerNeinLonger block texts are shortened in the answer; the diff itself always runs on the full text.
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "a",
    "b"
  ],
  "additionalProperties": false,
  "properties": {
    "a": {
      "type": "object",
      "additionalProperties": false,
      "description": "The earlier version. Exactly one of url, content_base64 or text.",
      "properties": {
        "url": {
          "type": "string",
          "maxLength": 2048
        },
        "content_base64": {
          "type": "string",
          "maxLength": 12000000
        },
        "text": {
          "type": "string",
          "maxLength": 400000
        },
        "filename": {
          "type": "string",
          "maxLength": 260
        },
        "format": {
          "type": "string",
          "enum": [
            "auto",
            "pdf",
            "docx",
            "odt",
            "epub",
            "html",
            "markdown",
            "rst",
            "org",
            "latex",
            "rtf",
            "csv",
            "tsv",
            "text"
          ],
          "default": "auto"
        }
      }
    },
    "b": {
      "type": "object",
      "additionalProperties": false,
      "description": "The later version. Same shape as a.",
      "properties": {
        "url": {
          "type": "string",
          "maxLength": 2048
        },
        "content_base64": {
          "type": "string",
          "maxLength": 12000000
        },
        "text": {
          "type": "string",
          "maxLength": 400000
        },
        "filename": {
          "type": "string",
          "maxLength": 260
        },
        "format": {
          "type": "string",
          "enum": [
            "auto",
            "pdf",
            "docx",
            "odt",
            "epub",
            "html",
            "markdown",
            "rst",
            "org",
            "latex",
            "rtf",
            "csv",
            "tsv",
            "text"
          ],
          "default": "auto"
        }
      }
    },
    "ignore_whitespace": {
      "type": "boolean",
      "default": true,
      "description": "Treat runs of spaces and tabs as one space before comparing."
    },
    "ignore_case": {
      "type": "boolean",
      "default": false,
      "description": "Compare case-insensitively."
    },
    "include_unchanged": {
      "type": "boolean",
      "default": false,
      "description": "Also list the unchanged blocks. Off by default — the changes are the answer."
    },
    "max_blocks_returned": {
      "type": "integer",
      "minimum": 10,
      "maximum": 2000,
      "default": 300,
      "description": "Ceiling on returned blocks. What is dropped is counted and reported, never silently cut."
    },
    "block_char_limit": {
      "type": "integer",
      "minimum": 80,
      "maximum": 8000,
      "default": 1200,
      "description": "Longer block texts are shortened in the answer; the diff itself always runs on the full text."
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "a": {
    "text": "Die Laufzeit betraegt zwoelf Monate.",
    "format": "text"
  },
  "b": {
    "text": "Die Laufzeit betraegt vierundzwanzig Monate.",
    "format": "text"
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →