BC Laws
bclaws · Data
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 the Law Clerk of the Legislative Assembly.BC Laws contains a comprehensive collection of BC legislation and related materials. It is available on the internet in two forms:First: The library is available as a web site in which users can browse and search the laws of British Columbi
Authentication
Sample Requests
A listing of metadata available for the specified aspect and search term from the BCLaws legislative repository
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/search/{aspectId}/fullsearch?e=20&q=water&s=0&lFrag=100&nFrag=5"import requests
params = {
"e": "20",
"q": "water",
"s": "0",
"lFrag": "100",
"nFrag": "5"
}
response = requests.get(
"https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/search/{aspectId}/fullsearch",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/search/{aspectId}/fullsearch');
url.searchParams.set('e', '20');
url.searchParams.set('q', 'water');
url.searchParams.set('s', '0');
url.searchParams.set('lFrag', '100');
url.searchParams.set('nFrag', '5');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/search/{aspectId}/fullsearch")
q := baseURL.Query()
q.Set("e", "20")
q.Set("q", "water")
q.Set("s", "0")
q.Set("lFrag", "100")
q.Set("nFrag", "5")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/search/{aspectId}/fullsearch")
uri.query = URI.encode_www_form({
"e" => "20",
"q" => "water",
"s" => "0",
"lFrag" => "100",
"nFrag" => "5"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/search/{aspectId}/fullsearch?" . http_build_query([
"e" => "20",
"q" => "water",
"s" => "0",
"lFrag" => "100",
"nFrag" => "5"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Describes the documents and directories available within a specific 'aspect' (content group) of the BCLaws library
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}"import requests
response = requests.get(
"https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}';
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Lists the metadata available for the specified index or directory from the BCLaws legislative respository
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}/{civixDocumentId}"import requests
response = requests.get(
"https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}/{civixDocumentId}",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}/{civixDocumentId}';
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}/{civixDocumentId}"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}/{civixDocumentId}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/bclaws.ca/bclaws/1.0.0/content/{aspectId}/{civixDocumentId}";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with BC Laws?
BC Laws is a Data API. Developers commonly use data APIs for:
- enriching your app with third-party datasets
- building data pipelines and ETL workflows
- querying and searching large datasets
- powering research, analysis, and reporting tools
- syncing reference data into your own systems
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. BC Laws is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?