Analytics API

Analytics API Documentation

Analytics endpoints provide aggregated insights based on searches performed on the Lex Machina dataset.

Search Methods

You can search the Lex Machina dataset in two main ways:

There is one analytics endpoint for alerts, and one for queries.

Analytics Types

Based on your search, the analytics endpoint can return three types of analytics, all under the aggregation parameter in the response. You can ask for a different type of analytic using the analytic_type parameter under the endpoint input:

1. CaseCountByType

Returns the number of cases matched by the query or alert for each case type. Example:

{
  "caseType": "Patent",
  "count": 2
}

2. PartyCountByRole

Returns the number of cases matched by the query or alert in which a party appeared as a Plaintiff, Defendant, or Third Party, respectively. Example:

{
  "partyId": 33918414,
  "partyName": "Mobility Workx, LLC",
  "rolesAndCounts": [
    { "role": "Plaintiff", "count": 2 },
    { "role": "Defendant", "count": 0 },
    { "role": "Third Party", "count": 0 }
  ]
}

3. LawFirmCountByRole

Returns the number of cases matched by the query or alert in which a Law Firm represented a Plaintiff, Defendant, or Third Party, respectively. Example:

{
  "lawFirmId": 1549979,
  "lawFirmName": "Machat & Associates",
  "rolesAndCounts": [
    { "role": "Plaintiff", "count": 2 },
    { "role": "Defendant", "count": 0 },
    { "role": "Third Party", "count": 0 }
  ]
}