# Court Records Scraper - Case Law, Dockets & Judges (`scrapesage/court-records-scraper`) Actor

Scrape US court records from CourtListener: case-law opinions, federal RECAP/PACER dockets with parties, attorneys & firms, judges, oral arguments and financial disclosures. Filter by court, judge, party or date. Monitor mode, no API key needed. Export JSON, CSV, Excel.

- **URL**: https://apify.com/scrapesage/court-records-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** Lead generation, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 case law opinion records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Court Records Scraper — Case Law, Dockets, Judges & Litigation Monitor

Extract **US court records** straight from **[CourtListener](https://www.courtlistener.com/)** (the Free Law Project) — **case-law opinions**, **federal PACER/RECAP dockets** (with **parties, attorneys & law firms**), **judges & judicial profiles**, **oral-argument audio** and **federal judge financial disclosures** — all in **one actor**.

No login, no PACER fees, no scraping headaches — fast, structured JSON from an official legal-data source. **Most data needs no API key at all**; an optional free token only adds full opinion text and docket filing entries.

### Why this court records scraper?

Most legal scrapers do one thing — dump opinions and stop. This actor ships the **richest dataset in the category**: case law *and* live litigation dockets *and* judges *and* oral arguments *and* financial disclosures, each with a relevance/lead score, plus a **monitor mode** that returns only new records since your last run.

| Data | Typical scrapers | This actor |
|---|---|---|
| Case-law opinions (citations, cite count, precedential status, judges, excerpt) | ✅ | ✅ |
| Federal **dockets** with **parties, attorneys & law firms** (legal leads) | ❌ | ✅ |
| Nature of suit, cause, jury demand, assigned & referred judges | ❌ | ✅ |
| Judges — bio, courts served, positions, appointers, ABA ratings, education | ❌ | ✅ |
| Oral-argument audio (date, duration, download URL) | partial | ✅ |
| Federal judge **financial disclosures** | ❌ | ✅ |
| Relevance / lead score (0–100) on every record | ❌ | ✅ |
| Monitor mode — only new cases, dockets or filings since last run | ❌ | ✅ |
| Works with **no API key** | partial | ✅ |
| No start fee | — | ✅ |

### Use cases

- **Litigation monitoring & alerts** — watch a company, party, attorney, court or keyword and get only **new dockets and opinions** each day (monitor mode + a Schedule).
- **Legal lead generation** — pull **attorneys of record and law firms** from active dockets for legal marketing, expert-witness outreach, litigation finance and e-discovery sales.
- **Case-law research & analytics** — build datasets of opinions by court, judge, topic, date or citation count; surface the most-cited, highest-impact decisions.
- **Competitive & docket intelligence** — track a competitor's lawsuits, patent disputes, bankruptcies (chapter) and regulatory litigation.
- **Judicial analytics** — analyze judges by appointer, tenure, courts served, ABA rating, education and political affiliation.
- **Compliance, journalism & watchdog research** — follow federal judge financial disclosures, party relationships and high-profile case activity.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Pick a **mode** (case law, dockets, judges, oral arguments or financial disclosures) and set your filters (query, court, judge, party, dates…).
3. *(Optional)* Paste a **free CourtListener token** into `courtListenerToken` for full opinion text, docket filing entries and higher rate limits — get it at your [CourtListener profile](https://www.courtlistener.com/profile/sign-in/) → **Profile → API**. It is **not required**.
4. Click **Start**, watch results stream into the dataset, then **export** as JSON, CSV, Excel, XML or RSS — or pull them via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "mode": "dockets",
    "partyName": "Apple",
    "court": "cand",
    "natureOfSuit": "Patent",
    "orderBy": "newest",
    "maxResults": 200,
    "monitorMode": false
}
````

- **mode** *(required)* — what to scrape:
  - `caseLaw` — court opinions & decisions (case-law research).
  - `dockets` — federal PACER/RECAP litigation with **parties, attorneys & firms** (the litigation-intelligence + legal-lead mode).
  - `judges` — judicial profiles & biographies.
  - `oralArguments` — oral-argument audio records.
  - `financialDisclosures` — federal judge financial-disclosure filings.
- **searchQuery** — full-text query (case names & text; judge name in `judges` mode).
- **court** — restrict to one court by ID, e.g. `scotus`, `ca9`, `cand`, `nysd`. [Court list](https://www.courtlistener.com/api/rest/v4/courts/).
- **judge** — opinions authored by / dockets assigned to this judge.
- **partyName / attorneyName / natureOfSuit** — dockets filters.
- **precedentialStatus** — case law: published (precedential) or unpublished.
- **minCitations** — case law: only opinions cited at least N times (high-impact filter).
- **dateFrom / dateTo** — filed date (case law/dockets) or argued date (oral arguments).
- **orderBy** — `relevance`, `newest`, `oldest` or `mostCited`.
- **year / personId** — financial-disclosure filters (year, or one judge by person ID).
- **startUrls** — paste CourtListener `/person/`, `/audio/`, `/docket/` or `/opinion/` URLs to scrape directly.
- **courtListenerToken** *(optional)* — free token for full text, docket entries & higher limits.
- **includeFullText** *(case law, needs token)* — fetch complete opinion text.
- **includeDocketEntries** *(dockets, needs token)* — fetch recent filing entries.
- **includeJudgeDetails** *(default true)* — judges: add positions, education & affiliations.
- **maxResults** *(default 100)* — cap per run.
- **monitorMode** *(default false)* — remember prior runs and emit only new records.

### Output

Every record carries a `type` field plus a normalized common set (`name`, `date`, `court`, `url`, `leadScore`) and full source-faithful fields for that type.

A **docket** (litigation) record — note the attorney & firm leads:

```json
{
    "type": "docket",
    "docketId": 68889442,
    "caseName": "Epic Games, Inc. v. Apple Inc.",
    "court": "United States District Court, N.D. California",
    "courtId": "cand",
    "docketNumber": "4:20-cv-05640",
    "pacerCaseId": "364265",
    "dateFiled": "2020-08-13",
    "dateTerminated": null,
    "assignedJudge": "Yvonne Gonzalez Rogers",
    "natureOfSuit": "Other Contract",
    "cause": "15:1 Antitrust Litigation",
    "juryDemand": "Both",
    "parties": ["Epic Games, Inc.", "Apple Inc."],
    "partyCount": 2,
    "attorneys": ["Gary A. Bornstein", "Christine A. Varney"],
    "attorneyCount": 2,
    "firms": ["Cravath, Swaine & Moore LLP"],
    "firmCount": 1,
    "isActive": true,
    "leadScore": 90,
    "url": "https://www.courtlistener.com/docket/68889442/epic-games-inc-v-apple-inc/"
}
```

A **case-law opinion** record:

```json
{
    "type": "opinion",
    "clusterId": 112332,
    "caseName": "Riley v. California",
    "court": "Supreme Court of the United States",
    "courtId": "scotus",
    "dateFiled": "2014-06-25",
    "citations": ["573 U.S. 373"],
    "citationCount": 4821,
    "precedentialStatus": "Published",
    "judge": "Roberts",
    "excerpt": "We granted certiorari to decide whether the police may, without a warrant, search digital information on a cell phone…",
    "leadScore": 95,
    "url": "https://www.courtlistener.com/opinion/112332/riley-v-california/"
}
```

A **judge** record:

```json
{
    "type": "judge",
    "personId": 1212,
    "name": "Douglas Howard Ginsburg",
    "courtsServed": ["cadc"],
    "abaRatings": ["Qualified"],
    "appointers": ["Ronald Reagan"],
    "schools": ["University of Chicago Law School"],
    "positions": [
        { "court": "U.S. Court of Appeals for the D.C. Circuit", "title": "Judge", "dateStart": "1986-11-14", "dateTermination": null }
    ],
    "leadScore": 90,
    "url": "https://www.courtlistener.com/person/1212/douglas-howard-ginsburg/"
}
```

A **financial disclosure** record:

```json
{
    "type": "financialDisclosure",
    "disclosureId": 4821,
    "personId": 1212,
    "judgeName": "Douglas Howard Ginsburg",
    "year": 2022,
    "pageCount": 7,
    "sections": { "investments": 41, "gifts": 2, "debts": null, "positions": 3 },
    "downloadUrl": "https://…/disclosure.pdf",
    "leadScore": 75,
    "url": "https://www.courtlistener.com/person/1212/douglas-howard-ginsburg/"
}
```

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it daily/weekly to track new dockets, opinions or filings for a court, judge, party or keyword.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (CRM import, Slack alert, docket alert) the moment a run finishes.

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

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

const run = await client.actor('scrapesage/court-records-scraper').call({
    mode: 'dockets',
    partyName: 'Apple',
    natureOfSuit: 'Patent',
    maxResults: 300,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} docket records`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push new dockets or attorney leads straight into your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get notified when a monitored search finds new cases.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "find new patent dockets against Apple in the Northern District of California" or "list the most-cited Supreme Court privacy decisions since 2018" and let it run this scraper.

### More scrapers from scrapesage

Build a complete **public-records, legal & B2B intelligence stack**:

- **[FindLaw Scraper](https://apify.com/scrapesage/findlaw-scraper)** — lawyers, law firms & attorney leads (pairs with docket attorneys-of-record).
- **[SEC EDGAR Scraper](https://apify.com/scrapesage/sec-edgar-scraper)** — company filings, financials & insiders.
- **[FEC Campaign Finance Scraper](https://apify.com/scrapesage/fec-campaign-finance-scraper)** — donors, PACs & lobbying.
- **[USAspending Scraper](https://apify.com/scrapesage/usaspending-scraper)** — federal awards & contractors.
- **[SAM.gov Scraper](https://apify.com/scrapesage/sam-gov-scraper)** — federal contract opportunities & contacts.
- **[Companies House Scraper](https://apify.com/scrapesage/companies-house-scraper)** — UK companies, directors & PSCs.
- **[Google Patents Scraper](https://apify.com/scrapesage/google-patents-scraper)** — patents, citations & assignees.

### Tips

- **Litigation alerts**: set `mode: dockets`, add a `partyName`, `attorneyName` or `court`, turn on `monitorMode`, and add a daily [Schedule](https://docs.apify.com/platform/schedules) — you'll only ever see new cases.
- **High-impact case law**: use `minCitations` (e.g. 50) with `orderBy: mostCited` to surface the decisions courts actually rely on.
- **Legal leads**: `dockets` mode returns `attorneys` and `firms` per case — filter by `leadScore` to prioritize active cases with named counsel.
- **Go deep**: add a free `courtListenerToken` and enable `includeFullText` / `includeDocketEntries` for complete opinions and filing histories.
- **Find a judge's ID**: run `judges` mode, grab the `personId`, then use it in `financialDisclosures` mode.

### FAQ

**Do I need an API key?** No. Case law, dockets, judges and financial disclosures all work on the keyless public API. A **free** [CourtListener token](https://www.courtlistener.com/profile/sign-in/) only adds full opinion text, docket filing entries and higher rate limits.

**Where does the data come from?** The official [CourtListener REST API](https://www.courtlistener.com/help/api/rest/) operated by the non-profit Free Law Project, including the RECAP archive of federal PACER documents. All data is public record.

**How current is it?** CourtListener ingests opinions and PACER/RECAP dockets continuously, so newly filed cases and decisions appear quickly. Use `orderBy: newest` plus `monitorMode` to track them.

**Can I export to Google Sheets, CSV or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**Why is a field null?** Some records genuinely don't include every field (e.g. a docket with no listed attorneys, an opinion with no neutral citation). Fields are `null` only when the source doesn't provide the value.

**How does monitor mode work with Schedules?** It uses a named key-value store to remember what it has already returned and emits only new records each run. It is independent of Apify Schedules, so the two never conflict — schedule the run, and monitor mode handles deduplication.

**Is this legal?** This actor collects publicly available legal records only. You are responsible for using the data in compliance with applicable laws and CourtListener's [terms](https://www.courtlistener.com/terms/).

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

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

Which dataset to extract. All modes use the official CourtListener API. Case law, dockets, judges, oral arguments and financial disclosures all work with NO API key. A free token (see courtListenerToken) only adds full opinion text, docket filing entries and removes rate limits.

## `searchQuery` (type: `string`):

Full-text query. caseLaw/dockets/oralArguments: searches case names & text (e.g. 'data privacy', 'patent infringement', a company or party name). judges: searches the judge's name (e.g. 'Ginsburg').

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

Restrict to one court by its CourtListener ID, e.g. 'scotus' (US Supreme Court), 'ca9' (9th Circuit), 'cand' (N.D. California), 'nysd' (S.D. New York). Leave blank for all courts. Full list: https://www.courtlistener.com/api/rest/v4/courts/

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

caseLaw: filter opinions authored by this judge. dockets: filter by the assigned judge. judges: alternative to searchQuery.

## `partyName` (type: `string`):

dockets mode: filter litigation by a party name (plaintiff or defendant), e.g. 'Apple', 'United States', a person or company.

## `attorneyName` (type: `string`):

dockets mode: filter litigation by an attorney of record. Useful for tracking a firm's or lawyer's active cases.

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

dockets mode: filter by nature of suit, e.g. 'Patent', 'Contract', 'Civil Rights', 'Bankruptcy', 'Personal Injury'.

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

caseLaw mode: restrict to published (precedential) or unpublished opinions.

## `minCitations` (type: `integer`):

caseLaw mode: only return opinions cited by at least this many other cases — a fast way to surface high-impact, influential decisions.

## `dateFrom` (type: `string`):

Earliest date to include — filed date for case law/dockets, argued date for oral arguments. Example: 2020-01-01.

## `dateTo` (type: `string`):

Latest date to include (filed/argued). Example: 2026-06-30.

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

How to sort search results (caseLaw, dockets, oralArguments).

## `year` (type: `integer`):

financialDisclosures mode: filter judge financial disclosures to a single reporting year, e.g. 2023.

## `personId` (type: `integer`):

financialDisclosures mode: limit to one judge by CourtListener person ID (the number in a /person/<id>/ URL). Run 'judges' mode first to find the ID.

## `startUrls` (type: `array`):

Paste CourtListener URLs to scrape directly: /person/<id>/ (judge, no key), /audio/<id>/ (oral argument), /docket/<id>/ and /opinion/<id>/ (these two need a free token). Auto-routed; overrides the search filters for those records.

## `courtListenerToken` (type: `string`):

Optional free token from your CourtListener profile (https://www.courtlistener.com/profile/sign-in/ → Profile → API). It is NOT required: search, judges and financial disclosures work fully without it. A token raises the rate limit (≈5,000 req/hour) and unlocks full opinion text (includeFullText), docket filing entries (includeDocketEntries) and direct docket/opinion start URLs.

## `includeFullText` (type: `boolean`):

caseLaw mode: fetch the complete opinion text for each result (one extra request per case). Requires courtListenerToken; if no token is set this is skipped and only the excerpt is returned.

## `includeDocketEntries` (type: `boolean`):

dockets mode: fetch the most recent docket filing entries (entry number, date, description) for each case. Requires courtListenerToken; skipped if no token is set.

## `includeJudgeDetails` (type: `boolean`):

judges mode: fetch each judge's full profile (positions with dates, education, political affiliations). No key needed; adds one extra request per judge.

## `resolveJudgeNames` (type: `boolean`):

financialDisclosures mode: look up and attach the judge's name for each disclosure (one cached request per judge). Turn off for faster, name-less runs.

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

Maximum number of records to return for this run.

## `monitorMode` (type: `boolean`):

Remember records seen in previous runs (in a named key-value store) and emit only records that are new since the last run. Ideal for daily Schedules that watch a court, judge, party or keyword for new cases, dockets or filings. Does not conflict with Apify Schedules.

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

Proxy for outbound requests. The default Apify Proxy is recommended — the actor rotates a fresh IP per request so anonymous rate limits rarely bite.

## Actor input object example

```json
{
  "mode": "caseLaw",
  "searchQuery": "data privacy",
  "precedentialStatus": "",
  "orderBy": "relevance",
  "includeFullText": false,
  "includeDocketEntries": false,
  "includeJudgeDetails": true,
  "resolveJudgeNames": true,
  "maxResults": 100,
  "monitorMode": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped records as JSON items in the default dataset.

# 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 = {
    "searchQuery": "data privacy"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/court-records-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 = { "searchQuery": "data privacy" }

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/court-records-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "searchQuery": "data privacy"
}' |
apify call scrapesage/court-records-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesage/court-records-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Court Records Scraper - Case Law, Dockets & Judges",
        "description": "Scrape US court records from CourtListener: case-law opinions, federal RECAP/PACER dockets with parties, attorneys & firms, judges, oral arguments and financial disclosures. Filter by court, judge, party or date. Monitor mode, no API key needed. Export JSON, CSV, Excel.",
        "version": "0.1",
        "x-build-id": "BjxOBtDQnOhqgNpEo"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesage~court-records-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesage-court-records-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapesage~court-records-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesage-court-records-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapesage~court-records-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesage-court-records-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "What to scrape",
                        "enum": [
                            "caseLaw",
                            "dockets",
                            "judges",
                            "oralArguments",
                            "financialDisclosures"
                        ],
                        "type": "string",
                        "description": "Which dataset to extract. All modes use the official CourtListener API. Case law, dockets, judges, oral arguments and financial disclosures all work with NO API key. A free token (see courtListenerToken) only adds full opinion text, docket filing entries and removes rate limits.",
                        "default": "caseLaw"
                    },
                    "searchQuery": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Full-text query. caseLaw/dockets/oralArguments: searches case names & text (e.g. 'data privacy', 'patent infringement', a company or party name). judges: searches the judge's name (e.g. 'Ginsburg')."
                    },
                    "court": {
                        "title": "Court ID",
                        "type": "string",
                        "description": "Restrict to one court by its CourtListener ID, e.g. 'scotus' (US Supreme Court), 'ca9' (9th Circuit), 'cand' (N.D. California), 'nysd' (S.D. New York). Leave blank for all courts. Full list: https://www.courtlistener.com/api/rest/v4/courts/"
                    },
                    "judge": {
                        "title": "Judge name",
                        "type": "string",
                        "description": "caseLaw: filter opinions authored by this judge. dockets: filter by the assigned judge. judges: alternative to searchQuery."
                    },
                    "partyName": {
                        "title": "Party name (dockets)",
                        "type": "string",
                        "description": "dockets mode: filter litigation by a party name (plaintiff or defendant), e.g. 'Apple', 'United States', a person or company."
                    },
                    "attorneyName": {
                        "title": "Attorney name (dockets)",
                        "type": "string",
                        "description": "dockets mode: filter litigation by an attorney of record. Useful for tracking a firm's or lawyer's active cases."
                    },
                    "natureOfSuit": {
                        "title": "Nature of suit (dockets)",
                        "type": "string",
                        "description": "dockets mode: filter by nature of suit, e.g. 'Patent', 'Contract', 'Civil Rights', 'Bankruptcy', 'Personal Injury'."
                    },
                    "precedentialStatus": {
                        "title": "Precedential status (case law)",
                        "enum": [
                            "",
                            "published",
                            "unpublished"
                        ],
                        "type": "string",
                        "description": "caseLaw mode: restrict to published (precedential) or unpublished opinions.",
                        "default": ""
                    },
                    "minCitations": {
                        "title": "Minimum citation count (case law)",
                        "type": "integer",
                        "description": "caseLaw mode: only return opinions cited by at least this many other cases — a fast way to surface high-impact, influential decisions."
                    },
                    "dateFrom": {
                        "title": "From date (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Earliest date to include — filed date for case law/dockets, argued date for oral arguments. Example: 2020-01-01."
                    },
                    "dateTo": {
                        "title": "To date (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Latest date to include (filed/argued). Example: 2026-06-30."
                    },
                    "orderBy": {
                        "title": "Sort order",
                        "enum": [
                            "relevance",
                            "newest",
                            "oldest",
                            "mostCited"
                        ],
                        "type": "string",
                        "description": "How to sort search results (caseLaw, dockets, oralArguments).",
                        "default": "relevance"
                    },
                    "year": {
                        "title": "Year (financial disclosures)",
                        "type": "integer",
                        "description": "financialDisclosures mode: filter judge financial disclosures to a single reporting year, e.g. 2023."
                    },
                    "personId": {
                        "title": "Judge person ID (financial disclosures)",
                        "type": "integer",
                        "description": "financialDisclosures mode: limit to one judge by CourtListener person ID (the number in a /person/<id>/ URL). Run 'judges' mode first to find the ID."
                    },
                    "startUrls": {
                        "title": "Start URLs (optional)",
                        "type": "array",
                        "description": "Paste CourtListener URLs to scrape directly: /person/<id>/ (judge, no key), /audio/<id>/ (oral argument), /docket/<id>/ and /opinion/<id>/ (these two need a free token). Auto-routed; overrides the search filters for those records.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "courtListenerToken": {
                        "title": "CourtListener API token (optional)",
                        "type": "string",
                        "description": "Optional free token from your CourtListener profile (https://www.courtlistener.com/profile/sign-in/ → Profile → API). It is NOT required: search, judges and financial disclosures work fully without it. A token raises the rate limit (≈5,000 req/hour) and unlocks full opinion text (includeFullText), docket filing entries (includeDocketEntries) and direct docket/opinion start URLs."
                    },
                    "includeFullText": {
                        "title": "Include full opinion text (case law, needs token)",
                        "type": "boolean",
                        "description": "caseLaw mode: fetch the complete opinion text for each result (one extra request per case). Requires courtListenerToken; if no token is set this is skipped and only the excerpt is returned.",
                        "default": false
                    },
                    "includeDocketEntries": {
                        "title": "Include docket filing entries (dockets, needs token)",
                        "type": "boolean",
                        "description": "dockets mode: fetch the most recent docket filing entries (entry number, date, description) for each case. Requires courtListenerToken; skipped if no token is set.",
                        "default": false
                    },
                    "includeJudgeDetails": {
                        "title": "Include judge detail (judges)",
                        "type": "boolean",
                        "description": "judges mode: fetch each judge's full profile (positions with dates, education, political affiliations). No key needed; adds one extra request per judge.",
                        "default": true
                    },
                    "resolveJudgeNames": {
                        "title": "Resolve judge names (financial disclosures)",
                        "type": "boolean",
                        "description": "financialDisclosures mode: look up and attach the judge's name for each disclosure (one cached request per judge). Turn off for faster, name-less runs.",
                        "default": true
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of records to return for this run.",
                        "default": 100
                    },
                    "monitorMode": {
                        "title": "Monitor mode (only new records)",
                        "type": "boolean",
                        "description": "Remember records seen in previous runs (in a named key-value store) and emit only records that are new since the last run. Ideal for daily Schedules that watch a court, judge, party or keyword for new cases, dockets or filings. Does not conflict with Apify Schedules.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy for outbound requests. The default Apify Proxy is recommended — the actor rotates a fresh IP per request so anonymous rate limits rarely bite.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
