# Devgan — 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 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.

**Category:** Government & Public Data | **Website:** [devgan.in/](https://devgan.in/) | **Docs:** [parse.bot/marketplace/ad1d4727-5400-4927-bdb6-55fa6b8b3374/devgan-in-api](https://parse.bot/marketplace/ad1d4727-5400-4927-bdb6-55fa6b8b3374/devgan-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-devgan-in-api-ad1d4727/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_act_details

Get metadata for a specific act including its full name, abbreviation, header information, and SEO meta description. The header_info contains the act number and year.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `act` | string | Yes | Act abbreviation. Accepted values: bns, cpc, crpc, hma, ida, iea, ipc, mva, nia. |

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

### get_chapter

Get all sections within a chapter. Returns the full text and HTML of each section in the chapter. Useful for reading complete chapter content.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `act` | string | Yes | Act abbreviation. Accepted values: bns, cpc, crpc, hma, ida, iea, ipc, mva, nia. |
| `chapter_num` | string | Yes | Chapter number or identifier (e.g., '01', '16', '05a'). Single digits are zero-padded automatically. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-devgan-in-api-ad1d4727/get_chapter \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"act":"<string>","chapter_num":"<string>"}'
```

### get_ipc_bns_crossreference

Get cross-references for a section, showing links between IPC and BNS equivalent sections. Returns the section number and any cross-reference links found in the section description.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `act` | string | Yes | Act abbreviation. Accepted values: bns, cpc, crpc, hma, ida, iea, ipc, mva, nia. |
| `section_num` | string | Yes | Section number (e.g., '302', '103'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-devgan-in-api-ad1d4727/get_ipc_bns_crossreference \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"act":"<string>","section_num":"<string>"}'
```

### get_section

Get details of a specific section by its number, including title, description text, cross-references to related sections, classification (offence type, punishment, cognizance, bail, triable_by when available), composition, and navigation links. Classification data may be null for sections without offence classifications.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `act` | string | Yes | Act abbreviation. Accepted values: bns, cpc, crpc, hma, ida, iea, ipc, mva, nia. |
| `section_num` | string | Yes | Section number (e.g., '302', '103', '376'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-devgan-in-api-ad1d4727/get_section \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"act":"<string>","section_num":"<string>"}'
```

### list_acts

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.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-devgan-in-api-ad1d4727/list_acts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### list_all_sections

List all sections for an act as a flat list with section numbers and URLs. Titles may be empty for acts that do not include them in the section index page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `act` | string | Yes | Act abbreviation. Accepted values: bns, cpc, crpc, hma, ida, iea, ipc, mva, nia. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-devgan-in-api-ad1d4727/list_all_sections \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"act":"<string>"}'
```

### list_chapters

List all chapters for a given act. Returns chapter numbers, titles, slugs, and full URLs. Chapter numbers may include letters (e.g., '05a', '09a', '20a').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `act` | string | Yes | Act abbreviation. Accepted values: bns, cpc, crpc, hma, ida, iea, ipc, mva, nia. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-devgan-in-api-ad1d4727/list_chapters \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"act":"<string>"}'
```

### navigate_section

Get previous and next section numbers for navigation within an act, plus the index page URL. Navigation links may be null when the section is at the boundary or when not available.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `act` | string | Yes | Act abbreviation. Accepted values: bns, cpc, crpc, hma, ida, iea, ipc, mva, nia. |
| `section_num` | string | Yes | Section number (e.g., '302', '103'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-devgan-in-api-ad1d4727/navigate_section \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"act":"<string>","section_num":"<string>"}'
```

### search_act

Search for sections within an act by section number. Returns matching sections with their details. The search queries the act's section index by number (e.g., '302' returns all sections numbered 302 across acts). Keyword text search is not supported server-side.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `act` | string | Yes | Act abbreviation. Accepted values: bns, cpc, crpc, hma, ida, iea, ipc, mva, nia. |
| `query` | string | Yes | Section number to search for (e.g., '302', '376', '420'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-devgan-in-api-ad1d4727/search_act \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"act":"<string>","query":"<string>"}'
```
