Querying Appeals Cases

Page content

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:

  • “magistrates” does not exist in appeals queries
  • “remedies” does not exist in appeals queries
  • “findings” does not exist in appeals queries
  • “patents” does not exist in appeals queries
  • “mdl” does not exist in appeals queries

Query Criteria In Appeals but Not in District

  • The participant criteria differ from federal district. For lawFirms, attorneys and parties the following particpant role criteria exist:

    • include
    • exclude
    • includeAppellant
    • excludeAppellant
    • includeAppellee
    • excludeAppellee
    • includeRespondent
    • excludeRespondent
    • includeThirdParty
    • excludeThirdParty
    • includePetitionerMovant
    • excludePetitionerMovant
  • In appeals queries, the originatingVenues can be included/excluded. The list of valid venue types is available at the endpoint /list-originating-venues/FederalAppeals

  • There is a top level criteria named originatingCases. It can contain a number of other criteria that describe the original case being appealed.

    • includeDistrictCaseIds or excludeDistrictCaseIds are for directly specifying the cases being appealed by Lex Machina case ID.
    • includeOriginatingJudges has a field named districtFederalJudges that has an include and exclude for federal judge ID.
  • Appellate cases can be queried by resolution as the other types of queries. The list of value pairs can be obtained from the endpoint /list-case-resolutions/FederalAppeals . It should be noted that the tuple of “summary” and “specific” are considered a single criterion and both must be included when used.

  • Appellate cases can be queried by the results of a Supreme Court decision with supremeCourtDecisions, which has include and exclude fields. The list of valid values are available at the endpoint /list-supreme-court-decisions/FederalAppeals

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!