{
  "openapi": "3.0.1",
  "info": {
    "title": "CourtListener Civil Cases Scraper - PACER by Nature of Suit",
    "description": "Federal civil cases from the RECAP archive, filtered by JS-44 nature of suit, cause of action, court, party and date. Criminal and bankruptcy records are dropped. Returns cases, filings or case law with parties, counsel and firms. No API key needed.",
    "version": "0.2",
    "x-build-id": "1hEQfLGz8LR9phRv2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~courtlistener-civil-cases-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-courtlistener-civil-cases-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/parseforge~courtlistener-civil-cases-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-courtlistener-civil-cases-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/parseforge~courtlistener-civil-cases-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-courtlistener-civil-cases-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",
        "properties": {
          "dataset": {
            "title": "What to return",
            "enum": [
              "cases",
              "dockets",
              "filings",
              "opinions"
            ],
            "type": "string",
            "description": "Cases returns one row per federal civil docket with the filings that matched your query attached. Dockets is the same case row without the document list. Filings returns one row per document. Opinions returns published case law instead of PACER dockets.",
            "default": "cases"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000. Split evenly across the selected nature-of-suit codes. Leave empty on a paid plan for 100 rows."
          },
          "suitCategories": {
            "title": "Nature of suit category",
            "uniqueItems": true,
            "type": "array",
            "description": "Pick whole JS-44 groups instead of memorising codes. Each category expands to its nature-of-suit codes and is searched in turn. Leave empty to take every civil case. Not supported by the opinions dataset, where CourtListener ignores the filter.",
            "items": {
              "type": "string",
              "enum": [
                "contract",
                "real-property",
                "torts",
                "personal-property",
                "bankruptcy",
                "civil-rights",
                "prisoner-petitions",
                "forfeiture-penalty",
                "labor",
                "intellectual-property",
                "social-security",
                "federal-tax",
                "immigration",
                "other-statutes"
              ],
              "enumTitles": [
                "Contract (110-196)",
                "Real property (210-290)",
                "Torts, personal injury (310-368)",
                "Personal property (370-385)",
                "Bankruptcy appeals (422-423)",
                "Civil rights (440-448)",
                "Prisoner petitions (463-560)",
                "Forfeiture and penalty (625-690)",
                "Labor (710-791)",
                "Intellectual property (820-880)",
                "Social security (861-865)",
                "Federal tax suits (870-871)",
                "Immigration (462-465)",
                "Other statutes (375-950)"
              ]
            }
          },
          "natureOfSuitCodes": {
            "title": "Nature of suit codes",
            "type": "array",
            "description": "Exact JS-44 codes, for example 830 for patent, 850 for securities or 442 for employment discrimination. Each code is searched separately and the results are merged, with the row budget split between them. Combines with the categories above. Not supported by the opinions dataset.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Full-text query across the case caption, parties and filing text. Supports quoted phrases and AND/OR/NOT. Leave empty to browse with the filters alone."
          },
          "cause": {
            "title": "Cause of action",
            "type": "string",
            "description": "The statute the complaint is brought under, as PACER writes it, for example \"28:1332 Diversity\" or \"42:1983\". Words are matched, so \"civil rights\" works too."
          },
          "court": {
            "title": "Court ID",
            "type": "string",
            "description": "Restrict to one court by its CourtListener ID, for example cand, nysd, txed or ca9. Space-separate several IDs to match any of them."
          },
          "filedAfter": {
            "title": "Filed on or after",
            "type": "string",
            "description": "Earliest filing date, as MM/DD/YYYY or YYYY-MM-DD."
          },
          "filedBefore": {
            "title": "Filed on or before",
            "type": "string",
            "description": "Latest filing date, as MM/DD/YYYY or YYYY-MM-DD."
          },
          "caseName": {
            "title": "Case name",
            "type": "string",
            "description": "Match words in the case caption, for example \"smith\" or \"united states\"."
          },
          "docketNumber": {
            "title": "Docket number",
            "type": "string",
            "description": "Exact docket number, for example 1:20-cv-03590."
          },
          "partyName": {
            "title": "Party name",
            "type": "string",
            "description": "Name of a party to the case, for example Google or \"United States\"."
          },
          "entryDescription": {
            "title": "Docket entry text",
            "type": "string",
            "description": "Match words in the docket entry description, for example complaint, motion or judgment."
          },
          "documentNumber": {
            "title": "Document number",
            "type": "string",
            "description": "Filter to a specific document number within the docket, for example 1 for the complaint."
          },
          "availableOnly": {
            "title": "Only cases with free PDFs",
            "type": "boolean",
            "description": "Keep only cases whose filings are already in the free RECAP archive rather than paywalled behind PACER.",
            "default": false
          },
          "civilOnly": {
            "title": "Civil cases only",
            "type": "boolean",
            "description": "Drop criminal cases and bankruptcy petitions, which share the PACER index with civil cases. On by default: without it most of the unfiltered feed is bankruptcy. The document index does not expose the case type, so for filings pick a nature-of-suit code instead.",
            "default": true
          },
          "includeTimeline": {
            "title": "Include the full docket timeline",
            "type": "boolean",
            "description": "Look up every docket entry for each case, not just the ones that matched the query. Adds the timeline and timelineEntryCount columns and costs one extra request per case, so runs are slower.",
            "default": false
          },
          "timelineLimit": {
            "title": "Timeline entries per case",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many docket entries to attach when the timeline is on. Older entries come first.",
            "default": 20
          },
          "orderBy": {
            "title": "Sort order",
            "enum": [
              "dateFiled desc",
              "dateFiled asc",
              "score desc",
              "entry_date_filed desc",
              "entry_date_filed asc",
              "citeCount desc"
            ],
            "type": "string",
            "description": "How to order results. Relevance only means anything when a search query is set.",
            "default": "dateFiled desc"
          },
          "courtListenerKey": {
            "title": "CourtListener API key (optional)",
            "type": "string",
            "description": "A free CourtListener API key (Profile > API on courtlistener.com) lifts the anonymous throttle and makes long runs faster. Leave empty to run anonymously."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default: the CourtListener API is open. Turn it on for long anonymous runs so each request gets a fresh exit IP and its own throttle allowance. Not used when an API key is supplied.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}