# Court Opinion & Docket Search — CourtListener (`m_ctim/court-opinion-search`) Actor

Search US federal court opinions and RECAP dockets by keyword, court, and filing date, via the official CourtListener API (Free Law Project).

- **URL**: https://apify.com/m\_ctim/court-opinion-search.md
- **Developed by:** [Timothy Kelvin](https://apify.com/m_ctim) (community)
- **Categories:** News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Court Opinion & Docket Search — CourtListener

Search US federal court opinions or RECAP dockets by keyword, court, and
filing date. Built on the official CourtListener API from the Free Law
Project, the same non-profit source that powers most legal-tech case law
search.

Built for legal researchers, litigation-support and collections teams,
journalists covering court cases, and anyone doing due diligence that needs
to check if a person or company has been party to federal litigation.

### Input

```json
{
  "query": "antitrust",
  "resultType": "opinions",
  "court": "scotus",
  "filedAfter": "2020-01-01",
  "maxResults": 20
}
```

| Field | Type | Description |
|---|---|---|
| `query` | string | Keyword search (case name, party, or legal topic). |
| `resultType` | string | `"opinions"` (case opinions) or `"recap_dockets"` (federal case filings). |
| `court` | string | Optional CourtListener court ID, e.g. `"scotus"`, `"ca9"`. |
| `filedAfter` / `filedBefore` | string | Optional date range filter (`YYYY-MM-DD`). |
| `maxResults` | integer | Max results to return (default 20). |
| `apiToken` | string | Optional. Your own free CourtListener API token, for a higher rate limit than anonymous access. |

### Output

```json
{
  "resultType": "opinion",
  "caseName": "Trump v. Slaughter",
  "court": "Supreme Court of the United States",
  "courtId": "scotus",
  "docketNumber": "25-332",
  "dateFiled": "2026-06-29",
  "citation": [],
  "citeCount": 0,
  "judge": "John G. Roberts",
  "snippet": "...",
  "downloadUrl": "https://www.supremecourt.gov/opinions/25pdf/25-332_qn12.pdf",
  "absoluteUrl": "https://www.courtlistener.com/opinion/10881681/trump-v-slaughter/"
}
```

### How it works

Direct calls to CourtListener's official public REST API
(`courtlistener.com/api/rest/v4/search/`). Works anonymously for casual use;
CourtListener's own rate limits apply, higher volume needs your own free API
token. No proxy, no scraping.

### Pricing note

Billed per **search**, not per result returned — a broad search that returns
200 results costs the same as one that returns 2.

### Related products

- [Insider Trading Alert](https://github.com/timmKal01/insider-trading-alert) — SEC Form 4 executive buy/sell signals
- [FINRA BrokerCheck Lookup](https://github.com/timmKal01/finra-brokercheck-lookup) — broker/firm registration and disciplinary history

# Actor input Schema

## `query` (type: `string`):

Keyword(s) to search for, e.g. a case name, party, or legal topic.

## `resultType` (type: `string`):

Search case opinions, or RECAP federal case dockets/filings.

## `court` (type: `string`):

CourtListener court ID, e.g. "scotus" (Supreme Court), "ca9" (9th Circuit). Leave blank for all courts.

## `filedAfter` (type: `string`):

Only include results filed on or after this date (YYYY-MM-DD).

## `filedBefore` (type: `string`):

Only include results filed on or before this date (YYYY-MM-DD).

## `maxResults` (type: `integer`):

Maximum number of results to return for this search.

## `apiToken` (type: `string`):

Optional. CourtListener works anonymously at low volume; supplying your own free CourtListener API token raises the rate limit. Get one at courtlistener.com/profile/api-token/.

## Actor input object example

```json
{
  "query": "antitrust",
  "resultType": "opinions",
  "maxResults": 20
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "antitrust"
};

// Run the Actor and wait for it to finish
const run = await client.actor("m_ctim/court-opinion-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "query": "antitrust" }

# Run the Actor and wait for it to finish
run = client.actor("m_ctim/court-opinion-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "antitrust"
}' |
apify call m_ctim/court-opinion-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,m_ctim/court-opinion-search"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/SDWr6Ja5P6dWg1KLh/builds/bb3xnWzpU66zGwd3V/openapi.json
