# Indiankanoon — 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 access Indian court judgments, laws, and tribunal decisions to find relevant legal documents and case law. Browse legal documents by court, year, and month, or get real-time suggestions and recent rulings to support your legal research.

**Category:** Government & Public Data | **Website:** [indiankanoon.org/](https://indiankanoon.org/) | **Docs:** [parse.bot/marketplace/1a71c4ee-8127-4ba0-912a-d9707d5b5b49/indiankanoon-org-api](https://parse.bot/marketplace/1a71c4ee-8127-4ba0-912a-d9707d5b5b49/indiankanoon-org-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/indiankanoon/`
**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

### Browse court year months

List available months for a specific court and year. Each month includes a search_query that can be passed directly to search_documents as the query parameter to retrieve that month's documents.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `court_slug` | string | Yes | Court slug identifier from browse_courts results[*].slug. |
| `year` | string | Yes | Year string from browse_court_years results (e.g. '2024'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/indiankanoon/browse-court-year-months \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"court_slug":"<string>","year":"<string>"}'
```

### Browse court years

List available years for a specific court. Returns years in descending order. Each year can be passed to browse_court_year_months to discover monthly breakdowns.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `court_slug` | string | Yes | Court slug identifier from browse_courts results[*].slug (e.g. 'supremecourt', 'bombay', 'delhi'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/indiankanoon/browse-court-years \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"court_slug":"<string>"}'
```

### Browse courts

List all available courts and tribunals for browsing. Returns court names and slugs that can be used with browse_court_years and browse_court_year_months.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/indiankanoon/browse-courts \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get document

Retrieve the full text and detailed metadata for a specific legal document by its numeric ID. Returns the document title, court, date, author, bench, full text content, and citation counts. The doc_id is obtainable from search_documents results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `doc_id` | string | Yes | Numeric document ID obtainable from search_documents results[*].doc_id (e.g. '1560742', '455468'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/indiankanoon/get-document \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"doc_id":"<string>"}'
```

### Get recent judgments

Get recent judgments added today across different courts. Returns a list of court feeds with search queries that can be passed to search_documents to retrieve today's additions for each court.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/indiankanoon/get-recent-judgments \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get suggestions

Get keyword and case autocomplete suggestions for a given search term prefix. Returns an array of suggestion objects with HTML-formatted labels and plain text values suitable for passing to search_documents.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `term` | string | Yes | Search term or prefix to get suggestions for. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/indiankanoon/get-suggestions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"term":"<string>"}'
```

### Search documents

Full-text search over Indian legal documents (judgments, laws, sections). Supports plain keywords and advanced query syntax including 'doctypes:<court_slug>', 'fromdate:DD-MM-YYYY', 'todate:DD-MM-YYYY'. Returns 10 results per page. Pagination via zero-based page counter; stops when results are empty.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number (0-based). |
| `query` | string | Yes | Search query string. Supports plain text keywords and advanced syntax including 'doctypes:<court_slug>', 'fromdate:DD-MM-YYYY', 'todate:DD-MM-YYYY'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/indiankanoon/search-documents \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```

## Next steps

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