---
title: "Api Diff Law"
method: GET
path: "/api/v1/{country}/laws/{law_id}/diff"
tags: ["api"]
---

# Api Diff Law

`GET /api/v1/{country}/laws/{law_id}/diff`

## Request

- Base URL: `https://legalize.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://legalize.dev/api/v1/{country}/laws/{law_id}/diff`
- Auth: API key in header `Authorization`

Unified diff of a law between the versions in force on two dates.

The HTTP half of the MCP tool of the same name, and the same function
underneath: for a law too large to diff whole it returns `changed_headings`
with `diff_omitted`, and you ask again with `article=` from that list.

## Path parameters

- `country` string, required
- `law_id` string, required

## Query parameters

- `date_a` string, required: The earlier date, YYYY-MM-DD.
- `date_b` string, required: The later date, YYYY-MM-DD.
- `article` string, nullable: Diff one article only, by its anchor or heading.

## Response `200`

Successful Response

- unknown

## Other responses

- `401`: Missing, malformed, or invalid API key
- `422`: Validation Error
- `429`: Monthly quota exceeded. Includes Retry-After header.

---

[API](https://skmtc.dev/legalize/apis/legalize-api.md) · [All operations](https://skmtc.dev/legalize/apis/legalize-api/llms.txt) · [OpenAPI document](https://skmtc.dev/legalize/apis/legalize-api/revisions/305b67a14660?raw)
