# Invoket Legal Diff — French & EU Law Text Comparison

> Invoket Legal Diff — French & EU Law Text Comparison is a paid API for AI agents from api.invoket.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-10).

Returns a structured word-level diff and unified patch between two dated versions of a consolidated French or EU law text, including version metadata for both dates.

## Facts

- Endpoint: GET https://api.invoket.com/legal/diff?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/invoket-legal-diff-french-eu-law-text-comparison-e4044dd2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_n6caiuFrTdWvwjqYsAa1T

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability invoket-legal-diff-french-eu-law-text-comparison-e4044dd2
```

Example prompt: Show me exactly what changed in French law n°78-17 (Informatique et Libertés) between January 1 2021 and June 1 2023 — give me the word-level diff and a unified patch.

## When to prefer this

Use this endpoint when you need to know precisely what text changed in a French or EU law between two specific dates — ideal for legal compliance tracking, regulatory auditing, amendment research, or building legal change-detection pipelines. Prefer this over manually fetching two versions and diffing them yourself, as it handles version resolution automatically and returns structured, machine-readable diff output. Best for point-in-time legal text comparison rather than checking current status.

## Known failure modes

- Law identifier not found in the French or EU legal database — returns 404 or error message
- One or both requested dates fall outside the available version history — returns error with available date range
- Law was not in force at one of the requested dates — returns status indicating no applicable version
- Malformed law identifier or invalid date format — returns 400 bad request
- Payment not settled via x402 — returns 402 Payment Required before processing

## How this service works

The checks your agent runs before it acts: verify a bank account, a phone number, a law in force, the weather or a vehicle — computed from official sources, with provenance in every response. You only pay for answers.

## Output

A structured response containing: word-level diff segments highlighting additions and deletions between the two dated versions, a git-style unified patch of the consolidated text, and version metadata (identifiers, validity dates, status) for both the earlier and later versions of the law.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "to",
  "code",
  "from",
  "article"
 ],
 "properties": {
  "to": {
   "type": "string",
   "description": "End date of the comparison, strict ISO calendar format YYYY-MM-DD; optional, defaults to today"
  },
  "code": {
   "type": "string",
   "description": "Slug of the French code or statute (e.g. code-civil); an EU reference passes celex= or eli= instead. Covered corpus — French law (Légifrance LEGI): Code civil, Code du travail, Code de commerce, Code pénal, Code de la consommation, Code général des impôts (CGI), Code de la sécurité sociale, Code monétaire et financier, Code de l'environnement, Code de la propriété intellectuelle, Code des assurances, plus the Data Protection Act (loi 78-17); EU law (EUR-Lex): GDPR, eIDAS, the e-Commerce Directive, the DSM copyright Directive, DSA, DMA, AI Act, MiCA and NIS2"
  },
  "from": {
   "type": "string",
   "description": "Start date of the comparison, strict ISO calendar format YYYY-MM-DD (zero-padded: 2026-07-05, not 2026-7-5). Must not be after 'to', otherwise the call is rejected with 400 INVALID_RANGE rather than billed for a diff read backwards"
  },
  "article": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/invoket-legal-diff-french-eu-law-text-comparison-e4044dd2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.invoket.com](https://www.zero.xyz/host/api.invoket.com/llms.txt)
