{
  "openapi": "3.0.1",
  "info": {
    "title": "CourtListener Scraper",
    "description": "Scrape CourtListener, Free Law Project's open database of US case law (8M+ opinions), federal court dockets (60M+ from PACER/RECAP), oral argument audio, and judge biographies. HTTP-only via the official REST API.",
    "version": "1.0",
    "x-build-id": "zl4tbLrDK2gSIeZaB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~courtlistener-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-courtlistener-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/crawlerbros~courtlistener-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-courtlistener-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/crawlerbros~courtlistener-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-courtlistener-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": "Mode",
            "enum": [
              "searchOpinions",
              "searchDockets",
              "searchRecapDocuments",
              "searchOralArguments",
              "byOpinion",
              "byDocket",
              "byJudge",
              "byCourt",
              "listCourts",
              "citationLookup",
              "byUrl"
            ],
            "type": "string",
            "description": "What to fetch from CourtListener. `searchOpinions` is the most common case (full-text case law search). Lookup-by-ID modes need a CourtListener API token.",
            "default": "searchOpinions"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text full-text query for any of the four `search*` modes. Example: `first amendment`, `qualified immunity`, `Roe v. Wade`.",
            "default": "first amendment"
          },
          "court": {
            "title": "Court (filter)",
            "enum": [
              "any",
              "scotus",
              "ca1",
              "ca2",
              "ca3",
              "ca4",
              "ca5",
              "ca6",
              "ca7",
              "ca8",
              "ca9",
              "ca10",
              "ca11",
              "cadc",
              "cafc",
              "nyed",
              "nynd",
              "nysd",
              "nywd",
              "cacd",
              "caed",
              "cand",
              "casd",
              "txed",
              "txnd",
              "txsd",
              "txwd",
              "ilnd",
              "dcd",
              "cal",
              "ny",
              "tex",
              "fla",
              "ill",
              "pa",
              "calctapp",
              "nyappdiv",
              "texapp",
              "cit",
              "cofc",
              "tax",
              "uscfc"
            ],
            "type": "string",
            "description": "Restrict results to a specific court. Use a court ID slug like `scotus`, `ca9`, or `nysd`. Run `mode=listCourts` to see the full directory of 3,000+ courts.",
            "default": "any"
          },
          "judge": {
            "title": "Judge (filter)",
            "type": "string",
            "description": "Restrict by judge name (free-text, e.g. `Sotomayor`, `Roberts`)."
          },
          "filedAfter": {
            "title": "Filed after (YYYY-MM-DD)",
            "type": "string",
            "description": "Drop opinions/dockets filed before this date."
          },
          "filedBefore": {
            "title": "Filed before (YYYY-MM-DD)",
            "type": "string",
            "description": "Drop opinions/dockets filed after this date."
          },
          "citation": {
            "title": "Citation (filter or lookup)",
            "type": "string",
            "description": "Citation text, e.g. `410 U.S. 113`, `347 U.S. 483`. Use as filter on opinion search OR as direct lookup in `citationLookup` mode (latter requires apiToken)."
          },
          "neutralCite": {
            "title": "Neutral citation",
            "type": "string",
            "description": "Filter opinions by neutral cite, e.g. `2015 WL 1234567`."
          },
          "docketNumber": {
            "title": "Docket number filter",
            "type": "string",
            "description": "Filter opinions/dockets by docket number text."
          },
          "status": {
            "title": "Precedential status (opinion search)",
            "enum": [
              "any",
              "Published",
              "Unpublished",
              "Errata",
              "Separate",
              "In-chambers",
              "Relating-to",
              "Unknown"
            ],
            "type": "string",
            "description": "Restrict opinions by precedential status.",
            "default": "any"
          },
          "orderBy": {
            "title": "Sort by",
            "enum": [
              "score desc",
              "dateFiled desc",
              "dateFiled asc",
              "dateArgued desc",
              "dateArgued asc",
              "citeCount desc",
              "citeCount asc",
              "name_reverse asc"
            ],
            "type": "string",
            "description": "Result sort order. Defaults to relevance scoring.",
            "default": "score desc"
          },
          "opinionId": {
            "title": "Opinion / cluster ID (mode=byOpinion)",
            "type": "string",
            "description": "Numeric CourtListener opinion cluster ID. Example: `108713`."
          },
          "docketId": {
            "title": "Docket ID (mode=byDocket)",
            "type": "string",
            "description": "Numeric CourtListener docket ID."
          },
          "judgeId": {
            "title": "Judge / person ID (mode=byJudge)",
            "type": "string",
            "description": "Numeric CourtListener person ID."
          },
          "courtId": {
            "title": "Court ID (mode=byCourt)",
            "type": "string",
            "description": "CourtListener court ID slug, e.g. `scotus`, `ca9`, `nysd`."
          },
          "citationText": {
            "title": "Citation text to resolve (mode=citationLookup)",
            "type": "string",
            "description": "Free-text containing one or more citations to resolve (mode=citationLookup, requires apiToken)."
          },
          "urls": {
            "title": "CourtListener URLs (mode=byUrl)",
            "type": "array",
            "description": "Direct CourtListener URLs (opinion / docket / person / court).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minCitationCount": {
            "title": "Min citation count (filter)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop opinions cited fewer times than this."
          },
          "highlight": {
            "title": "Include search snippet highlights",
            "type": "boolean",
            "description": "If true, include the matched snippet text in each opinion record.",
            "default": true
          },
          "apiToken": {
            "title": "CourtListener API token (optional)",
            "type": "string",
            "description": "Personal API token from https://www.courtlistener.com/profile/api/. Required for `citationLookup` mode; recommended for high-volume runs (raises rate limits to ~5,000 req/hr). Search modes work fully anonymously."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}