Docs

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.

RequestWhat 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=trueOne 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).

RequestWhat it returns
GET /api/legal/v1/sections/lookup?code=IPC&section=420BNS section(s) for an IPC section. code: IPC, BNS, CrPC, BNSS, IEA, BSA
GET /api/legal/v1/sections/search?q=theftFind sections by the words in their title
GET /api/legal/v1/sections/codesThe 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.

RequestWhat 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=60000The 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/statsWhat 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.

RequestWhat it returns
GET /api/legal/v1/citations/parse?q=2023 INSC 600Type 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.

RequestWhat it returns
GET /api/legal/v1/pendencyLatest: civil, criminal, total, filed and disposed last month, filed by women and senior citizens
GET /api/legal/v1/pendency?days=90Saved daily history

Parliament bills

From the Parliament of India's bills service.

RequestWhat 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.

RequestWhat it returns
GET /api/legal/v1/calc/limitationKinds of claim known (Limitation Act 1963 Schedule)
GET /api/legal/v1/calc/limitation?kind=money-lent&accrual=2024-01-15Last day to sue or appeal
GET /api/legal/v1/calc/cheque-bounce?cheque_date=&returned=&notice_sent=&notice_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.