API & MCP

Everything a person can do on What Changed in This Law?, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

What Changed in This Law?

Paste (or link) the old and new versions of a law, regulation, terms of service or policy. The text is split at §, Art. and Section headings, sections are aligned by their number, and every added, removed or modified section is shown with a word-level diff and the numbers, durations and obligation words (must/may/muss/kann…) that changed.

Inputs of What Changed in This Law?
FieldTypeDefaultDescription
oldTexttextarea—Old version (text)
newTexttextarea—New version (text)
oldUrlurl—Or: URL of the old version. Official source (e.g. gesetze-im-internet.de, eur-lex.europa.eu, legislation.gov.uk).
newUrlurl—Or: URL of the new version
citationtext—Citation / amending act (optional)
effectiveDatedate—Effective date of the new version (optional)

Example request

Notice period shortened

curl -X POST https://whatchangedinthislaw.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"oldText":"§ 1 Scope\nThis act applies to consumer contracts.\n§ 2 Notice\nThe customer must give notice of termination at least 3 months before the end of the term.\n§ 3 Fees\nA processing fee of 25 EUR may be charged.","newText":"§ 1 Scope\nThis act applies to consumer contracts.\n§ 2 Notice\nThe customer may give notice of termination at any time with a notice period of 1 month.\n§ 3 Fees\nA processing fee of 25 EUR may be charged.\n§ 4 Online cancellation\nProviders must offer a cancellation button on their website.","citation":"Example amendment act","effectiveDate":"2026-12-01"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "what-changed-in-this-law": { "type": "http", "url": "https://whatchangedinthislaw.usefulweb.site/mcp" }
  }
}