devgan.in APIdevgan.in ↗
Access Indian legal acts (IPC, BNS, CrPC, and more) via API. Browse chapters, retrieve section text, classifications, cross-references, and search across 9 acts.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/329dad50-19e1-4420-82c2-d39a09736dc4/list_acts' \ -H 'X-API-Key: $PARSE_API_KEY'
List all available acts on the site. Returns a static list of supported Indian legal acts with their abbreviations and internal IDs.
No input parameters required.
{
"type": "object",
"fields": {
"acts": "array of act objects with abbreviation, full_name, and act_id"
},
"sample": {
"data": {
"acts": [
{
"act_id": "1",
"full_name": "Indian Penal Code, 1860",
"abbreviation": "IPC"
},
{
"act_id": "10",
"full_name": "Bharatiya Nyaya Sanhita, 2023",
"abbreviation": "BNS"
}
]
},
"status": "success"
}
}About the devgan.in API
The devgan.in API exposes 9 endpoints covering Indian Bare Acts including the IPC, BNS, CrPC, CPC, HMA, IDA, IEA, MVA, and NIA. Use get_section to retrieve a section's full text, offence classification, bail status, cognizance type, triable_by court, compoundability, and cross-references — all in a single call. Other endpoints cover chapter listings, flat section indexes, keyword search, and IPC-to-BNS cross-referencing.
Acts and Coverage
The API covers nine Indian statutes available on devgan.in: BNS (Bharatiya Nyaya Sanhita), IPC (Indian Penal Code), CrPC (Code of Criminal Procedure), CPC (Code of Civil Procedure), HMA (Hindu Marriage Act), IDA (Indian Divorce Act), IEA (Indian Evidence Act), MVA (Motor Vehicles Act), and NIA (Negotiable Instruments Act). list_acts returns the full set with abbreviations and internal IDs. get_act_details returns the full name, a header line, and a meta description for any of the nine acts.
Chapters and Sections
list_chapters returns an array of chapter objects — each with chapter_number, title, slug, and url — for a given act abbreviation. get_chapter accepts both act and chapter_num (e.g., '05a' for alphanumeric chapters; single digits are zero-padded automatically) and returns every section in that chapter with section_number, title, plain text, and raw html. list_all_sections gives a flat index of all sections for an act, useful for building navigation or populating a search index.
Section Detail and Classification
get_section is the most field-dense endpoint. For a given act and section_num it returns the section title, full description text, a classification object (containing an offences array, cognizance, bail, and triable_by fields), composition (compoundability notes), an array of cross_references with text and URL, and a navigation object with prev, next, and index links. Not all sections carry a classification object — it is null for procedural or non-penal provisions.
Search and Cross-References
search_act accepts an act abbreviation and a query string (keyword or section number) and returns matching section objects plus a matches_found count string like '7 Matches'. get_ipc_bns_crossreference returns the mapped equivalent sections between IPC and BNS for a given section number, which is useful when migrating references from the old code to the new Sanhita. navigate_section returns only the prev and next section numbers and the act index URL — a lightweight call for building sequential readers.
- Build a legal research tool that retrieves IPC or BNS section text, bail status, and triable_by court in one
get_sectioncall. - Generate a side-by-side IPC-to-BNS mapping table using
get_ipc_bns_crossreferenceacross all IPC sections. - Power a bare-act search widget using
search_actto find sections by keyword (e.g., 'murder', 'cheque', 'negligence'). - Create a sequential bare-act reader app using
navigate_sectionto walk forward and backward through sections. - Index all sections of an act for offline or full-text search by iterating
list_all_sectionsandget_section. - Display chapter-level tables of contents for legal education apps using
list_chapters. - Automate classification checks — bail type, cognizance, triable_by — across a list of section numbers for legal analytics.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does devgan.in have an official developer API?+
What does the `classification` object in `get_section` contain?+
classification object contains an offences array (describing the nature of the offence), cognizance (whether the offence is cognizable or non-cognizable), bail (bailable or non-bailable), and triable_by (the court tier that hears the matter). It is null for sections that do not define a penal offence, such as definitional or procedural provisions.Does the API return the full text of amendments or notifications appended to a section?+
description and html fields, but does not expose separately tagged amendment history or gazette notifications. You can fork it on Parse and revise to add an endpoint that targets amendment annotations if the source page carries them.Are all nine acts structured with chapters and sections, or do some use a different hierarchy?+
list_chapters, but chapter_num accepts alphanumeric identifiers (e.g., '05a') to handle acts with sub-divided chapters. If an act uses a part or schedule structure rather than numbered chapters, those divisions may not be returned by list_chapters. You can fork it on Parse and revise to add endpoint logic for schedule or part-level navigation.Can I search across all nine acts at once with a single query?+
search_act requires a specific act abbreviation per call, so a cross-act search requires one call per act. The API covers all nine supported acts individually. You can fork it on Parse and revise to add a multi-act search endpoint that fans out and merges results.