Overview
Lawyers, compliance teams and legal apps constantly need the exact words of a section and its practical status: is IPC 420 now BNS 318, is it bailable, which court tries it. The Act Section API answers that for any section in a corpus of 4.2 lakh+ provisions, from the Constitution and Central Acts to State Acts, rules and the CPC First Schedule, using a stable citation key for the act.
You call GET /api/partner/acts/{key}/sections/{number}, where key is the act's citation key such as 1860/45 for the IPC and number can carry letters, such as 498A. The unit parameter selects sections, articles, rules, orders, schedules and more. The response gives the act's title, year and in-force status, and the section's heading, text, sub-sections, offence block and equivalents. If you only have an act name, resolve it first with the Act Name Resolver API.
- Input
- Act citation key and section number; optional unit (s, a, r, o, sch, para, hsn, slab, doc)
- Returns
- Act details, section heading and text, offence classification, old/new code equivalents
- 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 as published 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
act.key / titleCitation key and official title, for example 1860/45, The Indian Penal Code, 1860
act.year / number / stateYear, act number and state (null for Central Acts)
act.in_forceWhether the act is currently in force
section.headingSection heading
section.textFull section text
section.childrenSub-sections or clauses where the corpus splits them
section.offencecognizable, bailable, punishment, triable_by and a list of individual offences
section.offence_sourceown, or the equivalent section the classification was taken from
section.equivalents[]Matching sections in the other code with relation (near-identical or close) and direction
section.urlIndia Code page for the section
Use cases
Section lookup in a drafting tool
A legal drafting tool lets an advocate type IPC 498A and inserts the verified text of the section, with a note that it now sits in the BNS under its new number. The tool calls the Act Section API instead of relying on a stale local copy of the code.
Bail checklists
A legal aid organisation's intake app asks which sections a person has been charged under. For each, it calls the API and shows whether the offence is bailable and cognizable and which court tries it, giving volunteers a quick, sourced checklist for the first conversation.
State law research
A compliance consultant checking a Haryana statute fetches sections by the state act's citation key, such as hr/1948/11. Each response gives the text, the act's in-force status and the official India Code link, which goes straight into the client memo.
How to use it
- Find the act's citation key; if you only have a name, use the Act Name Resolver API.
- Call GET /api/partner/acts/{key}/sections/{number}, leaving slashes in the key as they are (for example /acts/1860/45/sections/420).
- Add unit for non-sections, for example unit=a for a constitutional article or unit=r with number 7/11 for CPC Order 7 Rule 11.
- Read heading, text, offence and equivalents; 404 ACT_NOT_FOUND or SECTION_NOT_FOUND means it is not in the corpus.
Parameters
key required path Act citation key (may contain slashes). Example: 1860/45 number required path Section number. Example: 420 unit query s, a, r, o, sch, para, hsn, slab or doc. Example: s Example
Request
curl "https://webapi.ecourtsindia.com/api/partner/acts/1860/45/sections/420?unit=s" \
-H "Authorization: Bearer eci_live_YOUR_KEY" Response (illustrative)
// GET /api/partner/acts/1860/45/sections/420
{
"data": {
"act": {
"key": "1860/45",
"title": "The Indian Penal Code, 1860",
"state": null,
"year": 1860,
"number": "45",
"in_force": false,
"url": "https://indiacode.ecourtsindia.com/ipc/"
},
"section": {
"unit": "s",
"number": "420",
"heading": "Cheating and dishonestly inducing delivery of property",
"text": "Whoever cheats and thereby dishonestly induces the person deceived to deliver any property ...",
"offence": {
"cognizable": false,
"bailable": true,
"punishment": "Imprisonment for 3 years, or fine, or both.",
"triable_by": "Any Magistrate."
},
"offence_source": "equivalent:2023/45/s/318",
"equivalents": [
{ "key": "2023/45", "title": "The Bharatiya Nyaya Sanhita, 2023", "unit": "s", "number": "318", "relation": "close", "direction": "successor" }
],
"url": "https://indiacode.ecourtsindia.com/ipc/section/420/"
}
},
"meta": { "request_id": "req_example023" }
} 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, 1974/2 the CrPC. State acts carry a state prefix, such as hr/1948/11.
- Cognizable and bailable
- A cognizable offence is one where police may register an FIR and arrest without a warrant. A bailable offence is one where bail is a matter of right. The classification, punishment and triable-by court come from the criminal procedure schedule.
- Unit
- The kind of provision you are asking for: s for section, a for article, r for rule (7/11 means Order 7 Rule 11 of the CPC), o for order, sch for schedule, plus para, hsn, slab and doc for other instruments. The default is s.
Good to know
- Section text in responses is complete; examples on this page are trimmed.
- The statute book holds no judgments and says nothing about how a section was applied in a case.
Frequently asked questions
Is there an API to get the text of an IPC or BNS section?
Yes. Call GET /api/partner/acts/{key}/sections/{number} with the act's citation key, for example 1860/45/sections/420 for IPC 420 or 2023/45/sections/318 for BNS 318. The response gives the heading, the full text, the offence classification and the equivalents in the other code, with a link to the India Code page.
Does it work for State Acts and the Constitution?
Yes. State Acts use a key with a state prefix, such as hr/1948/11. For the Constitution use the key 1950/constitution with unit=a for articles. Rules, orders and schedules are reached with the unit parameter, for example unit=r and number 7/11 for CPC Order 7 Rule 11.
Why does an IPC section show a BNS offence classification?
The IPC is a repealed code and has no punishment table of its own in the corpus. Its offence block is therefore taken from its closest BNS equivalent, and offence_source names that section, for example equivalent:2023/45/s/318 for IPC 420. A section with its own table shows own instead.
How is this different from reading the act on the India Code website?
The government India Code site is built for reading in a browser, act by act. This API returns one section as structured JSON with its heading, text, offence classification and cross-code equivalents, addressed by a stable key, so software can fetch and display exactly the provision it needs.
What happens if the section does not exist?
You get 404 ACT_NOT_FOUND if there is no act with that key, or 404 SECTION_NOT_FOUND if the act exists but the section does not. Say that it is not in the corpus rather than that the law does not exist, and never reconstruct a provision from memory.
Can I ask an AI assistant to read a section to me?
Yes. On the eCourtsIndia MCP server, lookup_provision returns the text of one section, article, CPC rule or instrument with its offence classification and equivalents, and lookup_offence returns only the classification. Ask Claude or ChatGPT whether BNS 318 is bailable and it reads the actual section.