canlii.org APIcanlii.org ↗
Access Canadian legal documents via the CanLII API. Search case law and legislation across all provinces, retrieve full text, and list jurisdiction databases.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/f5ae8751-4f27-48d0-9a68-b080c35b492e/get_jurisdiction_list' \ -H 'X-API-Key: $PARSE_API_KEY'
Get list of all available Canadian jurisdictions with their IDs and document counts.
No input parameters required.
{
"type": "object",
"fields": {
"jurisdictions": "array of jurisdiction objects with id, name, count, and short_text"
},
"sample": {
"data": {
"jurisdictions": [
{
"id": "ca",
"name": "Canada (Federal)",
"count": "271,436",
"short_text": "CA"
},
{
"id": "ab",
"name": "Alberta",
"count": "153,008",
"short_text": "AB"
},
{
"id": "on",
"name": "Ontario",
"count": "718,677",
"short_text": "ON"
}
]
},
"status": "success"
}
}About the canlii.org API
The CanLII API covers 6 endpoints that expose Canadian legal information including case law, legislation, and tribunal decisions across all federal, provincial, and territorial jurisdictions. The search_documents endpoint lets you query across all jurisdictions or filter by one, with paginated results returning title, citation, date, court, and a text snippet per document. Jurisdiction discovery, full document retrieval, and arbitration award search are also supported.
Jurisdiction and Database Discovery
The get_jurisdiction_list endpoint returns every Canadian jurisdiction CanLII covers — each object includes an id (used as j_id in other endpoints), a display name, document count, and a short_text label. Once you have a j_id, get_jurisdiction_databases returns that jurisdiction's available databases grouped into categories (Legislation, Courts, Boards and Tribunals), with coverage date ranges and per-database document counts. This is useful for understanding what source material is available before running a search.
Searching and Retrieving Documents
search_documents accepts a required query string and optional filters: j_id to restrict to one jurisdiction or 'all' for the full index, type_id to limit to 'decision' or 'legislation', and a page integer for pagination (25 results per page). Each result in the items array includes title, url, citation, date, court, jurisdiction, and a snippet of matching text. total_count tells you the full result set size for pagination math.
To fetch a complete document, pass any document url to get_document_detail, which returns the title, url, and full_text of that record — useful for downstream NLP, indexing, or compliance workflows.
Legislation and Tribunal Awards
get_employment_standards_code retrieves the full text of a named statute for a given jurisdiction by j_id, returning title, url, and full_text. The get_arbitration_awards endpoint searches for tribunal and board decisions — arbitration awards, administrative rulings — filtered by j_id and capped by limit (max 25 per request). Each award object includes name, date, citation, url, court, and a synopsis.
- Build a Canadian case law search tool that filters results by jurisdiction using the
j_idparameter and displays citation and court metadata. - Automate employment law research by retrieving full statute text via
get_employment_standards_codefor each province as legislation changes. - Index arbitration awards from specific tribunals using
get_arbitration_awardsto track administrative ruling trends over time. - Populate a legal research database by paginating through
search_documentsresults and storingfull_textfromget_document_detail. - Enumerate all courts and legislative bodies in a jurisdiction using
get_jurisdiction_databasesbefore building jurisdiction-specific filters. - Feed a contract compliance tool with tribunal decisions containing relevant clause language by querying
search_documentswithtype_id='decision'.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does CanLII have an official developer API?+
What does `search_documents` return, and how is pagination handled?+
search_documents returns up to 25 items per page, each with title, url, citation, date, court, jurisdiction, and a snippet. The response also includes total_count (as a string) and the current page number. To retrieve subsequent pages, increment the page parameter starting from 1.Does the API return citations and cross-references between documents?+
citation strings in search results and award objects, but does not expose citing-document graphs or citator data (e.g. which cases cite a given decision). You can fork the API on Parse and revise it to add an endpoint that fetches citation relationship data for a given document URL.Are Quebec French-language documents covered?+
qc) is a valid j_id. However, the API does not expose a language filter parameter — results returned for a Quebec jurisdiction query may include both official language versions depending on what CanLII indexes. You can fork the API on Parse and revise it to add a language filtering parameter if your use case requires language-specific results.Does `get_arbitration_awards` cover all tribunal types, or only specific ones?+
court field in each returned award object identifies the specific body. The limit parameter caps results at 25 per request. You can fork the API on Parse and revise it to target a specific tribunal database if you need results from one body only.