# Indiacode — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> 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.

**Category:** Government & Public Data | **Website:** [indiacode.nic.in/](https://indiacode.nic.in/) | **Docs:** [parse.bot/marketplace/bdf0b8e9-8f2b-4ac4-b4a6-652f3b8323c4/indiacode-nic-in-api](https://parse.bot/marketplace/bdf0b8e9-8f2b-4ac4-b4a6-652f3b8323c4/indiacode-nic-in-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-indiacode-nic-in-api-bdf0b8e9/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### browse_central_acts

Browse the full catalog of Central Acts alphabetically by short title. Returns paginated list of all central legislation. Each result includes handle_id for fetching full act details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `browse_type` | string | No | Browse criterion: 'shorttitle' to browse alphabetically by short title |
| `rpp` | integer | No | Results per page |
| `start` | integer | No | Pagination offset (0-based) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-indiacode-nic-in-api-bdf0b8e9/browse_central_acts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"browse_type":"<string>","rpp":"<integer>","start":"<integer>"}'
```

### get_act_details

Retrieve full details for a specific Act by its handle ID, including metadata (title, act number, enactment date, ministry), a complete list of chapters and sections with their IDs, and any subordinate legislation (rules, regulations, notifications, orders). The section IDs and act_id returned here are needed to fetch individual section text via get_section_detail.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `handle_id` | string | Yes | Numeric handle ID identifying the act (e.g. '2160' for the Aadhaar Act). Obtained from search_acts or browse_central_acts results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-indiacode-nic-in-api-bdf0b8e9/get_act_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"handle_id":"<string>"}'
```

### get_section_detail

Retrieve the full legislative text and footnotes for a specific section of an Act. Returns both raw HTML and cleaned plain text for both content and footnotes. The act_id and section_id are obtained from the sections array in get_act_details response.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `act_id` | string | Yes | Full internal act ID (e.g. 'AC_CEN_37_85_00001_201618_1517807328460'). Obtained from get_act_details sections[].act_id. |
| `section_id` | string | Yes | Section ID (e.g. '3579'). Obtained from get_act_details sections[].section_id. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-indiacode-nic-in-api-bdf0b8e9/get_section_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"act_id":"<string>","section_id":"<string>"}'
```

### get_state_acts

Browse acts for a specific Indian state or union territory by its handle ID. Returns paginated list of state-level legislation alphabetically by short title.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `handle_id` | string | Yes | State/UT handle ID (e.g. '2454' for Andaman & Nicobar Islands). Each state has a unique numeric handle ID. |
| `rpp` | integer | No | Results per page |
| `start` | integer | No | Pagination offset (0-based) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-indiacode-nic-in-api-bdf0b8e9/get_state_acts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"handle_id":"<string>","rpp":"<integer>","start":"<integer>"}'
```

### scrape_act_full_structured

Retrieve a fully structured representation of an Act including section-level content. Fetches act details then iterates through sections to retrieve their text. Useful for bulk extraction. The limit parameter caps how many sections are fetched (each requires a separate request).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `handle_id` | string | Yes | Numeric handle ID of the act (e.g. '2160'). Obtained from search_acts or browse_central_acts. |
| `limit` | integer | No | Maximum number of sections to fetch content for |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-indiacode-nic-in-api-bdf0b8e9/scrape_act_full_structured \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"handle_id":"<string>","limit":"<integer>"}'
```

### search_acts

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.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword to find matching legislation |
| `rpp` | integer | No | Results per page |
| `start` | integer | No | Pagination offset (0-based) |
| `type` | string | No | Search type: 'acts' for Acts, 'section' for Sections, or 'subordinate' for Subordinate Legislations |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-indiacode-nic-in-api-bdf0b8e9/search_acts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","rpp":"<integer>","start":"<integer>","type":"<string>"}'
```
