canonical: https://jentic.com/apis/bclaws.ca/bclaws

# Bclaws Ca BC Laws

BC Laws is the British Columbia government's free electronic library of provincial legislation, hosted by the Queen's Printer. The API exposes navigation and retrieval over the same content set: aspect-based content listings, document fetches by index and document ID, XML-formatted document retrieval, and full-text and document-scoped search. With 7 endpoints, it is a focused legal-research surface suitable for legal-tech tooling, civic apps, and AI agents that need to cite or surface BC statutes and regulations.

## For AI agents

Browse and search British Columbia laws, regulations, and government documents through BC Laws. Useful for legal-research agents, civic tooling, and citation lookups.

## Scope

Does not handle court filings, federal Canadian legislation, or non-BC jurisdictions - use for browsing and searching British Columbia statutes and regulations on bclaws.ca only.

## Capabilities

- Browse top-level content by aspect via GET /content/{aspectId}
- Drill into a specific document by aspect and document ID with GET /content/{aspectId}/{civixDocumentId}
- Fetch a document with full path identifiers via GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}
- Retrieve a document's XML representation for structured parsing
- Run a full-text search across an aspect with GET /search/{aspectId}/fullsearch
- Run a search scoped to a specific document via the search-within-document endpoint

## Use cases

### Legal Research Citation Lookup

Lawyers and paralegals researching BC legislation can use the API to fetch the canonical text of an act or regulation by document ID. GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId} returns the document and the /xml variant returns a structured representation that can be parsed for sections, subsections, and definitions. The XML form is preferable for any tool generating linked citations.

Example prompt: Call GET /document/id/statreg/96.../00_96.../xml to fetch a specific BC statute as XML and extract section 5(1)

### Full-Text Search Across BC Statutes

A civic-tech app surfacing BC laws by topic uses GET /search/{aspectId}/fullsearch to run a full-text query across an entire aspect. The endpoint returns matching documents with snippets, suitable for building a public-facing search UI without scraping the BC Laws website.

Example prompt: Call GET /search/statreg/fullsearch?searchString=rent%20increase to retrieve matching BC tenancy regulations

### Document-Scoped Phrase Lookup

Researchers studying a specific act often need to find every occurrence of a phrase within that act. GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/search/{searchString} (and the /xml variant) runs a search bounded to a single document, returning hit locations the client can render as anchored highlights.

Example prompt: Call GET /document/id/statreg/{idx}/{doc}/search/notice to find every section of the act mentioning 'notice'

### Agent-Driven Legal Q&A via Jentic

An AI assistant answering BC residents' legal questions can use BC Laws through Jentic to retrieve and cite the actual statutory text. Jentic exposes the 7 BC Laws operations as discoverable tools indexed by intent, so the agent can search, fetch, and quote the canonical legal source rather than guessing.

Example prompt: Search Jentic for 'search bc laws', load the GET /search/{aspectId}/fullsearch schema, execute with the user's query, and quote the matching statute back with a citation

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /content/{aspectId} | Browse content by aspect |
| GET | /content/{aspectId}/{civixDocumentId} | Browse content by aspect and document ID |
| GET | /document/id/{aspectId}/{civixIndexId}/{civixDocumentId} | Fetch a document by full identifier path |
| GET | /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/xml | Fetch a document as XML |
| GET | /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/search/{searchString} | Search within a specific document |
| GET | /search/{aspectId}/fullsearch | Full-text search across an aspect |

## Key resources

- **Content Browse** — List content by aspect (statreg, etc.) and by aspect + civix document ID
- **Documents** — Fetch documents by full identifier path, with HTML and XML representations
- **Search** — Full-text search scoped to an aspect and search scoped within a single document

## Why Jentic

- **Setup:** BC Laws needs no credentials, but wiring it by hand still means composing the civix content and document URLs, choosing the JSON, XML, or search variants, and parsing the responses yourself. Through Jentic you install once, import the BC Laws API from the API Directory, and your agent calls it with consistent execution handling.
- **Permission scoping:** BC Laws is read-only public data with its aspect and document ids in the URL path, so scope the agent to the operations it needs, such as searching statutes or fetching a document. You choose that operation set, and there are no write operations to add.
- **Credential handling:** BC Laws is unauthenticated public data, so there are no secrets to store. Requests still run through your own Jentic One instance so the agent reaches the right endpoint by intent rather than scraping the BC Laws website.
- **Discovery method:** Agents search Jentic by intent such as 'search BC laws' or 'fetch a BC laws document as XML', and Jentic returns the matching BC Laws operation with its parameter schema so the agent calls the right endpoint without browsing the website.

## Related APIs

- **BBC Nitro API** — Different content domain; listed as a content-API peer in the absence of a competing legal-research API
- **Basesnap API** — Database snapshot service - back up the search index that ingests BC Laws content
- **Baseten API** — ML model deployment - pair with BC Laws to serve a legal-RAG model trained on BC statutes

## FAQ

### What authentication does the BC Laws API use?

BC Laws is open public-sector data and the OpenAPI spec declares no security scheme - calls to /content, /document, and /search endpoints can be made without credentials. Through Jentic, the API is still routed via the discovery layer so agents can find it by intent.

### Can I search BC laws with this API?

Yes. GET /search/{aspectId}/fullsearch runs a full-text search across an aspect (e.g. statreg for statutes and regulations), and the /document/.../search/{searchString} endpoints scope a search to a single document. Both return matches with enough context to render snippets.

### How do I fetch a BC statute as XML through Jentic?

Search Jentic for 'fetch bc laws document xml', which surfaces GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}/xml. Load the schema, supply the aspect, index, and document IDs, and execute. The XML representation is more reliable for programmatic parsing than the HTML form.

### What are the rate limits for the BC Laws API?

The OpenAPI spec does not declare explicit rate limits. BC Laws is provided as a public service by the Queen's Printer, so apply conservative caching and avoid aggressive crawling - most legal documents change rarely, so cached copies are usually safe.

### Is the BC Laws API free?

Yes. BC Laws is published by the Government of British Columbia as a free public service. There is no API key requirement and no usage cost, though usage is governed by the BC Laws terms of use.

### Can I get the canonical text of a specific BC act?

Yes. Use GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId} for the rendered document or the /xml variant for structured content. Combine with /content/{aspectId} to discover the index and document IDs for the act you want.

### Can I limit what my agent is allowed to do with the BC Laws API?

Yes. Because Jentic One is self-hosted, you run the instance and your own rules decide which BC Laws operations the agent may call, so you can allow only what it needs, such as full-text search across an aspect with GET /search/{aspectId}/fullsearch or fetching a document with GET /document/id/{aspectId}/{civixIndexId}/{civixDocumentId}. BC Laws is read-only public data with the aspect and document IDs in the URL path, so there are no write operations to expose and no credentials to hand over. You keep the agent scoped to the exact browse, search, and document-retrieval calls you approve.
