Datasets:
The dataset viewer is not available for this dataset.
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
A2AJ Canadian Laws
Last updated: 2026-07-11 Maintainer: Access to Algorithmic Justice (A2AJ)
Dataset Summary
The A2AJ Canadian Laws dataset provides bulk, open-access full-text legislation and regulations from Canada, covering the federal jurisdiction and nine provinces and territories. Each row corresponds to a single law or regulation and contains the English and French versions where both are publicly available. The project builds on an earlier version that was maintained by the Refugee Law Lab (RLL) and is now maintained by A2AJ, a research project co-hosted by York University's Osgoode Hall Law School and Toronto Metropolitan University's Lincoln Alexander School of Law. The dataset is intended to support empirical legal research, legal-tech prototyping, and language-model pre-training in the public interest—especially work that advances access to justice for marginalised and low-income communities.
Dataset Structure (~ 21k documents)
| Code | Type | First document – Last document | Rows |
|---|---|---|---|
| LEGISLATION-FED | Federal Statutes | 1870-05-12 – 2026-05-06 | 962 |
| REGULATIONS-FED | Federal Regulations | 1945-12-21 – 2026-05-25 | 4,868 |
| LEGISLATION-ON | Ontario Legislation | 1986-07-28 – 2026-07-01 | 856 |
| REGULATIONS-ON | Ontario Regulations | 1990-12-31 – 2026-07-10 | 2,205 |
| LEGISLATION-BC | British Columbia Legislation | 1924-12-19 – 2026-05-28 | 574 |
| REGULATIONS-BC | British Columbia Regulations | 1968-01-01 – 2026-06-24 | 1,466 |
| LEGISLATION-AB | Alberta Legislation | 2002-01-01 – 2026-06-18 | 442 |
| REGULATIONS-AB | Alberta Regulations | 1969-02-11 – 2026-07-06 | 909 |
| LEGISLATION-NS | Nova Scotia Legislation | 1900-01-01 – 2026-01-01 | 625 |
| REGULATIONS-NS | Nova Scotia Regulations | 1913-09-08 – 2026-06-15 | 1,501 |
| LEGISLATION-YT | Yukon Legislation | 2000-01-01 – 2026-01-01 | 278 |
| REGULATIONS-YT | Yukon Regulations | 1957-08-01 – 2027-03-01 | 1,355 |
| LEGISLATION-MB | Manitoba Legislation | 1985-06-26 – 2026-06-01 | 515 |
| REGULATIONS-MB | Manitoba Regulations | 1972-09-27 – 2026-06-25 | 1,093 |
| LEGISLATION-NB | New Brunswick Legislation | 1973-01-01 – 2026-06-12 | 421 |
| REGULATIONS-NB | New Brunswick Regulations | 1980-10-30 – 2026-06-24 | 675 |
| LEGISLATION-NL | Newfoundland and Labrador Legislation | 1957-06-12 – 2025-03-18 | 402 |
| REGULATIONS-NL | Newfoundland and Labrador Regulations | 1986-01-01 – 2026-07-08 | 1,663 |
| LEGISLATION-NT | Northwest Territories Legislation | 1988-01-01 – 2024-01-01 | 239 |
| REGULATIONS-NT | Northwest Territories Regulations | 1990-01-01 – 2026-01-01 | 561 |
Note: Counts are approximate and will drift as the dataset is updated.
Data Fields
| Field | Type | Description |
|---|---|---|
dataset |
string |
Type identifier (eg. LEGISLATION-FED, REGULATIONS-ON) |
citation_en / citation_fr |
string |
Primary citation in English / French |
citation2_en / citation2_fr |
string |
Secondary citation(s) where available |
name_en / name_fr |
string |
Title of the law or regulation |
document_date_en / document_date_fr |
datetime64[us, UTC] |
Date of the document (assent / registration) |
source_url_en / source_url_fr |
string |
URL of the official source document |
scraped_timestamp_en / scraped_timestamp_fr |
datetime64[us, UTC] |
Timestamp when the source was scraped |
unofficial_text_en / unofficial_text_fr |
string |
Full unofficial text of the law/regulation (Markdown) |
unofficial_sections_en / unofficial_sections_fr |
string |
JSON string mapping section numbers to section text |
num_sections_en / num_sections_fr |
int64 |
Number of sections (key count of unofficial_sections) |
upstream_license |
string |
License of the upstream source |
Missing values are null (federal regulations use an empty string "" for citation2_en / citation2_fr by convention).
Data Languages
Where available, rows include both English and French texts. Federal, Manitoba, New Brunswick, Northwest Territories and Yukon instruments are generally fully bilingual; Ontario is partially bilingual; the remaining jurisdictions publish mostly in English. Where only one language is published, the fields for the other language are empty.
Data Splits
All rows are provided in a single train split.
Data Loading
from datasets import load_dataset
import pandas as pd
# load specific type of laws (e.g. Federal Legislation)
laws = load_dataset("a2aj/canadian-laws", data_dir = "LEGISLATION-FED", split="train")
## ALTERNATIVELY
## load the entire corpus
# laws = load_dataset("a2aj/canadian-laws", split="train")
# convert to df
df = laws.to_pandas()
df.head(5)
The dataset is also offered in Parquet format for fast local use. Files are in subfolders with the dataset type names.
Dataset Creation
Curation Rationale
Building on open government initiatives, A2AJ is collecting and sharing Canadian legal data to:
- democratise access to Canadian legislation and regulations;
- enable large-scale empirical legal studies; and
- support responsible AI development for the justice sector.
Source Data & Normalisation
Documents are collected from official government sources for each jurisdiction:
- Federal: the Justice Canada Laws-Lois XML repository on GitHub
- Ontario: the ontario.ca e-Laws API
- British Columbia: BC Laws (CiviX)
- Alberta: the King's Printer
- Nova Scotia: the Nova Scotia Legislature and the Registry of Regulations
- Yukon: laws.yukon.ca
- Manitoba: Manitoba Laws
- New Brunswick: laws.gnb.ca / lois.gnb.ca
- Newfoundland and Labrador: the House of Assembly
- Northwest Territories: the Department of Justice
Source documents (XML, HTML or PDF depending on the jurisdiction) are parsed and normalised into a common structure with minimal processing: conversion to Markdown text, cleanup, and section parsing.
Personal & Sensitive Information
Legislation and regulations are public documents that do not typically include personal or sensitive information.
Non-Official Versions & Disclaimer
The texts here are unofficial copies derived from online sources. For authoritative versions, consult the URLs in source_url_en / source_url_fr.
Non-Affiliation / Endorsement
A2AJ and this dataset are not affiliated with, nor endorsed by, the Government of Canada, Justice Canada or any provincial or territorial government.
Considerations for Using the Data
- Social Impact. Open legal data can reduce information asymmetries but should be used responsibly to ensure that derivative tools advance—rather than undermine—access to justice.
- Currency. Laws and regulations are living documents that change over time. This dataset represents a snapshot and may not reflect the most current versions. Always verify against official sources for legal purposes.
- Completeness. The dataset covers the federal jurisdiction plus Ontario, British Columbia, Alberta, Nova Scotia, Yukon, Manitoba, New Brunswick, Newfoundland and Labrador, and the Northwest Territories. Quebec, Saskatchewan, Prince Edward Island and Nunavut are not yet included because those jurisdictions impose copyright / licensing limitations on their legislation; A2AJ plans to seek permission to add them.
Licensing Information
The code used to create the dataset by the A2AJ and any work on the dataset undertaken by the A2AJ is subject to an open source MIT license.
Users must also comply with upstream licenses found in the upstream_license field in the dataset for each document, which reflects the licenses through which the A2AJ obtained the document. These upstream licenses may include limits on commercial use, as well as other limitations.
The A2AJ is committed to open source methodologies, and we are actively working to obtain more permissive licenses for all data we collect.
Warranties / Representations
While we make best efforts to ensure the completeness and accuracy of our datasets, we provide no warranties regarding completeness or accuracy. The data were collected through automated processes and may contain errors. Always verify documents against the official source.
Dataset Curators
- Sean Rehaag - Co-Director, A2AJ
- Simon Wallace - Co-Director, A2AJ
- Clifford McCarten - Associate Director, A2AJ
- Contact: a2aj@yorku.ca
Citation
Sean Rehaag, Simon Wallace & Clifford McCarten, "A2AJ Canadian Laws" (2025), online: Hugging Face Datasets https://huggingface.co/datasets/a2aj/canadian-laws (updated 2026).
Acknowledgements
This research output is supported in part by funding from the Law Foundation of Ontario and the Social Sciences and Humanities Research Council of Canada, by in-kind compute from the Digital Research Alliance of Canada and by administrative support from the Centre for Refugee Studies, the Refugee Law Lab, and Osgoode Hall Law School. We also thank Justice Canada and the provincial and territorial publishers for maintaining open access to legislative source documents.
- Downloads last month
- 307