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

> Access Canadian legal information from CanLII.org. Discover jurisdictions and databases, search case law and legislation across all provinces and territories, and retrieve full document text and metadata.

**Category:** Government & Public Data | **Website:** [canlii.org/](https://canlii.org/) | **Docs:** [parse.bot/marketplace/801e4ef5-6e91-4d55-b315-c2d91230d0e8/canlii-org-api](https://parse.bot/marketplace/801e4ef5-6e91-4d55-b315-c2d91230d0e8/canlii-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-canlii-org-api-801e4ef5/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_arbitration_awards

Search for and retrieve tribunal or board decisions (e.g. arbitration awards, administrative rulings) for a specific jurisdiction. Uses a pre-configured search for arbitration content.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `j_id` | string | No | Jurisdiction ID filter (e.g. 'on' for Ontario, 'ab' for Alberta, 'bc' for British Columbia, 'ca' for Canada Federal) |
| `limit` | integer | No | Maximum number of awards to return (max 25 per page) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-canlii-org-api-801e4ef5/get_arbitration_awards \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"j_id":"<string>","limit":"<integer>"}'
```

### get_document_detail

Get full text and metadata for a specific legal document given its CanLII URL. Returns the document title, canonical URL, and full text content.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full CanLII document URL (e.g. https://www.canlii.org/en/ab/abca/doc/2000/2000abca329/2000abca329.html) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-canlii-org-api-801e4ef5/get_document_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_employment_standards_code

Retrieve the full text of a named legislation statute for a given jurisdiction.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `j_id` | string | No | Jurisdiction ID (e.g. 'on' for Ontario, 'ab' for Alberta, 'bc' for British Columbia, 'ca' for Canada Federal) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-canlii-org-api-801e4ef5/get_employment_standards_code \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"j_id":"<string>"}'
```

### get_jurisdiction_databases

Get all databases (Legislation, Courts, Boards and Tribunals) for a specific jurisdiction, including coverage dates and document counts.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `j_id` | string | Yes | Jurisdiction ID (e.g. 'ab' for Alberta, 'ca' for Canada Federal, 'on' for Ontario, 'bc' for British Columbia) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-canlii-org-api-801e4ef5/get_jurisdiction_databases \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"j_id":"<string>"}'
```

### get_jurisdiction_list

Get list of all available Canadian jurisdictions with their IDs and document counts. Returns all 14 provinces/territories plus a commentary category.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-canlii-org-api-801e4ef5/get_jurisdiction_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_documents

Search for legal documents (cases, legislation) across all or specific jurisdictions. Returns paginated results with 25 items per page. Omitting j_id or passing 'all' searches all jurisdictions.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `j_id` | string | No | Jurisdiction ID filter. Pass a jurisdiction code to filter, or 'all' to search all jurisdictions. |
| `page` | integer | No | Page number for pagination |
| `query` | string | Yes | Search keyword or phrase |
| `type_id` | string | No | Document type filter: 'all', 'decision', 'legislation' |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-canlii-org-api-801e4ef5/search_documents \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"j_id":"<string>","page":"<integer>","query":"<string>","type_id":"<string>"}'
```
