Legal API reference
Base URL https://legal.ejiapi.com/api/legal/v1. Send your key as x-api-key: leg_…. Answers are {status, message, data, source, asOf, disclaimer}. Errors are application/problem+json. Add ?fields=a,b to trim fields. Limit: 120 requests a minute per key.
curl -H "x-api-key: YOUR_KEY" "https://legal.ejiapi.com/api/legal/v1/acts/search?q=dowry+death"
Acts
Central Acts, the Constitution, ordinances and repealed Acts from India Code. /acts/search looks inside the text of the Acts and returns the matching passage in square brackets. Texts are indexed in batches, so actsIndexed shows how many are searchable so far.
| Request | What it returns |
|---|---|
GET /api/legal/v1/acts?q=&kind=&year=&ministry=&limit=&offset= | List and filter. kind: act, constitution, repealed, ordinance, amendment |
GET /api/legal/v1/acts/search?q= | Full-text search inside Acts, best match first |
GET /api/legal/v1/acts/{id}?text=true | One Act with its summary, PDF link and, with text=true, its plain text |
Old to new criminal-law sections
IPC to BNS, CrPC to BNSS and Indian Evidence Act to BSA, both directions. Built from a CC-BY-4.0 community table and spot-checked against the Acts; not yet reviewed by a lawyer, and every answer says so. Status is retained, change or deleted (for example IPC 124A).
| Request | What it returns |
|---|---|
GET /api/legal/v1/sections/lookup?code=IPC§ion=420 | BNS section(s) for an IPC section. code: IPC, BNS, CrPC, BNSS, IEA, BSA |
GET /api/legal/v1/sections/search?q=theft | Find sections by the words in their title |
GET /api/legal/v1/sections/codes | The three code pairs and their row counts |
Judgments and their text
Supreme Court (all years) and High Courts (recent years first; more years are added as the load grows). Parties, judge, date, outcome, CNR and citation. The text of a judgment is read from its PDF in the open dataset the first time it is asked for, then kept; the newest Supreme Court judgments are added every day. Party names are shown as initials for sensitive case types (partiesHidden: true), and the text of those judgments is not served. Aadhaar, PAN, phone and email patterns are removed from the text. Scanned PDFs with no text layer return 422. Long judgments come in parts: pass start with the next value of the last answer.
| Request | What it returns |
|---|---|
GET /api/legal/v1/judgments?q=&court=&source=sc|hc&year=&from=&to= | Search by party or judge words, filter by court, year or dates |
GET /api/legal/v1/judgments/{id} | One judgment, for example sc:2023INSC600 |
GET /api/legal/v1/judgments/{id}/text?start=0&maxChars=60000 | The text, in parts (up to 600,000 characters), with pages and total length |
GET /api/legal/v1/judgments/text/search?q= | Words inside the judgment texts we hold, with the matching passage |
GET /api/legal/v1/judgments/stats | What is loaded, by court | What is loaded, by court |
Citations and courts
Parse a citation or CNR number with our own rules (no outside data) and list the courts.
| Request | What it returns |
|---|---|
GET /api/legal/v1/citations/parse?q=2023 INSC 600 | Type and parts of INSC, High Court neutral, SCC, AIR, SCR, SCC OnLine and CNR numbers; links the judgment when we hold it |
GET /api/legal/v1/courts?type=high&state= | Supreme Court and 25 High Courts: seat, benches, states, site |
Court pendency
Totals from the public home page of the National Judicial Data Grid, district and taluka courts, saved once a day. The history starts on the day we first loaded it.
| Request | What it returns |
|---|---|
GET /api/legal/v1/pendency | Latest: civil, criminal, total, filed and disposed last month, filed by women and senior citizens |
GET /api/legal/v1/pendency?days=90 | Saved daily history |
Parliament bills
From the Parliament of India's bills service.
| Request | What it returns |
|---|---|
GET /api/legal/v1/bills?q=&status=&year=&house=&type= | Search bills |
GET /api/legal/v1/bills/{id} | One bill |
Calculators
Dates and sums worked out from the Acts. They name the provision so a lawyer can check them. They do not know court holidays or condonation.
| Request | What it returns |
|---|---|
GET /api/legal/v1/calc/limitation | Kinds of claim known (Limitation Act 1963 Schedule) |
GET /api/legal/v1/calc/limitation?kind=money-lent&accrual=2024-01-15 | Last day to sue or appeal |
GET /api/legal/v1/calc/cheque-bounce?cheque_date=&returned=¬ice_sent=¬ice_received= | Cheque validity, notice and complaint dates under NI Act ss.138 and 142 |
GET /api/legal/v1/calc/interest?principal=&rate=&start=&end=&compound= | Simple or compound interest |
Reference information only, not legal advice. Statutes and judgments are shown as published by the source and may be out of date or incomplete. Ask a lawyer before relying on anything here.