# CourtListener API

> CourtListener returns US court opinions and federal RECAP dockets as a workflow and API.

CourtListener searches US court opinions by keywords or case name, with optional court, decision dates, and sorting; it requires a query. CourtListener retrieves an opinion by case name, citation, or CourtListener link, returning opinion text and case details. CourtListener searches federal RECAP Archive dockets by person or company, with optional court and filing dates.

- Page: https://fous.com/workflows/courtlistener
- Handle: `@courtlistener`
- Category: [Legal](https://fous.com/workflows/category/legal)
- Source website: https://courtlistener.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with CourtListener.

## Methods

### Get court opinion

Operation `get_court_opinion`, version 1. 1 credit per call.

Get a US court opinion by case name, citation, or CourtListener link, with its text, citations, judges, and citing-case count. Full text requires an accessible text-based opinion PDF; image-only or unavailable documents cannot be transcribed.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `case` | string | yes | `"576 U.S. 644"` | Case name, citation, or CourtListener opinion link. Example: Obergefell v. Hodges. |
| `court` | string | no | `"Supreme Court of the United States"` | Court name to distinguish matching cases. Example: Supreme Court of the United States. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "case"
  ],
  "properties": {
    "case": {
      "type": "string",
      "description": "Case name, citation, or CourtListener opinion link. Example: Obergefell v. Hodges.",
      "examples": [
        "576 U.S. 644",
        "Obergefell v. Hodges",
        "https://www.courtlistener.com/opinion/2812209/obergefell-v-hodges/"
      ]
    },
    "court": {
      "type": "string",
      "default": "",
      "description": "Court name to distinguish matching cases. Example: Supreme Court of the United States.",
      "examples": [
        "Supreme Court of the United States"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "case": "576 U.S. 644"
    },
    {
      "case": "Obergefell v. Hodges"
    },
    {
      "case": "https://www.courtlistener.com/opinion/2812209/obergefell-v-hodges/"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `court` | string or null |  |  |
| `opinions` | array |  |  |
| `opinions[].type` | string |  |  |
| `opinions[].author` | string or null |  |  |
| `case_name` | string |  |  |
| `citations` | array |  |  |
| `truncated` | boolean |  |  |
| `author_judge` | string or null |  |  |
| `date_decided` | string or null |  |  |
| `other_judges` | array |  |  |
| `docket_number` | string or null |  |  |
| `lead_opinion_text` | string |  |  |
| `original_pdf_link` | string or null |  |  |
| `citing_cases_count` | integer |  |  |
| `courtlistener_link` | string |  |  |

### Search case law

Operation `search_case_law`, version 1. 1 credit per call.

Search CourtListener US court opinions by keywords or case name, with optional court, decision dates, and sorting. Court names select one court; a state name selects its highest court. Results follow CourtListener’s published-opinion default.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `page` | integer | no | `2` | Result page to start with, for example 2. Each page contains up to 20 cases. |
| `sort` | string | no | `"most_cited"` | Order results by relevance, newest, oldest, or most cited; for example newest. |
| `court` | string | no | `"Supreme Court"` | Court name, such as Supreme Court, 9th Circuit, or California; leave blank for all courts. |
| `query` | string | yes | `"Miranda v. Arizona"` | Keywords or a case name, for example Miranda v. Arizona. |
| `max_results` | integer | no | `5` | Maximum cases to return, for example 20 (up to 50). |
| `decided_after` | string | no | `"1966-01-01"` | Earliest decision date, for example 2015-01-01. |
| `decided_before` | string | no | `"1966-12-31"` | Latest decision date, for example 2020-12-31. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "page": {
      "type": "integer",
      "default": 1,
      "minimum": 1,
      "description": "Result page to start with, for example 2. Each page contains up to 20 cases.",
      "x-fous-developer": true,
      "examples": [
        2
      ]
    },
    "sort": {
      "enum": [
        "relevance",
        "newest",
        "oldest",
        "most_cited"
      ],
      "type": "string",
      "default": "relevance",
      "description": "Order results by relevance, newest, oldest, or most cited; for example newest.",
      "examples": [
        "most_cited",
        "newest",
        "oldest"
      ]
    },
    "court": {
      "type": "string",
      "default": "",
      "description": "Court name, such as Supreme Court, 9th Circuit, or California; leave blank for all courts.",
      "examples": [
        "Supreme Court",
        "9th Circuit",
        "California"
      ]
    },
    "query": {
      "type": "string",
      "description": "Keywords or a case name, for example Miranda v. Arizona.",
      "examples": [
        "Miranda v. Arizona",
        "fair use software",
        "zzzznoexistence90abcdef"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum cases to return, for example 20 (up to 50).",
      "x-fous-developer": true,
      "examples": [
        5,
        22,
        2
      ]
    },
    "decided_after": {
      "type": "string",
      "format": "date",
      "description": "Earliest decision date, for example 2015-01-01.",
      "examples": [
        "1966-01-01"
      ]
    },
    "decided_before": {
      "type": "string",
      "format": "date",
      "description": "Latest decision date, for example 2020-12-31.",
      "examples": [
        "1966-12-31"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "sort": "most_cited",
      "court": "Supreme Court",
      "query": "Miranda v. Arizona",
      "max_results": 5,
      "decided_after": "1966-01-01",
      "decided_before": "1966-12-31"
    },
    {
      "page": 2,
      "sort": "newest",
      "court": "9th Circuit",
      "query": "fair use software",
      "max_results": 22
    },
    {
      "query": "zzzznoexistence90abcdef",
      "max_results": 2
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `cases` | array |  | Matching court opinions. |
| `cases[].link` | string | `"https://www.courtlistener.com/opinion/107252/miranda-v-arizona/"` | CourtListener case page. |
| `cases[].court` | string or null | `"Supreme Court of the United States"` | Deciding court. |
| `cases[].judges` | string or null | `"Warren, Clark, Stewart, White, Harlan"` | Judges as listed in the opinion. |
| `cases[].snippet` | string or null | `"anything that he says may be used against him. Escobedo v. Illinois, 378 U. S. 478, 490-491 (1964). Now, the"` | Plain-text excerpt of matching opinion text. |
| `cases[].case_name` | string or null | `"Miranda v. Arizona"` | Name of the case. |
| `cases[].citations` | array |  | Reported citations. |
| `cases[].cluster_id` | integer or null | `107252` | CourtListener opinion cluster ID. |
| `cases[].times_cited` | integer or null | `58585` | Number of citations by other opinions. |
| `cases[].date_decided` | string or null | `"1966-06-13"` | Decision date (YYYY-MM-DD). |
| `cases[].docket_number` | string or null | `"759"` | Docket number. |
| `cases[].precedential_status` | string or null | `"Published"` | Published or other status reported for this opinion. |

**Example input**

```json
{
  "sort": "most_cited",
  "court": "Supreme Court",
  "query": "Miranda v. Arizona",
  "max_results": 5,
  "decided_after": "1966-01-01",
  "decided_before": "1966-12-31"
}
```

**Example output**

```json
{
  "cases": [
    {
      "link": "https://www.courtlistener.com/opinion/107252/miranda-v-arizona/",
      "court": "Supreme Court of the United States",
      "judges": "Warren, Clark, Stewart, White, Harlan",
      "snippet": "anything that he says may be used against him. Escobedo v. Illinois, 378 U. S. 478, 490-491 (1964). Now, the",
      "case_name": "Miranda v. Arizona",
      "citations": [
        "16 L. Ed. 2d 694",
        "86 S. Ct. 1602"
      ],
      "cluster_id": 107252,
      "times_cited": 58585,
      "date_decided": "1966-06-13",
      "docket_number": "759",
      "precedential_status": "Published"
    },
    {
      "link": "https://www.courtlistener.com/opinion/107262/schmerber-v-california/",
      "court": "Supreme Court of the United States",
      "judges": "Foetas, Black, Brennan, Harlan, Warren, Douglas, Stewart",
      "snippet": "opinion and that of Mr. Justice White in Miranda v. Arizona, ante, pp. 504, 526.",
      "case_name": "Schmerber v. California",
      "citations": [
        "16 L. Ed. 2d 908",
        "86 S. Ct. 1826"
      ],
      "cluster_id": 107262,
      "times_cited": 6083,
      "date_decided": "1966-06-20",
      "docket_number": "658",
      "precedential_status": "Published"
    }
  ]
}
```

### Search federal dockets

Operation `search_federal_dockets`, version 1. 1 credit per call.

Find federal RECAP dockets involving a named person or company, newest filed first. Only dockets in the RECAP Archive appear; recent entry previews are limited to entries shown in public search results.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `page` | integer | no | `2` | Page of cases, e.g. 2. |
| `court` | string | no | `"Delaware bankruptcy"` | Federal court in words, e.g. Northern District of California or Delaware bankruptcy. All federal courts if omitted. |
| `party` | string | yes | `"Meta Platforms"` | Company or person to find, e.g. Tesla. |
| `filed_after` | string | no | `"2024-01-01"` | Earliest filing date, e.g. 2024-01-01. |
| `max_results` | integer | no | `3` | Cases to return, e.g. 20. |
| `filed_before` | string | no | `"2024-12-31"` | Latest filing date, e.g. 2024-12-31. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "party"
  ],
  "properties": {
    "page": {
      "type": "integer",
      "default": 1,
      "maximum": 10,
      "minimum": 1,
      "description": "Page of cases, e.g. 2.",
      "x-fous-developer": true,
      "examples": [
        2
      ]
    },
    "court": {
      "type": "string",
      "default": "",
      "description": "Federal court in words, e.g. Northern District of California or Delaware bankruptcy. All federal courts if omitted.",
      "examples": [
        "Delaware bankruptcy",
        "Northern District of California"
      ]
    },
    "party": {
      "type": "string",
      "description": "Company or person to find, e.g. Tesla.",
      "examples": [
        "Meta Platforms",
        "Tesla",
        "zzzxxyy_nonexistent_corporation_9273"
      ]
    },
    "filed_after": {
      "type": "string",
      "format": "date",
      "description": "Earliest filing date, e.g. 2024-01-01.",
      "examples": [
        "2024-01-01",
        "2025-01-01"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "description": "Cases to return, e.g. 20.",
      "x-fous-developer": true,
      "examples": [
        3,
        25
      ]
    },
    "filed_before": {
      "type": "string",
      "format": "date",
      "description": "Latest filing date, e.g. 2024-12-31.",
      "examples": [
        "2024-12-31",
        "2025-12-31"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "court": "Delaware bankruptcy",
      "party": "Meta Platforms",
      "max_results": 3
    },
    {
      "court": "Northern District of California",
      "party": "Tesla",
      "filed_after": "2024-01-01",
      "max_results": 3,
      "filed_before": "2024-12-31"
    },
    {
      "party": "zzzxxyy_nonexistent_corporation_9273"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `cases` | array |  | Federal cases found in the RECAP Archive. |
| `cases[].cause` | string or null | `"28:1332 Diversity-Breach of Contract"` |  |
| `cases[].court` | string or null | `"United States Bankruptcy Court, D. Delaware"` |  |
| `cases[].status` | string | `"open"` |  |
| `cases[].case_name` | string or null | `"America's Gardening Resource, Inc. v. Meta Platforms, Inc."` |  |
| `cases[].date_filed` | string | `"2026-02-02"` |  |
| `cases[].docket_link` | string or null | `"https://www.courtlistener.com/docket/72220329/americas-gardening-resource-inc-v-meta-platforms-inc/"` |  |
| `cases[].docket_number` | string or null | `"26-50033"` |  |
| `cases[].assigned_judge` | string or null | `"Brendan L. Shannon"` |  |
| `cases[].nature_of_suit` | string or null | `"Recovery of money/property - 547 preference; 13 Recovery of money/property - 548 fraudulent transfer"` |  |
| `cases[].date_terminated` | string or null |  |  |
| `cases[].latest_docket_entries` | array |  |  |

**Example input**

```json
{
  "court": "Delaware bankruptcy",
  "party": "Meta Platforms",
  "max_results": 3
}
```

**Example output**

```json
{
  "cases": [
    {
      "cause": null,
      "court": "United States Bankruptcy Court, D. Delaware",
      "status": "open",
      "case_name": "America's Gardening Resource, Inc. v. Meta Platforms, Inc.",
      "date_filed": "2026-02-02",
      "docket_link": "https://www.courtlistener.com/docket/72220329/americas-gardening-resource-inc-v-meta-platforms-inc/",
      "docket_number": "26-50033",
      "assigned_judge": "Brendan L. Shannon",
      "nature_of_suit": null,
      "date_terminated": null,
      "latest_docket_entries": [
        {
          "date": "2026-02-09",
          "text": "Summons and Notice of Pretrial Conference"
        },
        {
          "date": "2026-02-02",
          "text": "RETIRED - Complaint"
        }
      ]
    },
    {
      "cause": null,
      "court": "United States Bankruptcy Court, D. Delaware",
      "status": "open",
      "case_name": "AMRS Creditors Trust v. Meta Platforms, Inc.",
      "date_filed": "2025-08-08",
      "docket_link": "https://www.courtlistener.com/docket/71059427/amrs-creditors-trust-v-meta-platforms-inc/",
      "docket_number": "25-51957",
      "assigned_judge": null,
      "nature_of_suit": null,
      "date_terminated": null,
      "latest_docket_entries": [
        {
          "date": "2025-09-03",
          "text": "Establishing Streamlined Procedures Governing Adversary Proceedings - Motion (Adversary)"
        },
        {
          "date": "2025-08-08",
          "text": "RETIRED - Complaint"
        }
      ]
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@courtlistener",
  "visibility": "public",
  "operation": "get_court_opinion",
  "version": 1,
  "input": {
    "case": "576 U.S. 644"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@courtlistener\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_court_opinion\",\n  \"version\": 1,\n  \"input\": {\n    \"case\": \"576 U.S. 644\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@courtlistener",
  "visibility": "public",
  "operation": "get_court_opinion",
  "version": 1,
  "input": {
    "case": "576 U.S. 644"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@courtlistener","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Find opinions related to a legal issue or case name
- Review an opinion’s text, citations, judges, and citing-case count
- Track federal RECAP Archive cases involving a company or person
- Filter opinions by court and decision date
- Find federal cases filed within a date range

## FAQ

### Is Fous affiliated with CourtListener?

No. Fous is not affiliated with CourtListener. This workflow reads the public courtlistener.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a CourtListener account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from courtlistener.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### Which opinions discuss a keyword or case name?

Search case law returns matching opinions, with optional court, decision date, and sorting filters.

### What does an opinion say, and who decided it?

Get court opinion returns available opinion text, judges, citations, decision date, and citing-case count.

### Which federal dockets involve a company or person?

Search federal dockets finds matching cases in the RECAP Archive, with optional court and filing dates.

## Related

- [All Legal workflows](https://fous.com/workflows/category/legal)
