Querying Appeals Cases

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.

The query endpoint for appeals is /query-appeals-cases and this is a POST request. The body of the POST will be a JSON structure of a form similar to this:


{
	"courts": {
		"include": [
            "U.S. Court of Appeals for the First Circuit"
            ]
	},
	"caseStatus": "Terminated",
	"dates": {
		"filed": {"onOrBefore": "2020-01-01"},
		"terminated": {"onOrAfter": "2021-01-01"}
	},
	"page": 1,
	"pageSize": 50
}

The results of this query will be a JSON object containing a “cases” field with maps to an arry of objects. These object will contain a “appealsCaseId” field and an “url” field. In order to get a full picture of these cases, they will need to be looked up individually with the /appeals-cases/{case_id} endpoint.

{
    "cases": [
        {
            "url": "https://api.lexmachina.com/appeals-cases/2005584378",
            "appealsCaseId": 2005584378
        },
        {
            "url": "https://api.lexmachina.com/appeals-cases/2005591016",
            "appealsCaseId": 2005591016
        }
    ]
}

Specifying Query Criteria

For appellate queries, courts can be included and excluded just as in federal district queries. The list of valid courts is available at the endpoint /list-courts/FederalAppeals .

Query Criteria Not in Appeals

The following criteria are valid in district queries but not in appeals queries:

Query Criteria In Appeals but Not in District

Example Queries

To find all cases that began and ended in calendar 2020 and were reversed by the Supreme Court the full body of the POST would be:

{
  "supremeCourtDecisions": {
    "include": [
        "Reversed by SCOTUS"
    ]
  },

	"dates": {
		"filed": {
			"onOrAfter": "2020-01-01"
		},
		"terminated": {
			"onOrBefore": "2020-12-31"
		}
  	}
}

To find all appeals where attorney 43337 represents any party:

{
  "attorneys": {
    "include": [
        43337
    ]
  }
}

To find all appeals where attorney 43337 represents the appellee:

{
  "attorneys": {
    "includeAppellee": [
        43337
    ]
  }
}

To find all appeals where attorney 43337 represents the appellant:

{
  "attorneys": {
    "includeAppellant": [
        43337
    ]
  }
}

Conclusion

With the addition of appeals data, this expands the reach of what can be achieved with the Lex Machina API. Federal district, state and appeals courts each have their own individual criteria because each of these courts have concepts that don’t exist in the other courts. While many of the concepts and criteria are common amongst all three (dates, much of the participant roles) with a little practice each of the queries will make perfect sense.

Good luck and much success querying apeals data!