Discover/Nic API
live

Nic APIindiacode.nic.in

Search and retrieve Indian Acts, sections, and subordinate legislation from indiacode.nic.in. Browse central and state acts by handle ID or keyword.

Endpoint health
verified 17h ago
browse_central_acts
get_state_acts
get_section_detail
search_acts
get_act_details
6/6 passing latest checkself-healing
Endpoints
6
Updated
22d ago

What is the Nic API?

The India Code API provides access to Indian legislation via 6 endpoints covering central acts, state acts, and section-level content. Use search_acts to run full-text keyword searches across Acts, Sections, or Subordinate Legislations, or use get_act_details to retrieve a complete act's chapter structure, metadata, and subordinate rules. Each act response includes fields like ministry, enactment_date, short_title, and a full sections array with IDs for individual text retrieval.

Try it
Results per page
Search type: 'acts' for Acts, 'section' for Sections, or 'subordinate' for Subordinate Legislations
Search keyword to find matching legislation
Pagination offset (0-based)
api.parse.bot/scraper/e9bac3eb-7736-4209-8c66-c21f50945510/<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/e9bac3eb-7736-4209-8c66-c21f50945510/search_acts?rpp=3&type=acts&query=Data+Protection&start=0' \
  -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 indiacode-nic-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: India Code SDK — search, browse, and drill into legislation."""
from parse_apis.india_code_api import IndiaCode, SearchType, ActNotFound

client = IndiaCode()

# Search for acts by keyword, limiting total items fetched.
for act in client.actsummaries.search(query="Data Protection", type=SearchType.ACTS, limit=3):
    print(act.title, act.act_no, act.date)

# Take the first result and drill into full details.
summary = client.actsummaries.search(query="Aadhaar", limit=1).first()
if summary:
    act = summary.details()
    print(act.title, act.metadata.ministry)

    # Fetch section content via the sub-resource.
    for section in act.sections[:2]:
        detail = act.section_details.get(section_id=section.section_id)
        print(section.title, detail.content_text[:80])

# Browse state-level legislation.
for state_act in client.stateacts.list(handle_id="2454", limit=3):
    print(state_act.title, state_act.act_no)

# Typed error handling when an act doesn't exist.
try:
    client.acts.get(handle_id="9999999")
except ActNotFound as exc:
    print(f"Act not found: handle_id={exc.handle_id}")

print("exercised: search / details / section_details.get / stateacts.list / acts.get")
All endpoints · 6 totalmissing one? ·

Full-text search across Indian legislation by keyword. Returns matching Acts, Sections, or Subordinate Legislations depending on search type. Results are paginated with offset-based navigation. Each result includes handle_id for drilling into act details via get_act_details.

Input
ParamTypeDescription
rppintegerResults per page
typestringSearch type: 'acts' for Acts, 'section' for Sections, or 'subordinate' for Subordinate Legislations
queryrequiredstringSearch keyword to find matching legislation
startintegerPagination offset (0-based)
Response
{
  "type": "object",
  "fields": {
    "rpp": "integer results per page",
    "start": "integer current pagination offset",
    "results": "array of matching acts with title, act_no, date, handle_id, and url",
    "total_results": "integer total number of matching results"
  },
  "sample": {
    "data": {
      "rpp": 10,
      "start": 0,
      "results": [
        {
          "url": "https://www.indiacode.nic.in/handle/123456789/22037?view_type=search&col=123456789/1362",
          "date": "11-Aug-2023",
          "title": "The Digital PersonalDataProtectionAct, 2023.",
          "act_no": "22",
          "handle_id": "22037"
        }
      ],
      "total_results": 17
    },
    "status": "success"
  }
}

About the Nic API

Searching and Browsing Legislation

The search_acts endpoint accepts a query string and an optional type parameter (acts, section, or subordinate) to scope results. Pagination is offset-based via start and rpp. Each result in the results array includes title, act_no, date, handle_id, and url. The handle_id field is the key identifier used across all other endpoints. browse_central_acts provides an alphabetical catalog of all Central Acts — useful for enumerating the full corpus without a search query.

Act Details and Section Content

get_act_details takes a handle_id and returns act metadata (act_number, enactment_date, ministry, enforcement_date, hindi_title, long_title), a sections array where each entry carries section_id, act_id, section_number, and title, plus a subordinate_legislation object keyed by type (rules, regulations, notifications, orders). To fetch the actual legislative text, pass the act_id and section_id from that array into get_section_detail, which returns content_html, content_text, footnote_html, and footnote_text.

Bulk Extraction and State Acts

scrape_act_full_structured combines act metadata retrieval with section-level content fetching in a single call. The optional limit parameter caps how many sections are returned with full text, which is useful when working with large acts. The response includes sections_scraped and total_sections_in_act so callers can track coverage. For state and union territory legislation, get_state_acts accepts a state-specific handle_id (for example, 2454 for Andaman & Nicobar Islands) and returns a paginated list of that jurisdiction's acts in the same result shape as central act browsing.

Reliability & maintenanceVerified

The Nic API is a managed, monitored endpoint for indiacode.nic.in — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when indiacode.nic.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 indiacode.nic.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
17h ago
Latest check
6/6 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 full-text legal search tool over Indian central and state acts using search_acts with the query parameter
  • Extract complete structured text of a specific Act including footnotes via scrape_act_full_structured for document analysis pipelines
  • Enumerate all Central Acts alphabetically using browse_central_acts to build a legislation index or database
  • Look up subordinate legislation (rules, regulations, notifications) attached to a parent Act via get_act_details subordinate_legislation field
  • Retrieve section-level plain text and HTML for any Act section using get_section_detail for citation or annotation tools
  • Aggregate and compare state-specific legislation across Indian states using get_state_acts with different state handle IDs
  • Monitor ministry-wise legislation by filtering get_act_details metadata on the ministry field across a corpus of acts
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 indiacode.nic.in have an official developer API?+
India Code does not publish a documented public developer API. The indiacode.nic.in website is a government portal maintained by the Ministry of Law and Justice, intended for human browsing. This Parse API exposes its legislation data in a structured, programmatic form.
What does `get_act_details` return beyond basic act metadata?+
It returns a metadata object with fields including act_number, enactment_date, act_year, short_title, hindi_title, long_title, ministry, enforcement_date, and last_updated. It also returns the full sections array with each section's section_id and act_id (needed for get_section_detail), and a subordinate_legislation object that groups associated rules, regulations, notifications, and orders by type.
How do I get the full text of an entire Act rather than one section at a time?+
scrape_act_full_structured fetches act metadata and iterates through sections to return their text in a single response. Use the limit parameter to cap how many sections are fetched. The response includes sections_scraped and total_sections_in_act so you can page through a large act in batches by making multiple calls with increasing offsets.
Does the API cover amendments, bill history, or gazette notifications linked to an Act?+
Not currently. The API covers act metadata, section text, and subordinate legislation items (rules, regulations, notifications, orders) attached to an act via get_act_details. Amendment history and bill progression data are not exposed as structured fields. You can fork this API on Parse and revise it to add an endpoint targeting those views.
What are the known coverage limitations for state acts?+
State act coverage reflects what indiacode.nic.in has digitized, which varies by state. Some older state acts or recent amendments may be missing or incomplete. Each state requires its own numeric handle_id, and there is no built-in endpoint to list all available state handle IDs. You can fork this API on Parse and add a state directory endpoint to address that gap.
Page content last updated . Spec covers 6 endpoints from indiacode.nic.in.
Related APIs in Government PublicSee all →
devgan.in API
Search and explore Indian legal acts like the IPC, BNS, and CrPC by browsing chapters, viewing detailed section information, and finding cross-references between different laws. Navigate through legislative classifications, search across acts, and access comprehensive details on specific sections all in one place.
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.
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.
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.
legiscan.com API
Track and monitor legislative bills across all US states, search by topic or bill number, and access full bill text and datasets to stay informed on current legislation. Get detailed information on bill status, sponsors, and voting records without needing authentication.
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.
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.