Statute Search API

The Statute Search API is a full-text search over the sections of every Act in the India Code corpus held by eCourtsIndia. You send a query such as cheating or bns 318, optionally limited to one state's acts, and get ranked hits with the act, section number, heading and a link, ready to fetch in full.

GET https://webapi.ecourtsindia.com/api/partner/acts/search

Overview

People rarely start with a citation. They start with a word or a situation: cheating, eviction, dowry, cheque bounce. The Statute Search API finds the sections that deal with it across 4.2 lakh+ provisions of Central and State Acts, rules and notifications. Lawyers use it to locate the right provision, compliance teams to find every rule on a topic, and legal apps to power a statute search box.

GET /api/partner/acts/search takes q, up to 200 characters, an optional state code and a limit from 1 to 50. The response gives the total number of matches and a ranked list of hits, each with the act key and title, the unit and number, the heading and the India Code URL. Hits carry no text: fetch the ones you need with the Act Section API or, for many at once, the Act Sections Batch API.

Input
q (full-text query, up to 200 characters); optional state and limit (1 to 50, default 20)
Returns
Total matches and ranked hits with act, section number, heading and URL
Coverage
India Code corpus: Central and State Acts, the Constitution, CPC First Schedule, rules and notifications; 4.2 lakh+ statutory provisions
Source
India Code corpus on indiacode.ecourtsindia.com
Auth
Bearer API key or OAuth via the MCP server
Register
eCourtsIndia (ecourtsindia.com)
Data source
Public court records published by the Supreme Court, High Courts, district courts and tribunals, harvested daily and refreshed on demand.

What it returns

query

Your query as trimmed by the server

total

Number of matching provisions

hits[].key

Citation key of the act, for example 1860/45

hits[].title

Official title of the act

hits[].unit / number

Kind of provision and its number, for example s and 420

hits[].heading

Heading of the provision

hits[].url

India Code page for the provision

Use cases

Finding the right provision

An associate drafting a complaint about a property fraud searches cheating dishonest inducement. The hits list IPC 415 and 420 and BNS 318 with their headings, so she can pick the section that fits the facts and the date of the offence, then fetch the full text with the Act Section API.

State law research

A consultant advising a client in Haryana searches a topic with state=HR to see only Haryana acts and rules. The ranked hits show which statutes and rules touch the subject, giving a quick map of the state law before deeper reading.

Statute search box in an app

A legal information app adds a law search box. Each query goes to the Statute Search API, the app shows headings and act names as results, and a tap on a result loads the section text, offence classification and equivalents from the Act Section API.

How to use it

  1. Call GET /api/partner/acts/search?q=<words> with your Bearer API key.
  2. Add state to restrict to one state's acts, and limit (1 to 50) for the number of hits.
  3. Show or rank the hits by heading and act title.
  4. Fetch the text of chosen hits with the Act Section API or the Act Sections Batch API.

Parameters

NameInDescription
q required query Full-text query. Example: cheating
state query Restrict to a state’s acts. Example: HR
limit query 1 to 50. Example: 20

Example

Request

curl "https://webapi.ecourtsindia.com/api/partner/acts/search?q=cheating&state=HR" \
  -H "Authorization: Bearer eci_live_YOUR_KEY"

Response (illustrative)

// GET /api/partner/acts/search?q=cheating&limit=3
{
  "data": {
    "query": "cheating",
    "total": 215,
    "hits": [
      {
        "key": "1860/45",
        "title": "The Indian Penal Code, 1860",
        "unit": "s",
        "number": "415",
        "heading": "Cheating",
        "url": "https://indiacode.ecourtsindia.com/ipc/section/415/"
      },
      {
        "key": "2023/45",
        "title": "The Bharatiya Nyaya Sanhita, 2023",
        "unit": "s",
        "number": "318",
        "heading": "Cheating",
        "url": "https://indiacode.ecourtsindia.com/bns/section/318/"
      }
    ]
  },
  "meta": { "request_id": "req_example030" }
}

Authenticate with Authorization: Bearer eci_live_…. Every response field is documented in the eCourtsIndia API documentation. Assistants can also call this through the eCourtsIndia MCP server.

Glossary

Act citation key
The identifier eCourtsIndia uses for an act in the India Code corpus, built from year and act number: 1860/45 is the Indian Penal Code, 2023/45 the Bharatiya Nyaya Sanhita, 1908/5 the CPC. State acts carry a state prefix, such as hr/1948/11.
India Code
The official repository of Indian Central and State legislation maintained by the Government of India. eCourtsIndia publishes its corpus at indiacode.ecourtsindia.com and serves the same provisions through these APIs, addressed by act citation key and section number.
Full-text search
A search that matches words anywhere in the provisions rather than only exact titles or numbers. Results are ranked by relevance, so the sections most closely about your words come first.

Good to know

  • Hits carry no text; fetch sections separately.
  • q is limited to 200 characters; limit is clamped to 1 to 50.

Frequently asked questions

Is there an API to search Indian laws by keyword?

Yes. The Statute Search API runs a full-text search over the sections of every act in the India Code corpus. Send q, such as cheating or eviction of tenant, and you get ranked hits with the act, section number, heading and India Code link for each matching provision.

Can I search only one state's laws?

Yes. Pass state with a state code, for example state=HR for Haryana. The search is then restricted to that state's acts and rules. Leave it out to search Central and State legislation together. The total field tells you how many provisions matched, while hits holds the top results up to your limit.

Why do the hits not include the section text?

Search is designed to be light: it returns where the matches are, not their content. Fetch the text of the sections you need with the Act Section API, or up to 50 at once with the Act Sections Batch API, which also return offence classification and equivalents.

How is this different from searching the India Code website?

The government India Code site is built for browsing in a web page. This API returns ranked matches as structured data with stable citation keys, so a program can show results, link to the section and then fetch its text and classification without screen work.

Can I search for a section by its number, such as BNS 318?

Yes, queries like bns 318 work as full text. If you already know the act and number, the Act Section API is the direct route, and if you only have an act name, the Act Name Resolver API turns it into the citation key you need.

Can AI assistants search the statute book?

Yes. On the eCourtsIndia MCP server, search_statute runs full text over sections, articles, CPC Orders and Rules, and rules, notifications and circulars, returning citation keys. Claude or ChatGPT can then read the matching provisions with lookup_provision before answering, so the reply quotes the corpus.