Authenticate using the OAuth2 client credentials flow to obtain a bearer token from the Lex Machina authorization endpoint
Use the /search-law-firms/ endpoint to resolve the target firm's Lex Machina firmId by querying with the firm's name string
POST to the /query-appeals-cases/ endpoint with a JSON body specifying the firmId and firm role (appellant_counsel or appellee_counsel) and the target circuit courts
Retrieve the returned caseIds and query the analytics endpoints for resolution type breakdowns, disposition details, and case duration statistics
Aggregate the results client-side to calculate win rate percentages and median resolution times per circuit, accounting for the distinction between affirmed, reversed, remanded, and dismissed outcomes
Known gotchas
Lex Machina's appeals court data covers federal circuit courts; do not conflate this with state appellate court data, which requires a separate data agreement
Win/loss attribution depends on how Lex Machina defines the prevailing party for each resolution type; review the API documentation's outcome taxonomy before drawing conclusions
Large firm queries returning thousands of cases should be paginated using the cursor mechanism; requesting all cases in a single call may time out or hit result-set limits
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