English translation for research convenience. The Russian original remains the authoritative source.
CasusLegalHigher-court case-law corpus ← Home
API · Access by arrangement

API CasusLegal

Higher-court case law directly in your code


Semantic search across higher-court case law as an external tool. Connect it to your application based on any LLM or to any HTTP client. A single request returns authentic rulings with citations, quotations, and links to the full text.

Write to the administrator Personal account Documentation
Free launch promotion has ended

Promotional access (300 requests for 10 days) has ended June 27, 2026. New keys are not currently issued automatically, and there are no paid API packages yet. The terms below describe the promotion and are retained for reference: access is granted manually — write to the administrator in @CasusLegalBot or in the “Messages” section of your personal account. The documentation and code examples are current.

What it is

In short: what the connector can already do inside your Claude, ChatGPT, Grok, or Hermes can now be integrated into your own product.

An API key is a long secret string that begins with cl_live_ (for example, cl_live_QZbj…). You insert it into your code, and it gives your server or application access to the case law of Russia’s Constitutional Court, Supreme Court, and Supreme Commercial Court. This amounts to approximately 27,000 original rulings from 1992 to the present day.

You send a standard HTTP request and receive authentic rulings in response: citations, verbatim quotations, and links to the full text. No fabricated rulings.

Treat the key like a password

The key is shown only once when it is created, so save it immediately. We store only the key hash; the key itself cannot be recovered. Keep it on your server; do not embed it in a website, mobile application, or public repository. If the key is exposed, revoke it in your account and contact the “Messages” section to arrange a replacement.

Launch promotion terms (ended)

During the promotion, a single free limit applied. The promotion ended on June 27, 2026 — the figures below are retained for reference.

300
requests
10
days from activation
1
active key
0 ₽
free

The API has separate access terms. Request packages for the bot and web chat do not pay for API access. Paid API packages are not currently sold; access and limits are agreed manually through “Messages” in the personal account.

What the key can do

How requests are deducted

No funds are spent on the promotion, but the balance of 300 requests is counted as follows.

Deducts 1 request

  • case-law search
  • selection catalog
  • exact-phrase search
  • similar-case search

Free; does not affect the balance

  • open a ruling record
  • download the full text
  • compile and download a selection
  • list of subjects and statistics
Two straightforward caveats

A request is deducted only if it completes successfully: if an error occurs on our side or the balance is exhausted, nothing is “consumed.” There is a soft rate limit of approximately 20 requests per minute; it does not reduce the balance but smooths out spikes.

What the key does not allow

For clarity and peace of mind.

Where it can be useful

Law-firm website or online service

The client enters a question and sees a selection of authentic rulings with links. The search works by meaning, so it is suitable for non-lawyers as well.

Your own chatbot or assistant

The bot responds not “from its own head” but with links to specific cases. It addresses the main problem: fabricated rulings.

RAG and model training

Pull the full text of rulings into Markdown as context for opinions, draft documents, and responses.

Document preparation

Find the rulings, export a selection to DOCX, and insert it into a claim, response, or memorandum. Hours of manual copying disappear.

Analytics and monitoring

Batch queries by subject, legal provision, and year; corpus statistics; and regular monitoring of recent positions of judicial chambers.

Internal company systems

Case law in a knowledge base, the legal department’s CRM, or a contract-approval system, right where the work is done.

Documentation

Developer guide

Integration, endpoints, error handling, and configuration of your LLM. Corpus: Constitutional Court of the Russian Federation (1992–2026), Supreme Court of the Russian Federation (2014–2026), Supreme Commercial Court of the Russian Federation (1992–2014), approximately 27,000 original rulings.

Connection

This is a REST API. Connect it to your application based on any LLM or to any HTTP client as an external tool that your model calls to search case law.

Base URL: https://lk.casus.legal

Authentication: header Authorization: Bearer cl_live_…

Format: JSON over HTTPS.

Do not confuse it with the MCP connector

Address https://mcp.casus.legal/one/mcp — this is a separate MCP connector for AI assistants (Claude, ChatGPT, Grok, Hermes). It has nothing to do with the REST API or keys cl_live_ .

1. Get a key

  1. Sign in to your Personal accountVia Telegram or by email and password, using the same account as for the bot and web chat.
    “API” section
  2. Request access through “Messages”Describe the task and the expected volume of requests. Self-service issuance of new keys is disabled.
    Write to the administrator
  3. Wait for the terms to be approvedThe administrator will advise on availability, limits and the procedure for obtaining a key. Save the key cl_live_… immediately: it cannot be recovered. Purchasing a chat plan does not provide API access.
Key usage and limits

Existing keys and their counters are visible in the “API” section of the account dashboard. The mere existence of a key does not mean that access is active. Arrange key renewal or replacement through “Messages”; revoking a key does not enable independent issuance of a new one.

2. First request

bash · curl
# Queries are written in Russian: the corpus is Russian-language.
curl -X POST https://lk.casus.legal/v1/search \
  -H "Authorization: Bearer $CASUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "договор энергоснабжения, фактическое потребление", "limit": 15}'
python · httpx
import os, httpx

client = httpx.Client(
    base_url="https://lk.casus.legal",
    headers={"Authorization": f"Bearer {os.environ['CASUS_API_KEY']}"},
    timeout=60,
)

r = client.post("/v1/search", json={
    "query": "снижение неустойки по статье 333 ГК",  # Russian query: reduction of a contractual penalty under Art. 333 Civil Code
    "limit": 15,
    "mode": "hybrid",
})
r.raise_for_status()
data = r.json()
for hit in data["results"]:
    print(hit["court"], hit["date"], hit["case_number"], hit["url"])

3. Endpoints

POST /v1/searchuses 1 request

Hybrid search. Uses 1 request only upon a successful response.

FieldTypeDefaultDescription
querystringrequiredSearch query in Russian. An empty query returns 400.
limitint 1–3010Number of results. 15–20 is recommended for an overview.
modehybrid / bm25 / semantichybridhybrid (BM25 and semantic) is recommended.
courtstring–Filter: Constitutional Court / Supreme Court / Supreme Commercial Court / Economic Disputes Chamber / Civil Cases Chamber / Plenum / review.
act_type, tag, articlestring–Additional filters (article, e.g. Article 333 of the Civil Code of the Russian Federation).
year_from, year_toint–Year range.
deduplicatebooltrueCollapse iterations of the same case.
expandbooltrueExpand the query with synonyms.

The response structure returns ready-made blocks organized by the hierarchy of courts. Build the response from these blocks rather than making a separate request for each court.

json · /v1/search response
{
  "_response_format_hint": "…answer-format directive…",
  "constitutional_context": { "items": [ … ] },   // Constitutional Court
  "vs_guidance":            { "items": [ … ] },   // Supreme Court Plenum resolutions and reviews
  "latest_practice":        { "items": [ … ] },   // recent Supreme Court chamber rulings
  "vas_history":            [ … ],                // history: Supreme Commercial Court case law
  "results": [
    {
      "id": 12345, "court": "Economic Disputes Chamber", "date": "10.05.2024",
      "case_number": "305-ЭС24-12345", "title": "…", "snippet": "…",
      "score": 0.87,
      "url": "https://lk.casus.legal/case/12345?t=<token>"
    }
  ],
  "_supersession_alert": "…",   // when a superseded act and a current act both exist
  "expansion": { … }
}
url field

The field url contains a ready-made link to the full text with an access token ?t=…. Use it verbatim: do not assemble the link from id and do not discard the token.

GET /v1/cases/{id}free

Act card: details, sections (text by section), articles, hashtags and links url / url_md / url_docx. Use it for verbatim quotations from key acts. It does not consume quota.

bash · curl
curl https://lk.casus.legal/v1/cases/12345 \
  -H "Authorization: Bearer $CASUS_API_KEY"

4. Errors and limits

All errors are returned as JSON {"error": "<code>", "message": "…"}.

HTTPerrorWhenWhat to do
400bad_requestNo query or malformed JSONCorrect the request body
401unauthorizedNo key, or the key is invalid or revokedCheck the header and key
402quota_exhaustedPromotional access has expired (in the body reason, message, contact_url)Write to the administrator in @CasusLegalBot to renew it
403forbiddenThe key does not have search accessArrange access through “Messages” in the dashboard
404not_foundAn act with this id was not found–
429rate_limitedThe per-minute request limit has been exceededExponential backoff
500internal_errorFailure on our sideRetry with backoff; the request is not charged
503engine_not_readyRedeploy or warm up the indexRetry after 1–3 minutes
Usage

POST /v1/search uses 1 request only upon a response 200: errors are not charged. GET /v1/cases/{id} is free. The per-minute request limit is calculated per key (20 per minute during the trial). The remaining quota is visible in the “API” section of the account dashboard.

5. Best practices

  • Keep the key on the backend only. Store it in environment variables or secrets, not in code, Git, or the client.
  • Retries with exponential backoff. For 429 and 5xx retry with increasing delays: 2s, 4s, 8s.
  • Cache act cards. The content GET /v1/cases/{id} is stable, and the call is free.
  • Do not modify links. Field url is signed with a token valid for approximately 30 days. Pass it unchanged.

Configuring your LLM

The API returns raw materials: act cards, thematic blocks and a format hint _response_format_hint. The quality of the final response is determined by your LLM's system instruction. Below are principles for two scenarios, not ready-made prompts.

Scenario A. Chat response (case-law overview)

  1. One search, a broad limit. One call is sufficient /v1/search with a meaningful query and limit 15–20: the hierarchy of courts is already returned in blocks. Do not split the topic into requests for each court.
  2. Pass the model _response_format_hint. This is a built-in format directive; taking it into account brings the response noticeably closer to a reference overview.
  3. Role: “reference source, not adviser”. List all relevant acts by hierarchy (priority to the Constitutional Court, recency to the Supreme Court, and the Supreme Commercial Court as history), without a final recommendation and without selecting the “only correct” position on the user's behalf.
  4. Links strictly from the field url. Prohibit constructing the address from id and deleting the token ?t=: without it, the link will not open the text.
  5. Use quotations sparingly. Retrieve verbatim quotations through /v1/cases/{id} only for 3–5 key acts. For the Constitutional Court, the required quotation is already in the inline field position. This is the main source of excess tokens.
  6. From the results only. Prohibit reconstructing case law from memory: if it is not in the API response, it “does not exist in the database.”

Scenario B. Compiling a case-law catalogue

Objective: a collection or list of cases for export, without legal analysis.

  1. Narrow the search with filters first. Have the model clarify the topic and apply filters court / act_type / tag / article / year_from–year_to: the catalogue will become relevant and compact.
  2. Collection without analysis. For each act, take id, the details (court, type, date, case number) and url. Do not summarize or quote the acts in this mode.
  3. Completeness through multiple requests. For a broad topic, make several /v1/search by subtopic, year or court, and merge the results, discarding duplicates by id.
  4. Return a list, not a conclusion. The mode's output: a table or list with links url, which the user will filter themselves.
  5. Clearly separate the modes. Clearly distinguish this mode from Scenario A so that the model does not drift into a detailed analysis when a collection was requested.
RU