# LawAPI docs

Base URL: `https://lawapi.dev/api/v1`

## Search

`GET /api/v1/search?q=<query>&jurisdiction=<code>&jurisdiction_scope=<tree|exact>&work_class=<class,...>&work_type=<native>&limit=<n>`

`jurisdiction` is a country (`gb`) or sub-national code (`gb-sct`, ISO 3166-2 lower case); by default it
covers the whole tree (the code and its regions), `jurisdiction_scope=exact` limits it to that level.

Returns original-language legal text (`section.text`, which may carry the source's own markup),
`section.num_label` / `heading_path` / `language` / `is_authoritative` / `untranscribed_graphic_count`, `work.work_type` / `work.work_class` / `work.legal_force`, and `work.source_urls`.

`work_class` is one of `constitution`, `law`, `regulation`, `decree`, `rule`, `judicial_interpretation`, `treaty`, `other`; `work_type` is the source's own document type.

## Jurisdictions

`GET /api/v1/jurisdictions[?level=country|region|local]` — each item has `parent`, `level`,
`law_count` (this level) and `tree_law_count` (with sub-regions); regions follow their country.

## MCP

`POST https://lawapi.dev/mcp` exposes a `search` tool over JSON-RPC.
