NodeJS

The Strategy of Scripting with the Lex Machina API

Writing scripts with the Lex Machina API have a recognizable design pattern

I have written a number of scripts that access the Lex Machina API. Some of these were for testing, some for demo and some for proof of concepts for current and potential customers. As I look at the structure of them, almost of all of them fit into a distinct pattern. The logic I have authored has these phases: Optional search (input text, search for judge, party, etc) or possibly looping over a list (all state or federal district courts) Using either that input and/or hardcoded values, do a query for cases Take the resulting list of cases and look them up one by one Extract values from individual cases for use.

Judgments by Day of the Week

An example script for judgments by day of the week, inspired by a conversation at CLOC

Recently some of the Lex Machina product team went to Las Vegas to exhibit at the CLOC Global Institute conference. It was an interesting event at which we talked to a number of current and potential customers. One idea that was thrown out almost as a joke was the idea of using our API to determine for a given judge how they ruled on the day of the week. Of course, I took this as a challenge.