{
  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}