GnistAI GnistAI
Log in

Court Listener

U.S. court opinions, oral arguments, and judicial records.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 6 tools tools 6 6 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Legal

Data source: CourtListener / Free Law Project

MCP Endpoint (Streamable HTTP) https://context.gnist.ai/mcp/court-listener/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (6)

search_opinions

Search US court opinions by keyword, phrase, or party name.

Searches 60M+ published federal and state court opinions via CourtListener.

Args:
query: Search query — keyword, phrase, party name, or legal concept
(e.g. "Apple Samsung patent", "qualified immunity", "securities fraud").
Use quotes for exact phrase matching (e.g. '"tortious interference"').
court: Jurisdiction filter — CourtListener court code. Common values:
"scotus" (Supreme Court), "ca9" (9th Circuit), "ca2" (2nd Circuit),
"cadc" (DC Circuit), "dcd" (DC District), "nysd" (SDNY), "cand" (ND Cal).
If omitted, searches all federal and state courts.
date_from: Return only opinions filed on or after this date (YYYY-MM-DD).
date_to: Return only opinions filed on or before this date (YYYY-MM-DD).
limit: Maximum results to return (1–100, default 20).

Returns:
List of matching opinion clusters with case name, court, date, citation, and text snippet.

ParameterTypeRequiredDescription
querystringrequiredSearch query — keyword, phrase, party name, or legal concept (e.g. "Apple Samsung patent", "qualified immunity", "securities fraud"). Use quotes for exact phrase matching (e.g. '"tortious in...
courtanyoptionalJurisdiction filter — CourtListener court code. Common values: "scotus" (Supreme Court), "ca9" (9th Circuit), "ca2" (2nd Circuit), "cadc" (DC Circuit), "dcd" (DC District), "nysd" (SDNY...
date_fromanyoptionalReturn only opinions filed on or after this date (YYYY-MM-DD).
date_toanyoptionalReturn only opinions filed on or before this date (YYYY-MM-DD).
limitintegeroptionalMaximum results to return (1–100, default 20). (default: 20)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_opinions",
    "arguments": {
      "query": "example"
    }
  }
}
get_opinion

Retrieve full details for a court opinion cluster by ID.

Returns the full opinion text, citation data, judge, and case metadata.
Use cluster_id from search_opinions results.

Args:
cluster_id: CourtListener opinion cluster ID (from search_opinions results).

Returns:
Full opinion record with case metadata and opinion text (capped at 2000 chars each).
Returns an error dict if the opinion is not found.

ParameterTypeRequiredDescription
cluster_idintegerrequiredCourtListener opinion cluster ID (from search_opinions results).
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_opinion",
    "arguments": {
      "cluster_id": 1
    }
  }
}
search_dockets

Search court dockets by party name to find litigation history.

Searches PACER/RECAP dockets for cases where a named entity appears as a party.
Useful for due diligence: mapping a company's full litigation history.

Args:
party_name: Party name to search for — company, person, or organization
(e.g. "Theranos", "Elizabeth Holmes", "Meta Platforms").
Exact phrase matching is applied automatically.
court: Jurisdiction filter — CourtListener court code (e.g. "ca9", "nysd").
If omitted, searches all courts.
year_from: Include only cases filed in this year or later.
year_to: Include only cases filed in this year or earlier.
limit: Maximum results to return (1–100, default 20).

Returns:
List of matching dockets with case name, court, date, docket number, and cause.

ParameterTypeRequiredDescription
party_namestringrequiredParty name to search for — company, person, or organization (e.g. "Theranos", "Elizabeth Holmes", "Meta Platforms"). Exact phrase matching is applied automatically.
courtanyoptionalJurisdiction filter — CourtListener court code (e.g. "ca9", "nysd"). If omitted, searches all courts.
year_fromanyoptionalInclude only cases filed in this year or later.
year_toanyoptionalInclude only cases filed in this year or earlier.
limitintegeroptionalMaximum results to return (1–100, default 20). (default: 20)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_dockets",
    "arguments": {
      "party_name": "123456789"
    }
  }
}
get_docket

Retrieve full details for a court docket by ID.

Returns case metadata, parties (plaintiffs and defendants), and filing info.
Use docket_id from search_dockets results.

Args:
docket_id: CourtListener docket ID (from search_dockets results).

Returns:
Full docket record with parties, cause, nature of suit, and key dates.
Returns an error dict if the docket is not found.

ParameterTypeRequiredDescription
docket_idintegerrequiredCourtListener docket ID (from search_dockets results).
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_docket",
    "arguments": {
      "docket_id": 1
    }
  }
}
get_citations

Retrieve the citation graph for a court opinion.

Returns two lists:
- cites: opinions that this opinion cites (precedents relied upon)
- cited_by: opinions that later cite this opinion (subsequent authority)

Use cluster_id from search_opinions results. Results are capped at 50 per direction.

Args:
cluster_id: CourtListener opinion cluster ID.

Returns:
Citation graph with outbound (cites) and inbound (cited_by) opinion references.

ParameterTypeRequiredDescription
cluster_idintegerrequiredCourtListener opinion cluster ID.
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_citations",
    "arguments": {
      "cluster_id": 1
    }
  }
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "report_feedback",
    "arguments": {
      "feedback": "example"
    }
  }
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/mcp/court-listener/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_opinions", "arguments": {"query": "example"}}}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/court-listener/",
    headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_opinions",
    "arguments": {
      "query": "example"
    }
  }
},
)
print(resp.json())

Related Toolkits (Legal)

Resources