Law search
Get the statutes and rulings themselves, not an answer, and write your own prompt around them.
POST /v1/law/search runs the same retrieval the legal models run before they answer and returns the passages. No model is involved: you get the ranked provisions, with their citations and dates, and decide what to do with them.
POST
/v1/law/searchRequest
Authenticate with Authorization: Bearer <your key>, as on every other route. A missing or invalid key returns 401.
| Parameter | Type | Description |
|---|---|---|
| query Required | string | What to look for. A law name plus the legal topic works better than a copied question. |
| jurisdiction Optional | string | ir Iran, es Spain and EU, us United States, tr Turkey, sa Saudi Arabia. Anything else returns 400.Default: ir |
| k Optional | integer | How many passages, 1 to 20. Default: 8 |
Response
Each result has citation and text (up to 3,000 characters). enacted and repealed are top-level fields, so a repealed provision is never hidden inside the text. Where the corpus has them, results also carry law, law_id, number, state, kind, binding_force, in_force_from, snapshot_date and source.
Response
{
"query": "مجازات رانندگی در حالت مستی",
"jurisdiction": "sa",
"count": 3,
"results": [
{ "citation": "نظام المرور م. 69 (1/2)",
"text": "…",
"enacted": "20230101",
"repealed": null,
"law": "نظام المرور", "kind": "مادة", "number": "69",
"snapshot_date": "20261013" }
]
}Example
curl https://api.data.larsima.com/v1/law/search \
-H "Authorization: Bearer $DATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "drunk driving penalty", "jurisdiction": "us", "k": 5}'import os
import requests
res = requests.post(
"https://api.data.larsima.com/v1/law/search",
headers={"Authorization": f"Bearer {os.environ['DATA_API_KEY']}"},
json={"query": "drunk driving penalty", "jurisdiction": "us", "k": 5},
)
for hit in res.json()["results"]:
print(hit["citation"], hit.get("repealed"))