Getting and Using a Bearer Token

Jesse Carver
Getting a Bearer Token To get a short-lived bearer token send in the parameters of client_id, and client_secret as form URL encoded parameters with no message body. This requires setting the Content-Type header appropriately. Example using curl curl -i -X POST 'https://api.lexmachina.com/oauth2/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'client_id=XXXXX' \ --data-urlencode 'client_secret=XXXXX' {"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0Ijp7ImNsaWVudF9pZCI6IjU1MGM3MTQ0Yjg3NzJjOWY0MzUxNDk3ZjcxM2E5MzBiIiwiYXBwX2lkIjoyMjUsInVzZXJfaWQiOjU4NzkzfSwidHlwZSI6ImFjY2VzcyIsImV4cCI6MTczNzY3MzgzMCwiaWF0IjoxNzM3NjcwMjMwLCJqdGkiOiI1OWVhY2RjNi0wNzE2LTQ2NmUtOTU1Ni1lZGQxM2MzZWZkYjYifQ.CctgWu9o-afoz6jLbS_oHrZg7oljW4Kcv5x8o3B98nA","token_type":"bearer","expires_in":"3600"} Using a Bearer Token Then to use the bearer token include it in an Authorization header prefixed with Bearer

Getting Started with Postman

Jesse Carver
Introduction It can be helpful for learning an API to access via a tool such as Postman in order to explore the endpoints and understand how it all works. In this guide, you will learn how to get the entire suite of Lex Machina API endpoints configured and running with automatic authentication. The goal is to accomplish this in five minutes or less. Pre-requisites You need to have created an application and noted the client_id and client_secret as per these directions.

Overview of the Lex Machina Data API

Jesse Carver
Lex Machina API Case and Entity Data The API is built to provide data on cases and the entities relevant to cases like judges, law firms, and parties. A set of cases with relevant metadata, such as specific types and amounts of damages, can then provide a dataset for direct consumption or analytics. Case The core data structure of the API, this is a collection of everything Lex Machina knows about a single case.

Querying Appeals Cases

Jesse Carver
Creating Appeals Queries for the Lex Machina API Overview The Lex Machina API now allows for querying of appelate case data. It works similarly to the federal district queries and the state queries. For the purposes of this article, only the parts that differ from federal district queries will be discussed. For querying on the participants and such topics, please refer to the district query article. That will also explain the basics of operations such as the include and exclude, the date operators, etc.

Querying District Cases

Jesse Carver
Creating District Queries for the Lex Machina API Overview The Lex Machina data set is a highly curated and normalized set of federal district cases. As such, there are many attributes and participants on which you can query it. This flexibility brings with it some complexity. In this article, we will unravel this complexity, and enable you to enrich your applications through Lex Machina’s API. The query endpoint is /query-district-cases and this is a POST request.

Querying State Cases

Jesse Carver
Creating State Queries for the Lex Machina API Overview The Lex Machina API now allows for querying of some state case data as of general availability. In many ways it works the same as the federal district queries. For the purposes of this article, only the parts that differ will be discussed. For querying on the participants and such topics, please refer to the district query article. That will also explain the basics of operations such as the include and exclude, the date operators, etc.

Terms Of Use

Jesse Carver
Terms of Use (October 1, 2018) These Terms of Use (“Terms of Use”) are for use of the services (“Services”) described at https://lexmachina.com and located at https://law.lexmachina.com. NOTICE: THESE TERMS OF USE APPLY TO YOUR USE OF THE LEX MACHINA SERVICES IF YOU ARE AN AUTHORIZED USER IN AN ORGANIZATION THAT HAS ACCEPTED THESE TERMS IN WRITING. The Terms of Use listed below govern the use of the Services provided by Lex Machina, Inc.