# CourtListener - US Federal Court Dockets & Opinions (`j0401/courtlistener-federal`) Actor

US federal court filings from CourtListener (Free Law Project, public domain): every federal docket and decided case, with court, case name, docket number, dates, judge, nature of suit, precedential status and citation count. Search by court, case name, date or suit type; look up one; or aggregate.

- **URL**: https://apify.com/j0401/courtlistener-federal.md
- **Developed by:** [Wenhao Yang](https://apify.com/j0401) (community)
- **Stats:** 2 total users, 1 monthly users, 12.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.03 / 1,000 courtlistener federal court records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 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

## CourtListener - US Federal Court Dockets & Opinions

Every US federal court filing in the Free Law Project's CourtListener bulk data,
straight from the public-domain source (**CC PDM 1.0**). **64.9 million federal
dockets** and **3.45 million decided cases**, across **397 federal courts** -
circuit and district, bankruptcy, and the specialty courts. Search by court,
case name, date or suit type; profile a judge's docket; or roll the caseload up
by court or year.

### Low cost

**From $0.00005 per record, down to $0.00003 at Gold.** Pay only for the
records you actually receive - the whole register stays queryable, you are
never billed for the scan behind it.

### What you get

Metadata for federal court filings - **not** full opinion text. Three corpora:

- **`corpus="dockets"`** (default) - 64.9M docket rows. Court, case name and
  short name, docket number (and its PACER case id), filing/termination/last-
  filing dates, nature of suit, cause, jury demand, jurisdiction type, the
  assigned and referred judges, the panel, the court appealed from, and the
  multi-district-litigation status.
- **`corpus="opinions"`** - 3.45M decided cases (opinion clusters). Court, case
  name, decision date, the deciding judges, nature of suit, precedential status
  and the citation count. Links to its docket by `docketId`.
- **`corpus="courts"`** - the 397-court federal reference: id, short and full
  name and jurisdiction code.

Every row carries `courtId` (e.g. `nysd`, `ca9`, `dcd`) plus the court's short
and full name, so a court filter and a court label come from the same row.

### The courts you can search

**397 federal courts**, by jurisdiction code:

- **127 appellate** (`F`) - the Supreme Court, the twelve regional circuits
  (`ca1`-`ca11` plus the D.C. Circuit `cadc`), and the Federal Circuit `cafc`.
- **125 district** (`FD`) - every US district court (`nysd`, `cacd`, `txsd`, ).
- **95 bankruptcy** (`FB`), **42 specialty** (`FS`: the Court of Federal Claims,
  Veterans Claims, the Tax Court, the trade and contract boards), and 8 `FBP`.

### Filter it

- **Court** - `court="nysd"` (S.D. New York), `"ca9"` (Ninth Circuit), `"dcd"`,
  `"txsd"`. Leave blank to search every federal court.
- **Case name** - `caseName="United States"`, `"Securities"`.
- **Nature of suit** - `natureOfSuit="Civil Rights"`, `"Contract"`, `"Patent"`,
  `"Habeas"`.
- **Date** - `dateFiledFrom="2024-01-01"`, `dateFiledTo="2024-12-31"`.
- **Judge** - `assignedTo="Liman"` (dockets) or `judges="BEEZER"` (opinions).
- **Precedential status** - `precedentialStatus="Published"` (opinions).
- **Jury demand** - `juryDemand="Plaintiff"` (dockets).

### Example inputs

**One district's recent filings** - S.D. New York.

```json
{ "court": "nysd", "maxResults": 100 }
```

**A circuit's published decisions** - the Ninth Circuit, precedential only.

```json
{ "corpus": "opinions", "court": "ca9", "precedentialStatus": "Published", "maxResults": 100 }
```

**One case by name in a court** - a case-name search.

```json
{ "court": "nysd", "caseName": "United States", "maxResults": 50 }
```

**A filing window** - everything filed in 2024.

```json
{ "dateFiledFrom": "2024-01-01", "dateFiledTo": "2024-12-31", "maxResults": 200 }
```

**How the caseload breaks down** - count per court.

```json
{ "mode": "aggregate", "groupBy": "court" }
```

### Or roll it up

Set `mode=aggregate` and get a count by **court**, **year**, **juryDemand**,
**jurisdictionType** (dockets) or **precedentialStatus** (opinions). Every group
comes back - this mode is not cut off by `maxResults`. (Nature of suit is a
free-text filter, not a group-by - it has thousands of distinct values.)

An empty run returns the counts by court from a small precomputed record; add
any filter and the actor switches to rows automatically.

### Then use it

- **Litigation research** - a court's filings by type, date or judge.
- **Docket monitoring** - pull a court's or a judge's recent cases and watch them.
- **Case-law analytics** - opinion volume and precedential mix by court and year.

### Example output

**One Ninth Circuit docket** (dockets corpus):

```json
{
 "platform": "courtlistener-federal",
 "source": "courtlistener-dockets",
 "corpus": "dockets",
 "mode": "rows",
 "groupKey": "",
 "groupCount": "",
 "groupBy": "",
 "docketId": "59910877",
 "opinionClusterId": "",
 "courtId": "ca9",
 "courtName": "Court of Appeals for the Ninth Circuit",
 "courtShortName": "Ninth Circuit",
 "courtJurisdiction": "F",
 "caseName": "Regency Air, LLC v. Stephen Dickson",
 "caseNameFull": "",
 "caseNameShort": "",
 "docketNumber": "20-72084",
 "docketNumberRaw": "20-72084",
 "pacerCaseId": "324035",
 "dateFiled": "2020-07-16",
 "dateTerminated": "2021-07-01",
 "dateLastFiling": "2021-08-23",
 "dateArgued": "2021-05-14",
 "natureOfSuit": "",
 "cause": "",
 "juryDemand": "",
 "jurisdictionType": "",
 "assignedTo": "",
 "referredTo": "",
 "panel": "",
 "appealFrom": "Federal Aviation Administration",
 "mdlStatus": "",
 "federalDnCaseType": "",
 "federalDnOfficeCode": "",
 "precedentialStatus": "",
 "citationCount": "",
 "judges": "",
 "disposition": "",
 "scdbId": "",
 "blocked": "f",
 "sourceUpdatedAt": "2026-10-08"
}
```

**`mode=aggregate`, `groupBy=court`** - one count row per court:

```
cacb                                          2,027,614
ilnb                                          1,626,612
txsd                                          1,506,357
azd                                           1,463,519
flmb                                          1,427,253
jpml                                          1,337,145
...
```

### Notes on the data, from the source

- **This is federal courts only.** The upstream bulk files also carry state
  appellate courts; those are filtered out at warm time using the `courts`
  taxonomy, so every row here is a US federal filing.
- **Metadata, not full text.** The opinion clauses carry the case's descriptors
  (judges, nature of suit, precedential status, citation count) - not the
  opinion body. That is deliberately the stable, citeable layer.
- **S.E.C. and PACER notes.** `docketNumber` is the court's own number; when a
  docket has been pulled from PACER, `pacerCaseId` carries PACER's id.
- **`dateFiled` is the filing date**, not the decision date; for an opinion use
  the opinions corpus, whose `dateFiled` is the decision date.
- **Court ids are CourtListener's** (`nysd`, `ca9`, `dcd`) - the same ids the
  `courts` corpus lists, so a `court` filter can be driven from that lookup.
- **The data is public domain (CC PDM 1.0)** via the Free Law Project /
  CourtListener.
- **`sourceUpdatedAt` is the warm build date**; the register is rebuilt from the
  monthly bulk export.

# Actor input Schema

## `corpus` (type: `string`):

dockets = one row per federal court filing (default). opinions = one row per decided case (an opinion cluster, metadata only). courts = the federal court reference list (397 courts).

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

CourtListener court id, e.g. 'nysd' (S.D. New York), 'ca9' (Ninth Circuit), 'dcd' (D.D.C.), 'txsd' (case-insensitive; must be a real id from corpus=courts). Pins a single court's shard. Blank = search all federal courts.

## `caseName` (type: `string`):

Substring match on the case name, e.g. 'United States v.', 'Securities'. Blank = any.

## `natureOfSuit` (type: `string`):

Substring match on the nature-of-suit classification, e.g. 'Contract', 'Civil Rights', 'Patent', 'Habeas'. Blank = any.

## `juryDemand` (type: `string`):

Who demanded a jury. Dockets corpus only. Blank = any.

## `assignedTo` (type: `string`):

Substring match on the assigned judge. Dockets corpus only. Blank = any.

## `judges` (type: `string`):

Substring match on the deciding panel / judge. Opinions corpus only. Blank = any.

## `precedentialStatus` (type: `string`):

Whether the decision is precedential. Opinions corpus only. Blank = any.

## `dateFiledFrom` (type: `string`):

Earliest filing date, YYYY-MM-DD. Blank = any.

## `dateFiledTo` (type: `string`):

Latest filing date, YYYY-MM-DD. Blank = any.

## `mode` (type: `string`):

aggregate = one count row per group (default for an empty run; served from a precomputed record). rows = records matching your filters (auto-selected when any filter is set).

## `groupBy` (type: `string`):

Which dimension to aggregate over (mode=aggregate). Blank = court. Clear it when switching corpus - not every dimension exists on every corpus.

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

Cap the number of records pushed in rows mode (0 = default 50; up to 2,000 per run). Each record is metered individually. Aggregate mode returns every group.

## Actor input object example

```json
{
  "corpus": "dockets",
  "court": "",
  "caseName": "",
  "natureOfSuit": "",
  "juryDemand": "",
  "assignedTo": "",
  "judges": "",
  "precedentialStatus": "",
  "dateFiledFrom": "",
  "dateFiledTo": "",
  "mode": "aggregate",
  "groupBy": "",
  "maxResults": 50
}
```

# Actor output Schema

## `recordsUrl` (type: `string`):

US federal court docket and opinion records - as JSON

## `datasetUrl` (type: `string`):

No description

## `runUrl` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("j0401/courtlistener-federal").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("j0401/courtlistener-federal").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 '{}' |
apify call j0401/courtlistener-federal --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,j0401/courtlistener-federal"
        }
    }
}
```

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/4cXeB5sphCUzzPBkd/builds/okyvrIgH8thI6cYgO/openapi.json
