# Austlii — 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 Australian legal cases from AustLII's comprehensive database, browsing by year and downloading decisions in multiple formats including RTF, PDF, and print-friendly versions. Discover available case databases and retrieve specific court rulings with prioritized download options to suit your preferred format.

**Category:** Government & Public Data | **Website:** [austlii.edu.au/](https://austlii.edu.au/) | **Docs:** [parse.bot/marketplace/01a0a258-ecf1-4f29-ba3e-25d0f8f8f14b/austlii-edu-au-api](https://parse.bot/marketplace/01a0a258-ecf1-4f29-ba3e-25d0f8f8f14b/austlii-edu-au-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-austlii-edu-au-api-01a0a258/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_case

Retrieves detailed metadata and download links for a specific case document. Prioritizes RTF format, then eco-friendly print, then PDF.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The full URL of the case document page from list_cases results (e.g. 'https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/HCA/2024/1.html'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-austlii-edu-au-api-01a0a258/get_case \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_case_full_text

Extracts the complete full text and metadata of an AustLII case judgment from its document URL. Returns structured metadata (case title, medium neutral citation, parallel citations, court name, judgment date, judges/coram, catchwords) plus the entire body of the judgment as plain text including headnote, orders, and every numbered paragraph in order. Makes a single HTTP request to the case document page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The full URL of the case document page (e.g. 'https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/HCA/2004/52.html'). Obtainable from list_cases results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-austlii-edu-au-api-01a0a258/get_case_full_text \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_database_years

Lists all available years for a specific database. Use the path value from list_databases results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `path` | string | Yes | The database path from list_databases results (e.g. 'cgi-bin/viewdb/au/cases/cth/HCA'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-austlii-edu-au-api-01a0a258/get_database_years \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"<string>"}'
```

### list_cases

Lists cases for a specific database and optionally filtered by year. Returns case titles and URLs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `path` | string | Yes | The database path from list_databases results (e.g. 'cgi-bin/viewdb/au/cases/cth/HCA'). |
| `year` | string | No | Four-digit year to filter cases (e.g. '2024'). Omitting returns the default listing for the database. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-austlii-edu-au-api-01a0a258/list_cases \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"<string>","year":"<string>"}'
```

### list_databases

Lists all available legal databases on AustLII organized by jurisdiction and category. Returns database names, URLs, and path identifiers that can be used with other endpoints.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-austlii-edu-au-api-01a0a258/list_databases \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
