Free Law Ferret

Frank Bennett

This is the code repository for Free Law Ferret, a Firefox plugin that scrapes US case references from arbitrary Web pages, and presents a selection list of cases to retrieve from one or more online services. The parser used by the Ferret is a JavaScript port of Python code developed by the CourtListener project (see particularly the files,, and

An installable plugin containing the latest code is available here. You will need to have either Zotero or MLZ installed to run in (MLZ is preferred, because it offers better support for legal referencing).

An open wiki with test references is available here. Feel free to add items to the list of problem cites, specific information about breakage is very useful for development.

You can run the parser standalone for testing purposes by installing ExecuteJS in Firefox, opening ExecuteJS, pasting in the code from chrome/content/ferret.js, and adding something like this at the bottom:

var cites = ferret.get_citations("A v. B, 123 A.2d 456 (1988)");

You're on your own for examining the output: but if you have Zotero installed, you can use "Zotero.debug()" to send things to the console log.

The return value is a list of citation objects with relevant data:

  "reporter": "Reporter Name",
  "volume": "Volume Number",
  "page": "Page Number",
  "year": "Year of Decision (from cite)",
  "court": "Court of Decision (free-text string, from cite)",
  "plaintiff": "Plaintiff Name",
  "defendant": "Defendant Name (if present in cite)",
  "extra": "(mostly associated parallel references, as free text)",
  "mlz_jurisdiction": "Jurisdiction Code (such as 'us;la')"

Suggestions in the tracker and code contributions by pull request are more than welcome.