{
  "openapi": "3.0.1",
  "info": {
    "title": "Court Records Scraper | CourtListener Dockets & Opinions",
    "description": "Search US court records on CourtListener: federal dockets, case law opinions and RECAP documents. Filter by court, date, party or docket number and get case details, citations, PDF links and optional party roles with attorney contacts.",
    "version": "0.1",
    "x-build-id": "hk7dz5tg1IeKWad50"
  },
  "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": "Choose case law opinions, RECAP dockets or individual RECAP documents.",
            "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 filing date, inclusive, YYYY-MM-DD. Uses the document filing date for recap_documents, the case filing date for dockets and the opinion date for opinions."
          },
          "filed_before": {
            "title": "Filed before",
            "type": "string",
            "description": "Latest filing date, inclusive, YYYY-MM-DD. Uses the document filing date for recap_documents, the case filing date for dockets and the opinion date for opinions."
          },
          "party_name": {
            "title": "Party name",
            "type": "string",
            "description": "Party name filter for dockets and RECAP documents."
          },
          "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 and RECAP documents, 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": "For recap_documents, return only documents available in RECAP.",
            "default": false
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "date_desc",
              "date_asc"
            ],
            "type": "string",
            "description": "Result ordering. Date ordering uses the document filing date for recap_documents, the case filing date for dockets and the 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 or opinions, append available nested document search matches after their case. No PDF downloads.",
            "default": false
          },
          "cursor": {
            "title": "Cursor",
            "maxLength": 250000,
            "type": "string",
            "description": "Opaque next_cursor from a previous response with identical input; source search cursors are also accepted."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}