Discover/devgan API
live

devgan APIdevgan.in

Access Indian legal acts (IPC, BNS, CrPC, and more) via API. Browse chapters, retrieve section text, classification data, and IPC–BNS cross-references.

Endpoint health
verified 4d ago
list_acts
get_ipc_bns_crossreference
get_chapter
search_act
navigate_section
9/9 passing latest checkself-healing
Endpoints
9
Updated
26d ago

What is the devgan API?

The devgan.in API exposes 9 endpoints covering nine Indian bare acts including IPC, BNS, CrPC, CPC, and HMA. You can retrieve full section text and HTML, chapter listings, classification details (offence type, bail, cognizance, triable_by), and IPC-to-BNS cross-references. The get_section endpoint returns the most granular data, including a classification object, composition field, and linked cross_references array for any supported act and section number.

Try it

No input parameters required.

api.parse.bot/scraper/329dad50-19e1-4420-82c2-d39a09736dc4/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/329dad50-19e1-4420-82c2-d39a09736dc4/list_acts' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace devgan-in-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Devgan Bare Acts API — bounded, re-runnable; every call capped."""
from parse_apis.devgan_bare_acts_api import Devgan, ActAbbreviation, ActNotFound

devgan = Devgan()

# List all available Indian legal acts
for act in devgan.acts.list(limit=5):
    print(act.abbreviation, act.full_name)

# Construct an Act by abbreviation and browse its chapters
ipc = devgan.act(abbreviation="ipc")

for chapter in ipc.chapters.list(limit=5):
    print(chapter.chapter_number, chapter.title, chapter.url)

# Get full chapter content (sections with text and HTML)
chapter_content = ipc.chapters.get(chapter_num="01")
print(chapter_content.chapter_number, chapter_content.act)
for sec in chapter_content.sections[:2]:
    print(sec.section_number, sec.title, sec.text[:80])

# Search for sections by number within the act
result = ipc.sections.search(query="302", limit=1).first()
if result:
    print(result.section_number, result.title)
    print(result.description)

# Get cross-references between IPC and BNS for a section
xref = ipc.sections.crossreference(section_num="302")
print(xref.section_number)
for ref in xref.cross_references:
    print(ref.text, ref.url)

# Navigate to adjacent sections
nav = ipc.sections.navigate(section_num="302")
print(nav.prev, nav.next, nav.index)

# Typed error handling: catch invalid act abbreviation
try:
    bad_act = devgan.act(abbreviation="xyz")
    for ch in bad_act.chapters.list(limit=1):
        print(ch.title)
except ActNotFound as exc:
    print(f"Act not found: {exc}")

print("exercised: acts.list / chapters.list / chapters.get / sections.search / crossreference / navigate / error handling")
All endpoints · 9 totalmissing one? ·

List all available Indian legal acts on the site. Returns a static list of supported acts with their abbreviations, full names, and internal IDs. No parameters required.

Input

No input parameters required.

Response
{
  "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"
        },
        {
          "act_id": "2",
          "full_name": "Code of Criminal Procedure, 1973",
          "abbreviation": "CRPC"
        }
      ]
    },
    "status": "success"
  }
}

About the devgan API

Acts and Coverage

The API covers nine Indian statutes: BNS (Bharatiya Nyaya Sanhita), CPC (Code of Civil Procedure), CrPC (Code of Criminal Procedure), HMA (Hindu Marriage Act), IDA (Indian Divorce Act), IEA (Indian Evidence Act), IPC (Indian Penal Code), MVA (Motor Vehicles Act), and NIA (Negotiable Instruments Act). The list_acts endpoint returns the full list with each act's abbreviation, full_name, and act_id. The get_act_details endpoint adds header_info (act number and year) and a meta_description string for any of the nine supported act abbreviations.

Sections and Classification

get_section is the most detailed endpoint. For a given act and section_num (e.g., ipc / 302), it returns title, full description text, a classification object (containing an offences array, cognizance, bail, and triable_by fields), a composition string for compoundability information, and a cross_references array of linked related sections. Classification data may be null for acts or sections where it is not published on the source. Navigation within an act is available via the navigation object (prev, next, index) embedded in the response, or separately through navigate_section.

Chapters and Section Lists

list_chapters returns chapter-level metadata including chapter_number (which may contain letters such as 05a), title, slug, and url. get_chapter fetches all sections within a chapter, returning each section's section_number, title, plain text, and html. list_all_sections produces a flat index of all section numbers and URLs for an act; note that title may be empty for acts that do not publish titles in their section index.

Search and Cross-References

search_act queries by section number (e.g., 302) rather than keyword text, returning a results array and a matches_found count string. get_ipc_bns_crossreference isolates the cross-reference links for a given section, making it straightforward to map equivalent provisions between the IPC and BNS without parsing the full section response.

Reliability & maintenanceVerified

The devgan API is a managed, monitored endpoint for devgan.in — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when devgan.in changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official devgan.in API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
4d ago
Latest check
9/9 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a legal reference app that displays IPC or BNS section text alongside classification (bail, cognizance, triable_by) for lawyers and students.
  • Map equivalent provisions between IPC and BNS using get_ipc_bns_crossreference to track legislative changes after the 2023 reform.
  • Generate a structured dataset of all CrPC or CPC chapters and their sections using list_chapters and get_chapter.
  • Power a chatbot that answers 'what does section 420 IPC say' by calling get_section and returning the description and classification fields.
  • Create a navigation-aware section browser using navigate_section to provide prev/next links within any supported act.
  • Audit compoundability across IPC sections by extracting the composition field from get_section for every section in the act.
  • Bulk-index all section numbers and URLs for a given act via list_all_sections to build a search index or sitemap.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does devgan.in have an official developer API?+
No. devgan.in does not publish an official developer API or documented public endpoints for its bare acts data.
What does the `get_section` endpoint return beyond the section text?+
It returns a classification object with offences, cognizance, bail, and triable_by fields; a composition string covering compoundability; a cross_references array with linked related sections; and a navigation object with prev, next, and index pointers. Classification may be null for sections or acts where that data is not available.
Does `search_act` support full-text or keyword search within section content?+
No. search_act matches by section number only (e.g., querying 302 returns sections numbered 302). Keyword or phrase search across section text is not supported. The API covers section-number lookup and full section retrieval. You can fork it on Parse and revise to add a text-search endpoint if needed.
Is case law, judicial commentary, or amendment history available through this API?+
Not currently. The API returns statutory text, classification metadata, and cross-references between sections. Case law, judgments, commentary, and amendment history are not included. You can fork the API on Parse and revise it to add endpoints targeting those data sources.
Are all nine acts equally complete in terms of chapter and classification data?+
Coverage varies by act. The title field in list_all_sections may be empty for acts that do not publish titles in their section index, and the classification object in get_section may be null for acts outside the IPC/BNS criminal law scope where offence classification is not applicable.
Page content last updated . Spec covers 9 endpoints from devgan.in.
Related APIs in Government PublicSee all →
indiacode.nic.in API
Search and retrieve Indian legislation from indiacode.nic.in. Browse Central and State Acts, look up individual sections, and extract fully structured act content by keyword or handle ID.
indiankanoon.org API
indiankanoon.org API
ecourtsindia.com API
Search and retrieve detailed information about court cases across India's Supreme Court, High Courts, and District Courts from a database of over 239 million cases. Find case details, track legal proceedings, and access comprehensive court records to stay informed about judicial matters across the Indian court system.
example-indian-regulatory-site.com API
Search and retrieve penalty data from Indian regulators like SEBI and RBI to discover fines, violation types, and enforcement actions against specific companies or across regulatory bodies. Find detailed information about penalties imposed on entities, browse violation categories, and access comprehensive enforcement records from major Indian financial authorities.
artificialintelligenceact.eu API
Access and search the complete EU AI Act legislation, including specific articles, recitals, annexes, and chapters, while viewing implementation timelines and related regulatory details. Quickly find relevant legal sections through keyword search or browse the full text organized by structure.
diariodarepublica.pt API
Search and retrieve official Portuguese legislation, decrees, and resolutions published in the Diário da República, organized by publication series and date. Browse acts from both Serie I and Serie II to stay updated on the latest government publications and legal announcements.
egazette.nic.in API
Access official Indian gazette publications including recent Extraordinary and Weekly gazettes, browse them by category, and explore the complete directory of available documents. Quickly find and retrieve the latest government publications all in one place.
normattiva.it API
Search and retrieve Italian laws and legislative acts from the official Normattiva portal with advanced filtering, full text access with preserved article structure, and autocomplete suggestions. Quickly find specific legislation, browse complete legal texts, and explore Italian law with intelligent search capabilities.