{
  "openapi": "3.0.1",
  "info": {
    "title": "Court Records API: Case Law, Opinions, PACER Dockets, Judges",
    "description": "Search US court records and case law: court opinions with full text, opinion clusters and citations, PACER dockets, docket entries and RECAP documents, federal and state judges, courts and oral argument audio through the CourtListener REST API v4. Bring your own key.",
    "version": "0.1",
    "x-build-id": "DRZvcpk5MJutqMuRN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~court-records-case-law-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-court-records-case-law-api",
        "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/nabeelbaghoor~court-records-case-law-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-court-records-case-law-api",
        "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/nabeelbaghoor~court-records-case-law-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-court-records-case-law-api",
        "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": {
          "mode": {
            "title": "What to read",
            "enum": [
              "search",
              "dockets",
              "clusters",
              "opinions",
              "docketEntries",
              "recapDocuments",
              "courts",
              "judges",
              "oralArguments"
            ],
            "type": "string",
            "description": "Legal search runs the CourtListener search engine across case law, PACER cases and filings, judges or oral arguments. The other modes read one database endpoint by filters or by record IDs.",
            "default": "search"
          },
          "apiKey": {
            "title": "CourtListener API token",
            "type": "string",
            "description": "Your own free CourtListener API token, from courtlistener.com/profile/api-token/ after signing in. Paste the token alone, without the word Token. You can also set the DATA_API_KEY secret instead."
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Legal search. Keywords or CourtListener advanced operators, such as \"qualified immunity\" or caseName:(roe AND wade) or court_id:ca9. Sent as q."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "o",
              "r",
              "rd",
              "d",
              "p",
              "oa"
            ],
            "type": "string",
            "description": "Legal search. Which collection to search, sent as type.",
            "default": "o"
          },
          "searchOrderBy": {
            "title": "Search order",
            "enum": [
              "",
              "score desc",
              "dateFiled desc",
              "dateFiled asc",
              "citeCount desc",
              "citeCount asc",
              "dateArgued desc",
              "dateArgued asc",
              "entry_date_filed desc",
              "entry_date_filed asc",
              "name_reverse asc",
              "dob desc,name_reverse asc",
              "dob asc,name_reverse asc",
              "dod desc,name_reverse asc"
            ],
            "type": "string",
            "description": "Legal search. Sent as order_by. Relevance works for every type; filing dates fit case law and PACER, citation counts fit case law, argument dates fit oral arguments, and name or birth order fits judges.",
            "default": ""
          },
          "caseName": {
            "title": "Case name",
            "type": "string",
            "description": "Optional. Legal search. Words in the case name, such as Miranda v. Arizona. Sent as case_name."
          },
          "judgeName": {
            "title": "Judge",
            "type": "string",
            "description": "Optional. Legal search. A judge name, such as Ginsburg. Sent as judge."
          },
          "citation": {
            "title": "Citation",
            "type": "string",
            "description": "Optional. Case law search. A reporter citation, such as 410 U.S. 113. Sent as citation."
          },
          "precedentialStatuses": {
            "title": "Precedential statuses",
            "type": "array",
            "description": "Optional. Case law search includes only published opinions unless you pick statuses here (sent as stat_Published=on and so on). The clusters mode takes one status, sent as precedential_status.",
            "items": {
              "type": "string",
              "enum": [
                "Published",
                "Unpublished",
                "Errata",
                "Separate",
                "In-chambers",
                "Relating-to",
                "Unknown"
              ],
              "enumTitles": [
                "Published",
                "Unpublished",
                "Errata",
                "Separate",
                "In chambers",
                "Relating to",
                "Unknown"
              ]
            }
          },
          "semantic": {
            "title": "Semantic search",
            "type": "boolean",
            "description": "Optional. Case law search only. Ranks opinions by meaning instead of keywords, for plain language queries. Sent as semantic=true.",
            "default": false
          },
          "highlight": {
            "title": "Highlight matches",
            "type": "boolean",
            "description": "Optional. Legal search. Marks query matches in the snippet with mark tags. Sent as highlight=on.",
            "default": false
          },
          "courts": {
            "title": "Court IDs",
            "type": "array",
            "description": "Optional. CourtListener court IDs from the jurisdictions page, such as scotus, ca9, nysd or cal. Legal search takes several at once; dockets, clusters, opinions, judges and oral arguments read each court in turn.",
            "items": {
              "type": "string"
            }
          },
          "docketNumber": {
            "title": "Docket number",
            "type": "string",
            "description": "Optional. A docket number, such as 1:16-cv-00745 or 23A994. Legal search, dockets, clusters and opinions. Docket numbers are not unique, so add a court too."
          },
          "filedAfter": {
            "title": "Filed on or after",
            "type": "string",
            "description": "Optional. YYYY-MM-DD. Legal search (argued date for oral arguments), dockets, clusters and docket entries."
          },
          "filedBefore": {
            "title": "Filed on or before",
            "type": "string",
            "description": "Optional. YYYY-MM-DD. Legal search (argued date for oral arguments), dockets, clusters and docket entries."
          },
          "recordIds": {
            "title": "Record IDs",
            "type": "array",
            "description": "Optional. Read these exact records by ID, one request each, instead of filtering: docket, cluster, opinion, docket entry, RECAP document, judge or audio IDs (the number in a CourtListener URL), or court IDs such as scotus in the courts mode.",
            "items": {
              "type": "string"
            }
          },
          "docketId": {
            "title": "Docket ID",
            "type": "string",
            "description": "Clusters, docket entries, RECAP documents and oral arguments. The numeric docket ID from a CourtListener docket URL, such as 4214664. Required for docket entries and RECAP documents."
          },
          "clusterId": {
            "title": "Cluster ID",
            "type": "string",
            "description": "Optional. Opinions. The numeric cluster ID from a CourtListener opinion URL, which returns every opinion (lead, concurrence, dissent) in that decision."
          },
          "authorId": {
            "title": "Author judge ID",
            "type": "string",
            "description": "Optional. Opinions. The numeric judge ID of the opinion author, from the judges mode."
          },
          "minCitations": {
            "title": "Minimum citation count",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Clusters. Only decisions cited at least this many times. Sent as citation_count__gte."
          },
          "natureOfSuit": {
            "title": "Nature of suit",
            "type": "string",
            "description": "Optional. Dockets. The start of the PACER nature of suit, such as Patent or Civil Rights."
          },
          "pacerCaseId": {
            "title": "PACER case ID",
            "type": "string",
            "description": "Optional. Dockets. The numeric PACER case ID, best combined with a court ID."
          },
          "availableOnly": {
            "title": "Only documents with a file",
            "type": "boolean",
            "description": "Optional. RECAP documents. Only documents already in the RECAP Archive (is_available=true).",
            "default": false
          },
          "includeText": {
            "title": "Include full text",
            "type": "boolean",
            "description": "Opinions and RECAP documents. Keep the opinion or document text. Turn off to leave the text fields out with the omit parameter, for smaller and cheaper rows.",
            "default": true
          },
          "jurisdictions": {
            "title": "Court jurisdictions",
            "type": "array",
            "description": "Optional. Courts mode. Only courts of these jurisdiction types.",
            "items": {
              "type": "string",
              "enum": [
                "F",
                "FD",
                "FB",
                "FBP",
                "FS",
                "S",
                "SA",
                "ST",
                "SS",
                "TRS",
                "TRA",
                "TRT",
                "TRX",
                "TS",
                "TA",
                "TT",
                "TSP",
                "SAG",
                "MA",
                "MT",
                "C",
                "I"
              ],
              "enumTitles": [
                "Federal Appellate",
                "Federal District",
                "Federal Bankruptcy",
                "Federal Bankruptcy Panel",
                "Federal Special",
                "State Supreme",
                "State Appellate",
                "State Trial",
                "State Special",
                "Tribal Supreme",
                "Tribal Appellate",
                "Tribal Trial",
                "Tribal Special",
                "Territory Supreme",
                "Territory Appellate",
                "Territory Trial",
                "Territory Special",
                "State Attorney General",
                "Military Appellate",
                "Military Trial",
                "Committee",
                "International"
              ]
            }
          },
          "inUseOnly": {
            "title": "Only courts in use",
            "type": "boolean",
            "description": "Optional. Courts mode. Only courts CourtListener actively uses (in_use=true).",
            "default": false
          },
          "lastNamePrefix": {
            "title": "Judge last name starts with",
            "type": "string",
            "description": "Optional. Judges mode. The start of the last name, case insensitive, such as Ginsb."
          },
          "firstNamePrefix": {
            "title": "Judge first name starts with",
            "type": "string",
            "description": "Optional. Judges mode. The start of the first name, case insensitive."
          },
          "birthState": {
            "title": "Judge birth state",
            "type": "string",
            "description": "Optional. Judges mode. Two letter US state code, such as NY."
          },
          "restOrderBy": {
            "title": "Database order",
            "enum": [
              "",
              "-id",
              "id",
              "-date_created",
              "date_created",
              "-date_modified",
              "date_modified",
              "-date_blocked",
              "date_blocked",
              "-date_filed",
              "date_filed",
              "-date_terminated",
              "date_terminated",
              "-date_last_filing",
              "date_last_filing",
              "-citation_count",
              "citation_count",
              "-recap_sequence_number",
              "recap_sequence_number",
              "-entry_number",
              "entry_number",
              "-date_upload",
              "date_upload",
              "-position",
              "position",
              "-start_date",
              "start_date",
              "-end_date",
              "end_date",
              "-date_dob",
              "date_dob",
              "-date_dod",
              "date_dod",
              "-name_last",
              "name_last"
            ],
            "type": "string",
            "description": "Optional. Database modes. Sent as order_by; each mode accepts only its own fields (for example citation count for clusters, entry number for docket entries). Newest ID first by default.",
            "default": ""
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many rows. One page holds about 20 rows, and a free token allows about 125 requests a day.",
            "default": 20
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Pacing ceiling. Free CourtListener tokens allow 5 requests a minute; raise it only if your membership or agreement allows more.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}