# CourtListener Scraper — US Case Law & Opinions (`haketa/courtlistener-scraper`) Actor

Search US case law and court opinions (plus judges, oral arguments, dockets) by keyword, court and date. Case name, court, date filed, citations, docket, judges and status. Powered by CourtListener. Keyless, no anti-bot.

- **URL**: https://apify.com/haketa/courtlistener-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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 Scraper — US Case Law & Opinions

Search **US case law and court opinions** — plus **judges, oral arguments and dockets** — by keyword, court and date. For every result you get the **case name, court, date filed, citations, docket number, judges, precedential status and a direct link** — as clean JSON/CSV/Excel.

Powered by **CourtListener** (a Free Law Project), via its public REST API. **Keyless** (optional token for higher limits), no anti-bot — built for legal research, case-law monitoring and legal datasets.

***

### What this Actor does

Choose a **search type** and give it queries:

- **Opinions (case law)** — search millions of court opinions. Each result: case name, court & jurisdiction, date filed, citations and citation count, docket number, judges, precedential status, nature of suit and a link.
- **Judges / People** — find judges and people in the legal system.
- **Oral arguments** — search argued cases.
- **Dockets (RECAP)** — search federal docket data.

Filter by **court** (e.g. `scotus`, `ca9`) and **date range**, and it paginates automatically up to your limit.

***

### Why use it

- **Legal research at scale.** Pull every opinion matching a topic, across courts and years, into one structured table.
- **Case-law monitoring.** Schedule queries for your practice areas (e.g. "data privacy", "qualified immunity") to track new decisions as they land.
- **Citation & trend analysis.** `citeCount` and dates let you spot the most influential and the most recent cases.
- **Free and open.** CourtListener is a non-profit legal database — no paywall, no key required (optional token just raises your rate limit).
- **Clean, linkable records.** Every row links straight to the full opinion on CourtListener.

***

### Who it's for

- **Lawyers & paralegals** researching precedent and monitoring new decisions.
- **Legal researchers & academics** building case-law datasets.
- **Litigation & compliance teams** tracking rulings in their areas.
- **Legal-tech & AI builders** feeding case law into search, summarization or RAG pipelines.

***

### Quick start

#### Run it in the console (no code)

1. In **Search queries**, add one per line:

   ```
   data privacy
   patent infringement
   "qualified immunity"
   ```

2. Pick a **Search type** (Opinions is the default).

3. *(Optional)* set a **Court** (`scotus`, `ca9`, `cand`…) and a **date range**.

4. Click **Start**, then export as **JSON, CSV, Excel or HTML**.

Leave queries empty to run a **demo**.

#### Run it via API (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "queries": ["data privacy", "first amendment"],
    "searchType": "o",
    "court": "scotus",
    "dateFiledAfter": "2020-01-01",
    "maxItemsPerQuery": 200,
}

run = client.actor("YOUR_USERNAME/courtlistener-scraper").call(run_input=run_input)

for c in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{c['dateFiled']} · {c['court']} · {c['caseName']} ({c['citeCount']} cites)")
```

#### Run it via API (JavaScript)

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('YOUR_USERNAME/courtlistener-scraper').call({
    queries: ['patent infringement'],
    searchType: 'o',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((c) => console.log(`${c.caseName} — ${c.court} (${c.dateFiled})`));
```

***

### Input

| Field | Type | Description |
|---|---|---|
| **Search queries** | array | One legal search per line. Supports CourtListener search operators. Empty = demo. |
| **Search type** | select | `Opinions` (case law), `Judges / People`, `Oral arguments`, `Dockets (RECAP)`. |
| **Court filter** | string | CourtListener court ID, e.g. `scotus`, `ca9`, `cand`. Empty = all. |
| **Filed after / before** | string | `YYYY-MM-DD` date bounds. |
| **Max results per query** | integer | Paginates automatically. Default 100. |
| **CourtListener API token** | string (secret) | Optional — a free token raises your rate limit. |
| **Speed (parallel queries)** | integer | Keep modest; CourtListener is a non-profit. Default 3. |
| **Proxy configuration** | object | Apify Proxy. On by default. |

#### Common court IDs

`scotus` (Supreme Court), `ca1`…`ca11` + `cadc` + `cafc` (Circuit Courts), `cand`/`nysd`/`txsd`… (District Courts), and many state courts. Leave empty to search all.

***

### Output

One record per opinion (search type `o`):

```json
{
  "query": "data privacy",
  "searchType": "o",
  "caseName": "Atlas Data Privacy Corp. v. We Inform, LLC",
  "caseNameFull": "Atlas Data Privacy Corporation v. We Inform, LLC",
  "court": "Supreme Court of New Jersey",
  "courtId": "nj",
  "jurisdiction": "State Supreme",
  "dateFiled": "2026-08-12",
  "citation": "",
  "neutralCite": "",
  "citeCount": "0",
  "docketNumber": "A-8-25",
  "clusterId": "10945723",
  "judge": "",
  "panelNames": "",
  "status": "Published",
  "suitNature": "",
  "posture": "",
  "attorney": "",
  "url": "https://www.courtlistener.com/opinion/10945723/atlas-data-privacy-corp-v-we-inform-llc/",
  "scrapedAt": "2026-10-10T12:00:00.000Z"
}
```

| Field | Description |
|---|---|
| `caseName` / `caseNameFull` | Short and full case names. |
| `court` / `courtId` / `jurisdiction` | Court, its ID and jurisdiction. |
| `dateFiled` / `dateArgued` | Key dates. |
| `citation` / `neutralCite` / `citeCount` | Reporter citations and how many times the case has been cited. |
| `docketNumber` / `clusterId` | Docket number and CourtListener opinion-cluster ID. |
| `judge` / `panelNames` | Authoring judge and panel. |
| `status` | Precedential status (Published, Unpublished…). |
| `suitNature` / `posture` / `attorney` | Nature of suit, procedural posture, attorneys (when available). |
| `url` | Direct link to the full opinion. |
| `scrapedAt` | ISO timestamp. |

***

### Tips & notes

- **Monitor a practice area.** Schedule the Actor with your topics + `dateFiledAfter` set to "recent" to catch new decisions.
- **Use `citeCount`.** Sort by it to surface the most influential cases on a topic.
- **Narrow by court.** `court=scotus` or a circuit ID focuses research fast.
- **Fields vary by case.** Older/state cases may lack a judge, citation or attorney — that's the underlying data, which the Actor passes through as-is.
- **Be kind.** CourtListener is a non-profit — keep concurrency modest, or add a free API token for higher limits.

***

### Frequently asked questions

**Do I need an API key?**
No. It uses CourtListener's public REST API. A free token is optional and only raises your rate limit.

**How much case law is there?**
Millions of opinions across federal and state courts, plus dockets, judges and oral arguments.

**Can I limit to the Supreme Court or a circuit?**
Yes — set the **Court filter** to a court ID like `scotus` or `ca9`.

**Can I get only recent decisions?**
Yes — set **Filed after** (and optionally **Filed before**) to a date.

**Is this good for legal AI / RAG?**
Yes — clean, linkable, structured case-law records are ideal for legal search, summarization and retrieval pipelines.

***

### Export & integrate

Results are available as **JSON, CSV, Excel, HTML** and via the **Apify API**. Push to **Google Sheets**, a **webhook**, **Make**, **Zapier** or your database — and **schedule** runs for ongoing case-law monitoring.

*Data from CourtListener, a project of the Free Law Project.*

# Actor input Schema

## `queries` (type: `array`):

One legal search per line — e.g. `data privacy`, `patent infringement`, `"qualified immunity"`, `first amendment`. Supports the same operators as CourtListener search. Leave empty for a demo.

## `searchType` (type: `string`):

What to search: case-law opinions, judges/people, oral arguments, or dockets (RECAP).

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

Limit to a court by its CourtListener ID — e.g. `scotus` (Supreme Court), `ca9` (9th Circuit), `cand` (N.D. Cal.). Leave empty for all courts.

## `dateFiledAfter` (type: `string`):

Only results filed on/after this date.

## `dateFiledBefore` (type: `string`):

Only results filed on/before this date.

## `maxItemsPerQuery` (type: `integer`):

How many results to keep per query (paginates automatically).

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

Optional. A free CourtListener token raises your rate limit. Works fine without one for normal volumes.

## `maxConcurrency` (type: `integer`):

How many queries at once. Keep modest — CourtListener is a non-profit.

## `proxyConfiguration` (type: `object`):

Apify Proxy. On by default — rotation helps with rate limits.

## Actor input object example

```json
{
  "queries": [
    "data privacy",
    "patent infringement"
  ],
  "searchType": "o",
  "court": "",
  "dateFiledAfter": "",
  "dateFiledBefore": "",
  "maxItemsPerQuery": 100,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Search query

## `searchType` (type: `string`):

o/p/oa/r

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

Case name

## `caseNameFull` (type: `string`):

Full case name

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

Court

## `courtId` (type: `string`):

Court ID

## `jurisdiction` (type: `string`):

Jurisdiction

## `dateFiled` (type: `string`):

Date filed

## `dateArgued` (type: `string`):

Date argued

## `citation` (type: `string`):

Citations

## `neutralCite` (type: `string`):

Neutral citation

## `citeCount` (type: `string`):

Times cited

## `docketNumber` (type: `string`):

Docket number

## `clusterId` (type: `string`):

Opinion cluster ID

## `judge` (type: `string`):

Judge

## `panelNames` (type: `string`):

Panel judges

## `status` (type: `string`):

Precedential status

## `suitNature` (type: `string`):

Nature of suit

## `posture` (type: `string`):

Procedural posture

## `attorney` (type: `string`):

Attorneys

## `url` (type: `string`):

CourtListener page

## `scrapedAt` (type: `string`):

Timestamp

# 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 = {
    "queries": [
        "data privacy",
        "patent infringement"
    ],
    "maxItemsPerQuery": 100,
    "maxConcurrency": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/courtlistener-scraper").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 = {
    "queries": [
        "data privacy",
        "patent infringement",
    ],
    "maxItemsPerQuery": 100,
    "maxConcurrency": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/courtlistener-scraper").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 '{
  "queries": [
    "data privacy",
    "patent infringement"
  ],
  "maxItemsPerQuery": 100,
  "maxConcurrency": 3
}' |
apify call haketa/courtlistener-scraper --silent --output-dataset

```

## MCP server setup

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

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/dbgSyYtmBif5avo4w/builds/O5YcCgYNsnLO30Daq/openapi.json
