# 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-indiankanoon-org-api-1a71c4ee/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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/parse-indiankanoon-org-api-1a71c4ee/browse_court_year_months \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-indiankanoon-org-api-1a71c4ee/browse_court_years \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-indiankanoon-org-api-1a71c4ee/browse_courts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-indiankanoon-org-api-1a71c4ee/get_document \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-indiankanoon-org-api-1a71c4ee/get_recent_judgments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-indiankanoon-org-api-1a71c4ee/get_suggestions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-indiankanoon-org-api-1a71c4ee/search_documents \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
