{
  "openapi": "3.0.1",
  "info": {
    "title": "CourtListener Scraper - Court Records, Dockets & Opinions",
    "description": "Search public US court records on CourtListener without an account: federal dockets from the RECAP archive (filings collected from PACER), case law opinions, optional party roles, attorney contacts and document links. Filter by court, date, party or docket number.",
    "version": "0.2",
    "x-build-id": "UHeMVj64G86Ss8bGd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~courtlistener-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-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/s-r~courtlistener-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s-r-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/s-r~courtlistener-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-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",
        "properties": {
          "query": {
            "title": "Query",
            "maxLength": 16000,
            "type": "string",
            "description": "CourtListener keyword query; quotes, AND/OR and field:value operators are supported."
          },
          "search_type": {
            "title": "Search type",
            "enum": [
              "opinions",
              "dockets",
              "recap_documents"
            ],
            "type": "string",
            "description": "Search public docket or opinion pages without an account. recap_documents is retained as an input value but returns invalid_input because standalone public document search is unavailable.",
            "default": "dockets"
          },
          "court": {
            "title": "Court",
            "type": "array",
            "description": "List of lowercase CourtListener court IDs, for example [\"txed\"] or [\"txed\", \"cand\"].",
            "items": {
              "type": "string"
            }
          },
          "filed_after": {
            "title": "Filed after",
            "type": "string",
            "description": "Earliest case filing date for dockets or opinion date for opinions, inclusive, YYYY-MM-DD."
          },
          "filed_before": {
            "title": "Filed before",
            "type": "string",
            "description": "Latest case filing date for dockets or opinion date for opinions, inclusive, YYYY-MM-DD."
          },
          "party_name": {
            "title": "Party name",
            "type": "string",
            "description": "Party name filter for docket searches."
          },
          "case_name": {
            "title": "Case name",
            "type": "string",
            "description": "Case name filter."
          },
          "docket_number": {
            "title": "Docket number",
            "type": "string",
            "description": "Court docket number; combine with court because numbers are not globally unique."
          },
          "nature_of_suit": {
            "title": "Nature of suit",
            "type": "string",
            "description": "Nature of suit code or text for dockets, for example 830."
          },
          "judge": {
            "title": "Judge",
            "type": "string",
            "description": "Judge filter for opinions only."
          },
          "opinion_status": {
            "title": "Opinion status",
            "enum": [
              "Published",
              "Unpublished",
              "Errata",
              "Separate",
              "In-chambers",
              "Relating-to",
              "Unknown"
            ],
            "type": "string",
            "description": "Opinion publication status; omitted means the source default of published opinions."
          },
          "available_only": {
            "title": "Available only",
            "type": "boolean",
            "description": "Legacy standalone-document option. recap_documents is currently unavailable and returns invalid_input.",
            "default": false
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "date_desc",
              "date_asc"
            ],
            "type": "string",
            "description": "Result ordering by relevance, case filing date for dockets or opinion date for opinions.",
            "default": "relevance"
          },
          "max_items": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum primary results across all cursor calls. Optional child documents are additional dataset rows.",
            "default": 50
          },
          "include_details": {
            "title": "Include details",
            "type": "boolean",
            "description": "For dockets, fetch public party roles and associated attorney phone, fax, firm and address.",
            "default": false
          },
          "include_documents": {
            "title": "Include documents",
            "type": "boolean",
            "description": "For dockets, append up to three public document matches per case using their public URLs as IDs. For opinions, returns a warning with no document rows: numeric IDs and PDF links are unavailable.",
            "default": false
          },
          "cursor": {
            "title": "Cursor",
            "maxLength": 250000,
            "type": "string",
            "description": "Opaque cl2 next_cursor from a previous public HTML response with identical input. Old API cursors require restarting the search."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}