CanLII APIcanlii.org ↗
Access Canadian case law, legislation, and tribunal decisions across all provinces and territories via the CanLII API. Search, retrieve, and parse legal documents.
What is the CanLII API?
The CanLII API gives developers access to Canadian legal documents across 14 provincial and territorial jurisdictions plus federal law, through 8 endpoints covering jurisdiction discovery, legislation retrieval, case search, and full document text. The search_documents endpoint accepts keyword queries and filters by jurisdiction or document type, while get_document_detail returns the complete full text and metadata for any document by its CanLII URL.
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. Returns all 14 provinces/territories plus a commentary category.
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": "272,134",
"short_text": "CA"
},
{
"id": "on",
"name": "Ontario",
"count": "721,149",
"short_text": "ON"
}
]
},
"status": "success"
}
}About the CanLII API
Jurisdiction and Database Discovery
The get_jurisdiction_list endpoint returns all available jurisdictions — provinces, territories, and a federal category — each with an id, name, count, and short_text. Pass any j_id (e.g. ab, on, ca) to get_jurisdiction_databases to enumerate every database within that jurisdiction, organized into categories like Legislation, Courts, and Boards and Tribunals, along with coverage dates and document counts per database.
Searching and Retrieving Documents
search_documents accepts a required query string and optional filters: j_id (jurisdiction code or all), page for pagination (25 results per page), and type_id to restrict results to decision or legislation. Each result item includes title, url, citation, date, court, jurisdiction, and a snippet. To fetch the full content of any document, pass its CanLII URL to get_document_detail, which returns the full_text, title, and canonical url.
Specialized Endpoints
get_employment_standards_code has a pre-configured jurisdiction-to-statute mapping for eight jurisdictions (Alberta, Ontario, British Columbia, Saskatchewan, Manitoba, Nova Scotia, New Brunswick, and Canada federal), returning the full text of the relevant Employment Standards legislation without requiring you to find the correct URL manually. get_arbitration_awards retrieves tribunal and board decisions for a specified jurisdiction, returning name, date, citation, url, court, and synopsis per award, with a limit parameter capped at 25.
HTML Content and AI Summaries
get_document_html returns the raw HTML of a document's main content area with all tags and attributes intact, plus pdf_url, final_url, and ai_summary_html when a summary panel exists. If you only need to check for an AI-generated summary without fetching the full document, get_ai_summary returns a has_ai_summary boolean and the ai_summary_html in a lighter-weight call.
The CanLII API is a managed, monitored endpoint for canlii.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when canlii.org changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official canlii.org API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Building a Canadian employment law research tool that pulls full statute text via
get_employment_standards_codefor each province - Aggregating arbitration award synopses across jurisdictions using
get_arbitration_awardsfor labour relations analytics - Indexing CanLII case law into a local search system using paginated
search_documentsresults filtered bytype_id: decision - Populating a legal document viewer with full text and PDF download links via
get_document_html - Surfacing AI-generated case summaries in a legal research dashboard using
get_ai_summary - Auditing the scope of available courts and tribunals per province by iterating
get_jurisdiction_databasesacross all jurisdiction IDs - Cross-referencing a citation to its full text and metadata by passing a CanLII URL to
get_document_detail
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. 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 can I filter by document type?+
title, url, citation, date, court, jurisdiction, and a short snippet. The type_id parameter accepts all, decision, or legislation to narrow results. Results are paginated at 25 items per page; use the page parameter to step through them, and check total_count in the response to know how many pages to expect.Does the API cover all Canadian jurisdictions equally?+
get_jurisdiction_list endpoint returns 14 provinces and territories plus federal. However, the pre-configured get_employment_standards_code endpoint only maps eight jurisdictions (ab, on, bc, sk, mb, ns, nb, ca). Remaining jurisdictions are not covered by that shortcut. You can fork the API on Parse and revise it to add the missing jurisdiction-to-statute mappings.Does the API return judicial decisions from all court levels, including the Supreme Court of Canada?+
ca jurisdiction. However, the API does not expose case metadata fields like judge names, hearing dates, or cited-cases lists as discrete structured fields — those appear only within full_text or html. You can fork the API on Parse and revise it to parse and surface those fields from the document content.How current is the data — does the API reflect recently published decisions?+
get_jurisdiction_databases returns coverage date ranges per database, so you can check the most recent ingestion window for any specific court or tribunal before querying. There is no webhook or changelog endpoint to detect newly added documents since a given date. You can fork the API on Parse and revise it to add polling logic that tracks new items by comparing total_count across periodic searches.