Obtain API credentials (client ID and secret) from the Lex Machina Developer Portal and exchange them for a bearer token via the documented OAuth2 client credentials flow
Include the token in all requests as 'Authorization: Bearer YOUR_TOKEN'
POST to the /query-district-cases/ endpoint with a JSON body specifying the party name, party type as 'defendant', and any additional filters such as case status or nature of suit code
The response returns a case list with caseIds; fetch detailed analytics for each case or use the aggregate analytics endpoints to get outcome statistics, damages, and timing data
Use the /search-parties/ endpoint first to resolve the exact Lex Machina party ID for the target company before building the case query
Known gotchas
Lex Machina is a LexisNexis product requiring a paid subscription; API access requires a separate enterprise agreement
Party name resolution via /search-parties/ is a prerequisite for accurate queries because a company may appear under multiple name variants in court records
Case data covers federal courts; state court coverage via Lex Machina is more limited and may require a separate data agreement
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp