= 'YOUR SECRET API KEY'
APIkey = 'en' # or 'fr' language
CanLii API
CanLii is an indispensible research tool for lawyers, law students, and scholars. Researchers who wish to interact with CanLii programmatically can access some metadata through an API. This library automates and simplifies many API calls and returns dataframes. Its objective is to help beginners access and use powerful computational tools.
Program functionality
This module automates calls to CanLii databases to obtain metadata. Out of the box, you can use it to obtain nine different sets of results:
- Names of all CanLii tribunal databases (database ID, jurisdiction, tribunal name)
- Identifying information for decisions in a CanLii database (case ID, title, citation)
- Metadata for a specific case (information depends on the database)
- Identities of cases cited by a specified case
- Identities of statutes cited by a specified case
- Identities of cases that cite a specified case
- An edge list of citations (for network analysis)
- An edge list of keywords (for network analysis)
- A topic to topic edgelist of keyword (for network analysis)
All results are returned as Pandas dataframes or series.
Demonstration
To get your own API key, request one directly from CanLii.
Initialize the program
from obiter.canlii_api import *
= canlii_api(APIkey, language) api_caller
1. List CanLii caselaw databases
canlii_api.list_tribunals
canlii_api.list_tribunals ()
Returns list of CanLii caselaw databases
api_caller.list_tribunals()
databaseId | jurisdiction | name | |
---|---|---|---|
0 | qccdoooq | qc | Conseil de discipline de l'Ordre des opticiens... |
1 | skqb | sk | Court of King's Bench for Saskatchewan |
2 | qcoaciq | qc | Comité de discipline de l'organisme d'autorégl... |
3 | abmgb | ab | Alberta Municipal Government Board |
4 | onsc | on | Superior Court of Justice |
... | ... | ... | ... |
362 | ytrto | yk | Yukon Residential Tenancies Office |
363 | nbsec | nb | Financial and Consumer Services Tribunal |
364 | onbcc | on | Building Code Commission |
365 | nttc | nt | Territorial Court of the Northwest Territories |
366 | exchc-cech | ca | Exchequer Court of Canada |
367 rows × 3 columns
#isolate a tribunal
= api_caller.list_tribunals() isolate_df
= isolate_df['name'].str.contains('Federal')
filt isolate_df[filt]
databaseId | jurisdiction | name | |
---|---|---|---|
131 | fca | ca | Federal Court of Appeal |
250 | fct | ca | Federal Court |
251 | pslreb | ca | Federal Public Sector Labour Relations and Emp... |
268 | caci | ca | Federal Commission of Inquiry |
2. List decisions in a caselaw database
canlii_api.list_decisions
canlii_api.list_decisions (databaseId, descending=True, resultCount=10, decision_date_after='', decision_date_before='')
= 'onbcc' #ID of database to be searched, (Building Code Commission)
databaseId = 10 #number of results
resultCount = '2020-01-01' # "date" is a YYYY-MM-DD
decision_date_after = '2020-12-31'
decision_date_before
=databaseId, descending=False, resultCount=resultCount, decision_date_after=decision_date_after, decision_date_before=decision_date_before) api_caller.list_decisions(databaseId
caseId | title | citation | |
---|---|---|---|
0 | 2020onbcc19 | Leung v. Johnston | 2020 ONBCC 19 (CanLII) |
1 | 2020onbcc20 | Earle v. Richardson | 2020 ONBCC 20 (CanLII) |
2 | 2020onbcc15 | Oster v. Bidin | 2020 ONBCC 15 (CanLII) |
3 | 2020onbcc14 | Ropp v. Capener-Hunt | 2020 ONBCC 14 (CanLII) |
4 | 2020onbcc11 | Vance v. Cox | 2020 ONBCC 11 (CanLII) |
5 | 2020onbcc8 | MacPhail v. VanderWindt | 2020 ONBCC 8 (CanLII) |
6 | 2020onbcc6 | Randle v. Johnston | 2020 ONBCC 6 (CanLII) |
7 | 2020onbcc3 | Hand v. Janotta | 2020 ONBCC 3 (CanLII) |
8 | 2020onbcc2 | Hooshley v. Goodale | 2020 ONBCC 2 (CanLII) |
9 | 2020onbcc1 | Allen v. Fedoriw | 2020 ONBCC 1 (CanLII) |
3. Get case metadata
canlii_api.case_metadata
canlii_api.case_metadata (databaseId, caseId)
= 'onbcc' #ID of database to be searched, (Building Code Commission)
databaseId = '2021onbcc13' #Id of target case
caseId
=databaseId, caseId=caseId) api_caller.case_metadata(databaseId
databaseId onbcc
caseId 2021onbcc13
url https://canlii.ca/t/jkw96
title Johnston and Roach v. Findlay
citation 2021 ONBCC 13 (CanLII)
language en
docketNumber B 2021-06; 21-13-1187
decisionDate 2021-07-15
keywords Municipal law — Land use control — Building pe...
topics
concatenatedId 2021onbcc13
dtype: object
4. Internal citations (i.e. cases a target case cites)
canlii_api.internal_cites
canlii_api.internal_cites (databaseId, caseId)
Get a list of all the cases your target case cites.
= 'skqb' #ID of database to be searched, (Court of King's Bench for Saskatchewan)
databaseId = '2022skkb215' #Id of target case
caseId
=databaseId, caseId=caseId) api_caller.internal_cites(databaseId
caseId | title | citation | |
---|---|---|---|
0 | 1974canlii14 | Kienapple v. R. | 1974 CanLII 14 (SCC), [1975] 1 SCR 729 |
1 | 2022canlii26225 | Michael Louis Hamer v. Her Majesty the Queen | 2022 CanLII 26225 (SCC) |
2 | 2022onca553 | R. v. A.R. | 2022 ONCA 553 (CanLII) |
3 | 2007onca421 | R. v. Allen | 2007 ONCA 421 (CanLII) |
4 | 2017scc64 | R. v. Boutilier | 2017 SCC 64 (CanLII), [2017] 2 SCR 936 |
5 | 1997canlii347 | R. v. Currie | 1997 CanLII 347 (SCC), [1997] 2 SCR 260 |
6 | 2020scc9 | R. v. Friesen | 2020 SCC 9 (CanLII), [2020] 1 SCR 424 |
7 | 1999canlii679 | R. v. Gladue | 1999 CanLII 679 (SCC), [1999] 1 SCR 688 |
8 | 2021bcca297 | R. v. Hamer | 2021 BCCA 297 (CanLII) |
9 | 2011onca840 | R. v. Hogg | 2011 ONCA 840 (CanLII) |
10 | 2003scc46 | R. v. Johnson | 2003 SCC 46 (CanLII), [2003] 2 SCR 357 |
11 | 1987canlii25 | R. v. Lyons | 1987 CanLII 25 (SCC), [1987] 2 SCR 309 |
12 | 2007onca872 | R. v. R.M. | 2007 ONCA 872 (CanLII) |
13 | 2018onsc2226 | R. v. Robertson | 2018 ONSC 2226 (CanLII) |
14 | 2022onca47 | R. v. Straub | 2022 ONCA 47 (CanLII) |
15 | 2022skca13 | R v Ballantyne | 2022 SKCA 13 (CanLII) |
16 | 2015skca134 | R v Bird | 2015 SKCA 134 (CanLII) |
17 | 2011skca67 | R v Daniels | 2011 SKCA 67 (CanLII) |
18 | 2021skca122 | R v Goodpipe | 2021 SKCA 122 (CanLII) |
19 | 2019skqb221 | R v Goodpipe | 2019 SKQB 221 (CanLII) |
20 | 2015skca82 | R v Knife | 2015 SKCA 82 (CanLII) |
21 | 2022skca77 | R v Laprise | 2022 SKCA 77 (CanLII) |
22 | 2022skpc7 | R v Levac | 2022 SKPC 7 (CanLII) |
23 | 2020skqb171 | R v Levac | 2020 SKQB 171 (CanLII) |
24 | 2015skca39 | R v Moise | 2015 SKCA 39 (CanLII) |
25 | 2022abca48 | R v Natomagan | 2022 ABCA 48 (CanLII) |
26 | 2021skca50 | R v Pelly | 2021 SKCA 50 (CanLII) |
27 | 2015skca117 | R v Toutsaint | 2015 SKCA 117 (CanLII) |
28 | 2016skca131 | R v Wilton | 2016 SKCA 131 (CanLII) |
5. External citations (i.e. cases that cite a target case)
canlii_api.external_cites
canlii_api.external_cites (databaseId, caseId)
Get a list of all the cases that cite your target case.
= 'csc-scc' #ID of database to be searched, (Supreme Court of Canada)
databaseId = '2022scc30' #Id of target case
caseId
=databaseId, caseId=caseId) api_caller.external_cites(databaseId
caseId | title | citation | |
---|---|---|---|
0 | 2022abca375 | Auer v Auer | 2022 ABCA 375 (CanLII) |
1 | 2022qcca1139 | Ville de Brossard c. Ville de Longueuil | 2022 QCCA 1139 (CanLII) |
2 | 2022cb7 | SOCAN Tariff 22.G – Game Sites (2007-2019) | 2022 CB 7 (CanLII) |
3 | 2022fc1209 | AbbVie Corporation v. Canada (Health) | 2022 FC 1209 (CanLII) |
4 | 2022qccs3010 | Fédération des travailleurs et travailleuses d... | 2022 QCCS 3010 (CanLII) |
5 | 2022fc1147 | Makkar v. Canada (Citizenship and Immigration) | 2022 FC 1147 (CanLII) |
6 | 2022qcca1610 | Service de calèches et traîneaux Lucky Luc c. ... | 2022 QCCA 1610 (CanLII) |
7 | 2022abca264 | Sedgwick v Edmonton Real Estate Board Co-Opera... | 2022 ABCA 264 (CanLII) |
8 | 2022qccs4190 | Ouellette c. Ville de Mascouche | 2022 QCCS 4190 (CanLII) |
9 | 2022fca210 | Innovative Medicines Canada v. Canada (Attorne... | 2022 FCA 210 (CanLII) |
10 | 2022fca181 | Canada (Justice) v. D.V. | 2022 FCA 181 (CanLII) |
11 | 2022abca259 | Fazel v Singer (Wilson Laycraft) | 2022 ABCA 259 (CanLII) |
12 | 2023bcsc113 | Dolnik v The Owners, Strata Plan LMS 1350 | 2023 BCSC 113 (CanLII) |
13 | 2022fc1487 | Cob Roller Farms Ltd. v. 9072-3636 Québec Inc.... | 2022 FC 1487 (CanLII) |
14 | 2022bcsc1882 | Fairgrieve v British Columbia Review Board | 2022 BCSC 1882 (CanLII) |
15 | 2022qccs3728 | Hydro-Québec c. Régie de l'Énergie | 2022 QCCS 3728 (CanLII) |
16 | 2022fc1365 | Afzal v. Canada (Citizenship and Immigration) | 2022 FC 1365 (CanLII) |
17 | 2022qccs3891 | E.T. c. Tribunal administratif du Québec | 2022 QCCS 3891 (CanLII) |
18 | 2022abqb611 | NAIT Students’ Association v NAIT | 2022 ABKB 611 (CanLII) |
19 | 2023onsc284 | Simcoe Muskoka District Health Unit v. ONA | 2023 ONSC 284 (CanLII) |
20 | 2022qccs4677 | Transelec / Common inc. c. Tribunal administra... | 2022 QCCS 4677 (CanLII) |
21 | 2022qcca1464 | M.G. c. Centre intégré de santé et de services... | 2022 QCCA 1464 (CanLII) |
22 | 2022qccs3465 | Ville de Gatineau c. Association des pompiers ... | 2022 QCCS 3465 (CanLII) |
23 | 2023qccs274 | Syndicat de l'enseignement de la région de Qué... | 2023 QCCS 274 (CanLII) |
24 | 2023caf28 | 11316753 Canada Association c. Canada (Transpo... | 2023 CAF 28 (CanLII) |
25 | 2023fca24 | Manitoba Métis Federation Inc. v. Canada (Ener... | 2023 FCA 24 (CanLII) |
26 | 2023fc7 | Janssen Inc. v. Canada (Attorney General) | 2023 FC 7 (CanLII) |
27 | 2023qccs50 | Hobden c. Lord | 2023 QCCS 50 (CanLII) |
28 | 2023qccs273 | Syndicat de l'enseignement de la région de Qué... | 2023 QCCS 273 (CanLII) |
6. Legislation citations within a case
canlii_api.legislation_cites
canlii_api.legislation_cites (databaseId, caseId)
Get a list of all the legislation your target case cites.
= 'csc-scc' #ID of database to be searched, (Supreme Court of Canada)
databaseId = '2022scc30' #Id of target case
caseId
=databaseId, caseId=caseId) api_caller.legislation_cites(databaseId
databaseId | legislationId | title | citation | type | |
---|---|---|---|---|---|
0 | cas | rsc-1985-c-c-42 | Copyright Act | RSC 1985, c C-42 | STATUTE |
1 | caa | sc-2012-c-20 | Copyright Modernization Act | SC 2012, c 20 | ANNUAL_STATUTE |
7. Citations for network analyses (edge list)
canlii_api.citations_edge_list
canlii_api.citations_edge_list (df, databaseId)
= 'csc-scc' #ID of database to be searched, (Building Code Commission)
databaseId = 10 #number of results
resultCount = '2021-01-01' # "date" is a YYYY-MM-DD
decision_date_after = '2021-12-31'
decision_date_before
= api_caller.list_decisions(databaseId=databaseId, descending=False, resultCount=resultCount, decision_date_after=decision_date_after, decision_date_before=decision_date_before) df
api_caller.citations_edge_list(df, databaseId)
original_caseID | original_case_citation | original_case_title | cited_case_caseId | cited_case_title | cited_case_citation | |
---|---|---|---|---|---|---|
0 | 2021scc53 | 2021 SCC 53 (CanLII) | Montréal (City) v. Deloitte Restructuring Inc. | 2020scc10 | 9354-9186 Québec inc. v. Callidus Capital Corp. | 2020 SCC 10 (CanLII), [2020] 1 SCR 521 |
1 | 2021scc53 | 2021 SCC 53 (CanLII) | Montréal (City) v. Deloitte Restructuring Inc. | 2009abqb183 | Agriculture Financial Services Corporation v. ... | 2009 ABQB 183 (CanLII) |
2 | 2021scc53 | 2021 SCC 53 (CanLII) | Montréal (City) v. Deloitte Restructuring Inc. | 2003canlii64234 | Air Canada (Re) | 2003 CanLII 64234 (ON SC) |
3 | 2021scc53 | 2021 SCC 53 (CanLII) | Montréal (City) v. Deloitte Restructuring Inc. | 2020qcca438 | Arrangement relatif à Consultants SM inc. | 2020 QCCA 438 (CanLII) |
4 | 2021scc53 | 2021 SCC 53 (CanLII) | Montréal (City) v. Deloitte Restructuring Inc. | 2019qccs2316 | Arrangement relatif à Consultants SM inc. | 2019 QCCS 2316 (CanLII) |
... | ... | ... | ... | ... | ... | ... |
346 | 2021scc44 | 2021 SCC 44 (CanLII) | H.M.B. Holdings Ltd. v. Antigua and Barbuda | 2021scc27 | Reference re Code of Civil Procedure (Que.), a... | 2021 SCC 27 (CanLII) |
347 | 2021scc44 | 2021 SCC 44 (CanLII) | H.M.B. Holdings Ltd. v. Antigua and Barbuda | 2014bcca482 | Solehdin v. Stern | 2014 BCCA 482 (CanLII) |
348 | 2021scc44 | 2021 SCC 44 (CanLII) | H.M.B. Holdings Ltd. v. Antigua and Barbuda | 1994canlii10958 | T.D.I. Hospitality Management Consultants Inc.... | 1994 CanLII 10958 (MB CA) |
349 | 2021scc44 | 2021 SCC 44 (CanLII) | H.M.B. Holdings Ltd. v. Antigua and Barbuda | 2017onca549 | Tracy v. Iran (Information and Security) | 2017 ONCA 549 (CanLII) |
350 | 2021scc44 | 2021 SCC 44 (CanLII) | H.M.B. Holdings Ltd. v. Antigua and Barbuda | 2016onsc3759 | Tracy v The Iranian Ministry of Information an... | 2016 ONSC 3759 (CanLII) |
351 rows × 6 columns
8. Keywords for network analyses (edge list)
canlii_api.keywords_edge_list
canlii_api.keywords_edge_list (df, databaseId)
= 'csc-scc' #ID of database to be searched, (Supreme Court of Canada)
databaseId = 200 #max number of results
resultCount = '2021-01-01' # "date" is a YYYY-MM-DD
decision_date_after = '2021-12-31'
decision_date_before
= api_caller.list_decisions(databaseId=databaseId, descending=False, resultCount=resultCount, decision_date_after=decision_date_after, decision_date_before=decision_date_before) df
df
caseId | title | citation | |
---|---|---|---|
0 | 2021scc53 | Montréal (City) v. Deloitte Restructuring Inc. | 2021 SCC 53 (CanLII) |
1 | 2021scc52 | R. v. Lai | 2021 SCC 52 (CanLII) |
2 | 2021scc51 | Canada v. Loblaw Financial Holdings Inc. | 2021 SCC 51 (CanLII) |
3 | 2021scc50 | Kreke v. Alansari | 2021 SCC 50 (CanLII) |
4 | 2021scc49 | Canada v. Alta Energy Luxembourg S.A.R.L. | 2021 SCC 49 (CanLII) |
5 | 2021scc48 | R. v. Albashir | 2021 SCC 48 (CanLII) |
6 | 2021scc47 | Trial Lawyers Association of British Columbia ... | 2021 SCC 47 (CanLII) |
7 | 2021scc46 | R. v. Parranto | 2021 SCC 46 (CanLII) |
8 | 2021scc45 | R. v. Cowan | 2021 SCC 45 (CanLII) |
9 | 2021scc44 | H.M.B. Holdings Ltd. v. Antigua and Barbuda | 2021 SCC 44 (CanLII) |
10 | 2021scc43 | Ward v. Quebec (Commission des droits de la pe... | 2021 SCC 43 (CanLII) |
11 | 2021scc42 | Northern Regional Health Authority v. Horrocks | 2021 SCC 42 (CanLII) |
12 | 2021scc41 | Nelson (City) v. Marchi | 2021 SCC 41 (CanLII) |
13 | 2021scc40 | R. v. Strathdee | 2021 SCC 40 (CanLII) |
14 | 2021scc39 | 6362222 Canada inc. v. Prelco inc. | 2021 SCC 39 (CanLII) |
15 | 2021scc38 | R. v. Reilly | 2021 SCC 38 (CanLII) |
16 | 2021scc37 | R. v. Khill | 2021 SCC 37 (CanLII) |
17 | 2021scc36 | Richardson v. Richardson | 2021 SCC 36 (CanLII) |
18 | 2021scc35 | R. v. Dingwall | 2021 SCC 35 (CanLII) |
19 | 2021scc34 | Toronto (City) v. Ontario (Attorney General) | 2021 SCC 34 (CanLII) |
20 | 2021scc33 | Canadian Broadcasting Corp. v. Manitoba | 2021 SCC 33 (CanLII) |
21 | 2021scc32 | York University v. Canadian Copyright Licensin... | 2021 SCC 32 (CanLII) |
22 | 2021scc31 | Grant Thornton LLP v. New Brunswick | 2021 SCC 31 (CanLII) |
23 | 2021scc30 | Canada v. Canada North Group Inc. | 2021 SCC 30 (CanLII) |
24 | 2021scc29 | Corner Brook (City) v. Bailey | 2021 SCC 29 (CanLII) |
25 | 2021scc28 | Southwind v. Canada | 2021 SCC 28 (CanLII) |
26 | 2021scc27 | Reference re Code of Civil Procedure (Que.), a... | 2021 SCC 27 (CanLII) |
27 | 2021scc26 | R. v. Chouhan | 2021 SCC 26 (CanLII) |
28 | 2021scc25 | Sherman Estate v. Donovan | 2021 SCC 25 (CanLII) |
29 | 2021scc24 | Colucci v. Colucci | 2021 SCC 24 (CanLII) |
30 | 2021scc23 | MediaQMI inc. v. Kamel | 2021 SCC 23 (CanLII) |
31 | 2021scc22 | Ethiopian Orthodox Tewahedo Church of Canada S... | 2021 SCC 22 (CanLII) |
32 | 2021scc21 | R. v. Morrow | 2021 SCC 21 (CanLII) |
33 | 2021scc20 | R. v. G.F. | 2021 SCC 20 (CanLII) |
34 | 2021scc19 | R. v. C.P. | 2021 SCC 19 (CanLII) |
35 | 2021scc18 | Ontario (Attorney General) v. Clark | 2021 SCC 18 (CanLII) |
36 | 2021scc17 | R. v. Desautel | 2021 SCC 17 (CanLII) |
37 | 2021scc16 | R. v. Smith | 2021 SCC 16 (CanLII) |
38 | 2021scc15 | R. v. Ramos | 2021 SCC 15 (CanLII) |
39 | 2021scc14 | R. v. Gul | 2021 SCC 14 (CanLII) |
40 | 2021scc13 | R. v. Sheikh | 2021 SCC 13 (CanLII) |
41 | 2021scc12 | R. v. Ghotra | 2021 SCC 12 (CanLII) |
42 | 2021scc11 | References re Greenhouse Gas Pollution Pricing... | 2021 SCC 11 (CanLII) |
43 | 2021scc10 | R. v. R.V. | 2021 SCC 10 (CanLII) |
44 | 2021scc9 | R. v. Esseghaier | 2021 SCC 9 (CanLII) |
45 | 2021scc8 | R. v. W.O. | 2021 SCC 8 (CanLII) |
46 | 2021scc7 | Wastech Services Ltd. v. Greater Vancouver Sew... | 2021 SCC 7 (CanLII) |
47 | 2021scc6 | R. v. T.J.M. | 2021 SCC 6 (CanLII) |
48 | 2021scc5 | R. v. Waterman | 2021 SCC 5 (CanLII) |
49 | 2021scc4 | R. v. Murtaza | 2021 SCC 4 (CanLII) |
50 | 2021scc3 | R. v. Deslauriers | 2021 SCC 3 (CanLII) |
51 | 2021scc2 | R. v. Yusuf | 2021 SCC 2 (CanLII) |
52 | 2021scc1 | Armstrong v. Ward | 2021 SCC 1 (CanLII) |
=databaseId) api_caller.keywords_edge_list(df, databaseId
databaseId | caseId | title | citation | decisionDate | keyword | |
---|---|---|---|---|---|---|
0 | csc-scc | 2021scc53 | Montréal (City) v. Deloitte Restructuring Inc. | 2021 SCC 53 (CanLII) | 2021-12-10 | Bankruptcy and insolvency |
1 | csc-scc | 2021scc53 | Montréal (City) v. Deloitte Restructuring Inc. | 2021 SCC 53 (CanLII) | 2021-12-10 | Pre‐post compensation |
2 | csc-scc | 2021scc53 | Montréal (City) v. Deloitte Restructuring Inc. | 2021 SCC 53 (CanLII) | 2021-12-10 | Companies’ Creditors Arrangement Act, R.S.C. 1... |
3 | csc-scc | 2021scc53 | Montréal (City) v. Deloitte Restructuring Inc. | 2021 SCC 53 (CanLII) | 2021-12-10 | Voluntary Reimbursement Program, CQLR, c. R‐2.... |
4 | csc-scc | 2021scc52 | R. v. Lai | 2021 SCC 52 (CanLII) | 2021-12-08 | Constitutional law |
... | ... | ... | ... | ... | ... | ... |
236 | csc-scc | 2021scc2 | R. v. Yusuf | 2021 SCC 2 (CanLII) | 2021-01-19 | Sentencing |
237 | csc-scc | 2021scc1 | Armstrong v. Ward | 2021 SCC 1 (CanLII) | 2021-01-18 | Torts |
238 | csc-scc | 2021scc1 | Armstrong v. Ward | 2021 SCC 1 (CanLII) | 2021-01-18 | Negligence |
239 | csc-scc | 2021scc1 | Armstrong v. Ward | 2021 SCC 1 (CanLII) | 2021-01-18 | Standard of care |
240 | csc-scc | 2021scc1 | Armstrong v. Ward | 2021 SCC 1 (CanLII) | 2021-01-18 | Surgeon and surgeon |
241 rows × 6 columns
9. Topic to Topic keyword edge list
canlii_api.keywords_edge_list_topic2topic
canlii_api.keywords_edge_list_topic2topic (df, databaseId)
= 'csc-scc' #ID of database to be searched, (Supreme Court of Canada)
databaseId = 10 #max number of results
resultCount = '2021-01-01' # "date" is a YYYY-MM-DD
decision_date_after = '2021-12-31'
decision_date_before
= api_caller.list_decisions(databaseId=databaseId, descending=False, resultCount=resultCount, decision_date_after=decision_date_after, decision_date_before=decision_date_before) df
=databaseId) api_caller.keywords_edge_list_topic2topic(df, databaseId
databaseId | caseId | title | citation | decisionDate | keyword_1 | keyword_2 | |
---|---|---|---|---|---|---|---|
0 | csc-scc | 2021scc53 | Montréal (City) v. Deloitte Restructuring Inc. | 2021 SCC 53 (CanLII) | 2021-12-10 | Bankruptcy and insolvency | Pre‐post compensation |
1 | csc-scc | 2021scc53 | Montréal (City) v. Deloitte Restructuring Inc. | 2021 SCC 53 (CanLII) | 2021-12-10 | Bankruptcy and insolvency | Companies’ Creditors Arrangement Act, R.S.C. 1... |
2 | csc-scc | 2021scc53 | Montréal (City) v. Deloitte Restructuring Inc. | 2021 SCC 53 (CanLII) | 2021-12-10 | Bankruptcy and insolvency | Voluntary Reimbursement Program, CQLR, c. R‐2.... |
3 | csc-scc | 2021scc53 | Montréal (City) v. Deloitte Restructuring Inc. | 2021 SCC 53 (CanLII) | 2021-12-10 | Companies’ Creditors Arrangement Act, R.S.C. 1... | Pre‐post compensation |
4 | csc-scc | 2021scc53 | Montréal (City) v. Deloitte Restructuring Inc. | 2021 SCC 53 (CanLII) | 2021-12-10 | Companies’ Creditors Arrangement Act, R.S.C. 1... | Voluntary Reimbursement Program, CQLR, c. R‐2.... |
... | ... | ... | ... | ... | ... | ... | ... |
89 | csc-scc | 2021scc44 | H.M.B. Holdings Ltd. v. Antigua and Barbuda | 2021 SCC 44 (CanLII) | 2021-11-04 | Registration | Registration under Reciprocal Enforcement of J... |
90 | csc-scc | 2021scc44 | H.M.B. Holdings Ltd. v. Antigua and Barbuda | 2021 SCC 44 (CanLII) | 2021-11-04 | Registration | R.S.O. 1990, c. R.5, s. 3(b), (g). |
91 | csc-scc | 2021scc44 | H.M.B. Holdings Ltd. v. Antigua and Barbuda | 2021 SCC 44 (CanLII) | 2021-11-04 | Registration under Reciprocal Enforcement of J... | Foreign judgments |
92 | csc-scc | 2021scc44 | H.M.B. Holdings Ltd. v. Antigua and Barbuda | 2021 SCC 44 (CanLII) | 2021-11-04 | Registration under Reciprocal Enforcement of J... | Carrying on business |
93 | csc-scc | 2021scc44 | H.M.B. Holdings Ltd. v. Antigua and Barbuda | 2021 SCC 44 (CanLII) | 2021-11-04 | Registration under Reciprocal Enforcement of J... | R.S.O. 1990, c. R.5, s. 3(b), (g). |
94 rows × 7 columns
Saving and manipulating data
All program outputs are Pandas dataframes. To learn more about Pandas, check out the library’s introductory guide.
Basic functionality:
# save a datafram as a CSV file (to run in Excel, etc.)
'filename.csv')
df.to_csv(
# filter results
= df['title'].str.contains('R. v.')
filt df[filt]
caseId | title | citation | |
---|---|---|---|
1 | 2021scc52 | R. v. Lai | 2021 SCC 52 (CanLII) |
5 | 2021scc48 | R. v. Albashir | 2021 SCC 48 (CanLII) |
7 | 2021scc46 | R. v. Parranto | 2021 SCC 46 (CanLII) |
8 | 2021scc45 | R. v. Cowan | 2021 SCC 45 (CanLII) |