What the corpus holds right now
The citable corpus is still being filled, so a search can legitimately return an empty list. That means the act is not loaded yet — never that no such law exists. Read meta.coverage_note on every response and check the coverage page before telling a user that something does not exist.
Quickstart
- 1
Create a project
A project groups your keys and your usage. Name it after the app that will call the API.
- 2
Create an API key
The secret is shown once, on the screen that creates it. Store it somewhere safe — we keep only a hash, so it cannot be shown again. Lost a key? Revoke it and create another.
- 3
Make your first request
Send the key as a bearer token on every request.
Base URL
https://lawify.uz/api/v1Authentication
Authorization: Bearer lwf_live_xxxxxxxx_…curl -s "https://lawify.uz/api/v1/search?q=mehnat+shartnomasi&limit=5" \
-H "Authorization: Bearer $LAWIFY_API_KEY"Never put a key in client-side code, a mobile app bundle, or a public repository. Anything shipped to a device can be read off it — call the API from your own server.
Endpoints
| Endpoint | Scope | What it returns |
|---|---|---|
GET/api/v1/search | search:read | Search published legal provisions. |
GET/api/v1/domains | corpus:read | The fields of law you can filter by, and which ones your key may use. |
GET/api/v1/provisions/{id} | corpus:read | One provision by its public id, with its text and effective dates. |
GET/api/v1/documents/{id} | corpus:read | One normative document and its provisions. |
GET/api/v1/changes | changes:read | Provisions added, amended or repealed since a date. |
POST/api/v1/answer | answer:write | An evidence-bound answer to a legal question, with its sources. |
POST/api/v1/mcp | corpus:read | Model Context Protocol endpoint, for connecting an AI agent. |
Filtering by field of law
Pass `domains` to scope a query to the part of the corpus your product is about. An unknown value returns 400 rather than being ignored: a filter you believe is narrow but that silently does nothing is the most expensive mistake available here.
constitutionalcivilcriminaladministrativelabourfamilyhousingconsumertaxbusinesstrafficdigitalintellectual-propertylandprocedurecurl "https://lawify.uz/api/v1/search?q=ishdan+bo'shatish&domains=labour" \
-H "Authorization: Bearer $LAWIFY_API_KEY"Read `filter.mode` in the response. `exact` means nothing outside your domains was ever retrieved. `best_effort` means results were classified by document title after retrieval, so you may get fewer results than exist — never results from outside the filter.
A key can be scoped too. A request outside its fields returns 403 rather than an empty list, so you learn the key is the constraint instead of concluding the law is missing.
Scopes
A key carries only the scopes you give it. New keys get read access to the corpus, search and changes. Ask for a narrower set if the integration needs less.
Limits
Beta projects get 10,000 requests a month and 60 a minute. Every response carries x-ratelimit-limit and x-ratelimit-remaining headers.
The answer endpoint is not enabled on the beta plan. Write to ceo@oxforder.uz if your integration needs it.
Errors
Every failure returns the same envelope. Branch on code, never on the message text, which can change.
{
"error": {
"code": "not_found",
"message": "…",
"request_id": "…"
}
}| Status | Code | What it returns |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key. |
| 403 | forbidden | The key lacks the required scope, or your plan does not include this endpoint. |
| 404 | not_found | No published provision or document with that id. |
| 400 | invalid_request | Bad parameters — the message names the field. |
| 429 | rate_limited | Too many requests. Honour the Retry-After header. |
| 500 | internal_error | Our fault. Retry once, then send us the request_id. |
Use it from an AI agent
A ready-made skill bundle: the endpoints, the citation rules, and the coverage caveat an agent has to understand before it answers anyone about the law. Works with Claude Code and any agent that reads SKILL.md, plus an MCP config for clients that speak it.
- 1. Unzip into your skills directory, so SKILL.md sits in .claude/skills/lawify-legal-corpus/.
- 2. Export LAWIFY_API_KEY with a key from above.
- 3. Ask your agent something that needs Uzbek law — it loads the skill on demand.
Or connect over MCP
The MCP endpoint exposes the same corpus to any Model Context Protocol client. Point your client at it and authenticate with the same bearer token.
MCP client configuration
{
"mcpServers": {
"lawify-legal-corpus": {
"type": "http",
"url": "https://lawify.uz/api/v1/mcp",
"headers": {
"Authorization": "Bearer ${LAWIFY_API_KEY}"
}
}
}
}