# BC Laws API

> BC Laws API on Apizie: 7 endpoints (Describes the documents and directories available within a specific 'aspect' (content group) of the BCLaws…, Lists the metadata available for the specified index or directory from the BCLaws legislative respository, Retrieves a specific document from the BCLaws legislative repository (HTML format), Retrieves a specific document from the BCLaws legislative repository with search text highlighted (HTML…, …) returned as clean JSON through one API key. 7 endpoints are live now. Call it over REST at https://zieapi.vercel.app/v1/open-data:bclaws-ca-bclaws/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `open-data:bclaws-ca-bclaws`
- Category: Open Data
- Status: live
- Source: https://bclaws.ca
- Page: https://zieapi.vercel.app/api/open-data/bclaws-ca-bclaws
- OpenAPI: https://zieapi.vercel.app/api/open-data/bclaws-ca-bclaws/openapi.json

BC Laws is an electronic library providing free public access to the laws of British Columbia. BC Laws is hosted by the Queen's Printer of British Columbia and published in partnership with the Ministry of Justice and…

## Endpoints

### Describes the documents and directories available within a specific 'aspect' (content group) of the BCLaws…
`GET https://zieapi.vercel.app/v1/open-data:bclaws-ca-bclaws/get-content-aspect-id`

| Parameter | Type | Required | Description |
|---|---|---|---|
| aspectId | string | yes | The identifier of the 'aspect' (content group) to search |

### Lists the metadata available for the specified index or directory from the BCLaws legislative respository
`GET https://zieapi.vercel.app/v1/open-data:bclaws-ca-bclaws/get-content-aspect-id-civix-document-id`

| Parameter | Type | Required | Description |
|---|---|---|---|
| aspectId | string | yes | The identifier of the 'aspect' (content group) to search |
| civixDocumentId | string | yes | The document identification code for an index or directory |

### Retrieves a specific document from the BCLaws legislative repository (HTML format)
`GET https://zieapi.vercel.app/v1/open-data:bclaws-ca-bclaws/get-document-id-aspect-id-civix-index-id-civix-document-id`

| Parameter | Type | Required | Description |
|---|---|---|---|
| aspectId | string | yes | The identifier of the 'aspect' (content group) to search |
| civixIndexId | string | yes | Index identification code |
| civixDocumentId | string | yes | The document identification code for an index or directory |

### Retrieves a specific document from the BCLaws legislative repository with search text highlighted (HTML…
`GET https://zieapi.vercel.app/v1/open-data:bclaws-ca-bclaws/get-document-id-aspect-id-civix-index-id-civix-document-id-s`

| Parameter | Type | Required | Description |
|---|---|---|---|
| aspectId | string | yes | The identifier of the 'aspect' (content group) to search |
| civixIndexId | string | yes | Index identification code |
| civixDocumentId | string | yes | The document identification code for an index or directory |
| searchString | string | yes | The text to search for within the document |

### Retrieves a specific document from the BCLaws legislative repository (XML format)
`GET https://zieapi.vercel.app/v1/open-data:bclaws-ca-bclaws/get-document-id-aspect-id-civix-index-id-civix-document-id-x`

| Parameter | Type | Required | Description |
|---|---|---|---|
| aspectId | string | yes | The identifier of the 'aspect' (content group) to search |
| civixIndexId | string | yes | Index identification code |
| civixDocumentId | string | yes | The document identification code for an index or directory |

### Retrieves a specific document from the BCLaws legislative repository with search text highlighted (XML format)
`GET https://zieapi.vercel.app/v1/open-data:bclaws-ca-bclaws/get-document-id-aspect-id-civix-index-id-civix-document-id-x-2`

| Parameter | Type | Required | Description |
|---|---|---|---|
| aspectId | string | yes | The identifier of the 'aspect' (content group) to search |
| civixIndexId | string | yes | Index identification code |
| civixDocumentId | string | yes | The document identification code for an index or directory |
| searchString | string | yes | The text to search for within the document |

### A listing of metadata available for the specified aspect and search term from the BCLaws legislative…
`GET https://zieapi.vercel.app/v1/open-data:bclaws-ca-bclaws/get-search-aspect-id-fullsearch`

| Parameter | Type | Required | Description |
|---|---|---|---|
| aspectId | string | yes | The identifier of the 'aspect' (content group) to search |
| q | string | yes | query term |
| s | string | yes | first hit (start index) |
| e | integer | yes | last hit (end index) |
| nFrag | integer | yes | number of fragment snippets to return (< 10) |
| lFrag | integer | yes | length of fragment snippets (< 200) |

## Example
```
curl "https://zieapi.vercel.app/v1/open-data:bclaws-ca-bclaws/get-content-aspect-id" \
  -H "x-api-key: $APIZIE_KEY"
```

## FAQ

### How do I call the BC Laws API?
Create a free Apizie key, then send GET https://zieapi.vercel.app/v1/open-data:bclaws-ca-bclaws/get-content-aspect-id with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the BC Laws API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card.

### Can AI agents use the BC Laws API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key open-data:bclaws-ca-bclaws.

### What is the status of the BC Laws API?
Live: works with just an Apizie key
