# US Case Law Scraper — Court Opinions & Dockets (`hipersoft/courtlistener-scraper`) Actor

Search millions of US court opinions, dockets and oral arguments. Export case name, court, docket number, filing date, citations, cite count, judges, nature of suit and a text snippet. Filter by court, judge and date. One row per case as JSON, CSV or Excel.

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

## Pricing

from $0.0015 / case scraped

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

## US Case Law Scraper — Court Opinions & Dockets

Search and export **millions of US court decisions** with the **US Case Law Scraper**. Pull **court opinions, dockets, and oral arguments** from federal and state courts — including the **Supreme Court, Circuit Courts of Appeals, and District Courts** — and export clean, structured rows as **JSON, CSV or Excel**.

Built for **legal research, litigation tracking, precedent analysis, academic study, journalism and compliance**, this scraper turns free public court records into ready-to-use data.

### What it does

- ⚖️ **Full-text case search** — search opinions by keyword, legal issue, party name or citation.
- 🏛️ **Federal & state courts** — from the Supreme Court and Courts of Appeals down to District and state courts.
- 📁 **Opinions, dockets, oral arguments & judges** — choose which record type to pull.
- 🎯 **Powerful filters** — by court, judge, filing date range and precedential status.
- 🔗 **Citations & cite counts** — capture official citations, neutral/Lexis cites and how often a case has been cited.
- 📝 **Case detail** — case name, docket number, court, filing date, nature of suit, judges, posture, syllabus and a text snippet.
- 📤 **Export anywhere** — JSON, CSV or Excel, or straight into Sheets, a database or your research tool.

### Example output

```json
{
  "id": "10589788",
  "caseName": "Curtin v. United Trademark Holdings, Inc.",
  "court": "Court of Appeals for the Federal Circuit",
  "courtId": "cafc",
  "docketNumber": "23-2140",
  "dateFiled": "2025-05-22",
  "status": "Published",
  "citeCount": 3,
  "natureOfSuit": null,
  "snippet": "Case: 23-2140  Document: 74  Page: 1  Filed: 05/22/2025 ...",
  "url": "https://www.courtlistener.com/opinion/10589788/curtin-v-united-trademark-holdings/"
}
```

### How to use it

1. Enter one or more **search terms** — a legal issue (`qualified immunity`), a party name, or a citation.
2. Pick a **result type** — court opinions, dockets, oral arguments or judges.
3. Optionally filter by **court** (e.g. `scotus`, `ca9`, `dcd`), **judge**, **date range** or **precedential status**, and choose a **sort order**.
4. Set **Max cases** and run. Download the results as **JSON, CSV or Excel**.

### Input fields

| Field | Description |
|-------|-------------|
| **Search terms** | Free-text legal searches — issue, party name or citation. |
| **Result type** | Court opinions, dockets, oral arguments, or judges. |
| **Court** | Court code — `scotus`, `ca9`, `dcd`, etc. Blank = all courts. |
| **Judge** | Filter by judge name. |
| **Filed after / before** | Date range (YYYY-MM-DD). |
| **Precedential status** | Published, Unpublished, Errata, and more. |
| **Sort order** | Relevance, newest, oldest, or most cited. |
| **Max cases** | Maximum number of results (0 = no limit). |

### Output fields

`id`, `caseName`, `caseNameFull`, `court`, `courtId`, `jurisdiction`, `docketNumber`, `dateFiled`, `dateArgued`, `status`, `citations`, `neutralCite`, `lexisCite`, `citeCount`, `judges`, `panel`, `natureOfSuit`, `posture`, `proceduralHistory`, `syllabus`, `snippet`, `opinionType`, `downloadUrl`, `url`, `source`.

### Popular use cases

- **Legal research** — find on-point precedent by issue, court and date.
- **Litigation & docket tracking** — monitor new filings and case activity.
- **Precedent & citation analysis** — rank cases by how often they are cited.
- **Academic & empirical legal studies** — build datasets across courts and years.
- **Legal journalism** — surface notable rulings and track court trends.
- **Compliance & policy monitoring** — follow decisions in a practice area.

### FAQ

**Do I need an account or key?**
No. Set your search and filters and run — everything needed is built in.

**Which courts are covered?**
A very broad set of US federal and state courts, from the Supreme Court and Circuit Courts of Appeals to District and state courts.

**Can I get the full opinion text?**
Each result includes a text snippet plus a link and a download URL for the full document where available.

**How do court codes work?**
Use the short court code in the Court field — for example `scotus` for the Supreme Court, `ca9` for the Ninth Circuit, or `dcd` for the DC District Court. Leave it blank to search all courts.

**Can I export to Excel or Google Sheets?**
Yes — results download as JSON, CSV or Excel and integrate with Sheets, databases and research tools.

***

Structured **US case law** — opinions, dockets and oral arguments across federal and state courts — searchable, filterable and exported clean.

# Actor input Schema

## `searchQueries` (type: `array`):

Free-text legal searches — e.g. 'trademark infringement', 'qualified immunity', a party name or a citation. Each term runs its own search. Leave empty to browse the latest with the filters below.

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

What to search.

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

Restrict to a court by its code — e.g. 'scotus' (Supreme Court), 'ca9' (9th Circuit), 'dcd' (DC District). Leave blank for all courts.

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

Filter by judge name — e.g. 'Sotomayor'.

## `dateAfter` (type: `string`):

Only cases filed on/after this date (YYYY-MM-DD).

## `dateBefore` (type: `string`):

Only cases filed on/before this date (YYYY-MM-DD).

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

Restrict opinions by status.

## `orderBy` (type: `string`):

How to sort results.

## `maxItems` (type: `integer`):

Maximum number of results to collect (0 = no limit).

## Actor input object example

```json
{
  "searchQueries": [
    "trademark infringement"
  ],
  "resultType": "o",
  "precedentialStatus": "",
  "orderBy": "",
  "maxItems": 100
}
```

# Actor output Schema

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

The results as dataset items.

# 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 = {
    "searchQueries": [
        "trademark infringement"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/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 = { "searchQueries": ["trademark infringement"] }

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/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 '{
  "searchQueries": [
    "trademark infringement"
  ]
}' |
apify call hipersoft/courtlistener-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/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/Q17RAsWZlPirJHf8L/builds/xGNOwt2UeSMDKdjRn/openapi.json
