Node

Using the Sandbox API with Client Libraries

Use Lex Machina client libraries with our Sandbox API

Lex Machina now not only has an API to allow automated access to our data but we also have a Sandbox API that allows prospective customers to test out the system with a subset of real data. For those potential users who are testing out the system to see if it meets needs, you can absolutely use the client libraries we have - python and node/JavaScript - to access the Sandbox.

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.

Lex Machina Client Libraries

You can install client libraries for Python and JavaScript to simplify accessing the Lex Machina API

As of now, the Lex Machina API has client libraries published for both Node and Python. In this article, I will walk through the installation, configuration and use of both. Installation Both libraries are published to their respective package directories. Node The Node package is published to npm. To install it in your project directory use this command: npm install @lexmachina/lexmachina-client Python The Python package is published to PyPi. To install it in your Python environment use this command: