# Devgan — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/devgan/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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.beta.paywithlocus.com/api/wrapped/credits/devgan/get-act-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/devgan/get-chapter \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/devgan/get-ipc-bns-crossreference \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/devgan/get-section \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/devgan/list-acts \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/devgan/list-all-sections \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/devgan/list-chapters \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/devgan/navigate-section \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/devgan/search-act \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"act":"<string>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.