# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/austlii/`
**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 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/credits/austlii/get-case \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/austlii/get-case-full-text \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/austlii/get-database-years \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/austlii/list-cases \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/austlii/list-databases \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

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