{
  "openapi": "3.0.1",
  "info": {
    "title": "CourtListener Citation Scraper - Case Law Citation Graph",
    "description": "Scrape US court opinions from CourtListener with every reporter citation, times-cited counts and the citation graph. Export to CSV, JSON, Excel or XML.",
    "version": "0.1",
    "x-build-id": "WXSBnirBn55dD3h5t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~courtlistener-citation-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-courtlistener-citation-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-citation-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-courtlistener-citation-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-citation-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-courtlistener-citation-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": "Search phrase",
            "type": "string",
            "description": "Full-text search across opinion text, case names and citations, for example <code>qualified immunity</code> or <code>chevron deference</code>. Leave it empty to list every opinion that matches the filters below. Boolean operators (AND, OR, NOT) and quoted phrases work."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many opinions to return. Free users: the run stops at 10 items, which is the preview. Paid users: optional, up to a maximum of 1,000,000 items. Leave it empty on a paid plan and the run defaults to 100."
          },
          "citation": {
            "title": "Exact citation",
            "type": "string",
            "description": "One reporter citation, for example <code>556 U.S. 662</code> or <code>410 U.S. 113</code>. Returns the single case that carries it, with every parallel citation. Combine it with a search phrase to search inside that case."
          },
          "citedOpinionId": {
            "title": "Cited-by graph: opinion ID",
            "minimum": 1,
            "type": "integer",
            "description": "Collect every opinion that cites this one. Take the number from the <code>opinionIds</code> column of an earlier run, for example <code>145875</code> for Ashcroft v. Iqbal, which returns over 12,000 citing opinions."
          },
          "courts": {
            "title": "Courts",
            "type": "array",
            "description": "Limit the search to these courts. Leave it empty to search every court CourtListener indexes, including the district, appellate and state courts that are not in this list. The 66 courts offered here are the federal appellate courts and the state high courts, the ones that produce citable precedent.",
            "items": {
              "type": "string",
              "enum": [
                "scotus",
                "ca1",
                "ca2",
                "ca3",
                "ca4",
                "ca5",
                "ca6",
                "ca7",
                "ca8",
                "ca9",
                "ca10",
                "ca11",
                "cadc",
                "cafc",
                "ala",
                "alaska",
                "ariz",
                "ark",
                "cal",
                "colo",
                "conn",
                "del",
                "dc",
                "fla",
                "ga",
                "haw",
                "idaho",
                "ill",
                "ind",
                "iowa",
                "kan",
                "ky",
                "la",
                "me",
                "md",
                "mass",
                "mich",
                "minn",
                "miss",
                "mo",
                "mont",
                "neb",
                "nev",
                "nh",
                "nj",
                "nm",
                "ny",
                "nc",
                "nd",
                "ohio",
                "okla",
                "or",
                "pa",
                "ri",
                "sc",
                "sd",
                "tenn",
                "tex",
                "texcrimapp",
                "utah",
                "vt",
                "va",
                "wash",
                "wva",
                "wis",
                "wyo"
              ],
              "enumTitles": [
                "U.S. Supreme Court",
                "U.S. Court of Appeals, First Circuit",
                "U.S. Court of Appeals, Second Circuit",
                "U.S. Court of Appeals, Third Circuit",
                "U.S. Court of Appeals, Fourth Circuit",
                "U.S. Court of Appeals, Fifth Circuit",
                "U.S. Court of Appeals, Sixth Circuit",
                "U.S. Court of Appeals, Seventh Circuit",
                "U.S. Court of Appeals, Eighth Circuit",
                "U.S. Court of Appeals, Ninth Circuit",
                "U.S. Court of Appeals, Tenth Circuit",
                "U.S. Court of Appeals, Eleventh Circuit",
                "U.S. Court of Appeals, D.C. Circuit",
                "U.S. Court of Appeals, Federal Circuit",
                "Supreme Court of Alabama",
                "Alaska Supreme Court",
                "Arizona Supreme Court",
                "Supreme Court of Arkansas",
                "California Supreme Court",
                "Supreme Court of Colorado",
                "Supreme Court of Connecticut",
                "Supreme Court of Delaware",
                "District of Columbia Court of Appeals",
                "Supreme Court of Florida",
                "Supreme Court of Georgia",
                "Hawaii Supreme Court",
                "Idaho Supreme Court",
                "Illinois Supreme Court",
                "Indiana Supreme Court",
                "Supreme Court of Iowa",
                "Supreme Court of Kansas",
                "Kentucky Supreme Court",
                "Supreme Court of Louisiana",
                "Supreme Judicial Court of Maine",
                "Court of Appeals of Maryland",
                "Massachusetts Supreme Judicial Court",
                "Michigan Supreme Court",
                "Supreme Court of Minnesota",
                "Mississippi Supreme Court",
                "Supreme Court of Missouri",
                "Montana Supreme Court",
                "Nebraska Supreme Court",
                "Nevada Supreme Court",
                "Supreme Court of New Hampshire",
                "Supreme Court of New Jersey",
                "New Mexico Supreme Court",
                "New York Court of Appeals",
                "Supreme Court of North Carolina",
                "North Dakota Supreme Court",
                "Ohio Supreme Court",
                "Supreme Court of Oklahoma",
                "Oregon Supreme Court",
                "Supreme Court of Pennsylvania",
                "Supreme Court of Rhode Island",
                "Supreme Court of South Carolina",
                "South Dakota Supreme Court",
                "Tennessee Supreme Court",
                "Texas Supreme Court",
                "Court of Criminal Appeals of Texas",
                "Utah Supreme Court",
                "Supreme Court of Vermont",
                "Supreme Court of Virginia",
                "Washington Supreme Court",
                "West Virginia Supreme Court",
                "Wisconsin Supreme Court",
                "Wyoming Supreme Court"
              ]
            }
          },
          "precedentialStatus": {
            "title": "Precedential status",
            "type": "array",
            "description": "Which kinds of opinion to include. Leave it empty and CourtListener applies its own default, which is published opinions only.",
            "items": {
              "type": "string",
              "enum": [
                "Published",
                "Unpublished",
                "Errata",
                "Separate",
                "In-chambers",
                "Relating-to",
                "Unknown"
              ],
              "enumTitles": [
                "Published (precedential)",
                "Unpublished (non-precedential)",
                "Errata",
                "Separate opinion",
                "In-chambers opinion",
                "Relating-to order",
                "Unknown"
              ]
            }
          },
          "minCitedByCount": {
            "title": "Minimum times cited",
            "minimum": 1,
            "type": "integer",
            "description": "Only return opinions cited at least this many times by later cases. Set it to 100 for landmark case law, 1000 for the few hundred opinions that anchor an entire doctrine."
          },
          "maxCitedByCount": {
            "title": "Maximum times cited",
            "minimum": 1,
            "type": "integer",
            "description": "Only return opinions cited fewer than this many times. Useful with the minimum above to slice a band of the citation curve."
          },
          "filedAfter": {
            "title": "Filed after",
            "type": "string",
            "description": "Only opinions filed on or after this date, written <code>YYYY-MM-DD</code>, for example <code>2015-01-01</code>."
          },
          "filedBefore": {
            "title": "Filed before",
            "type": "string",
            "description": "Only opinions filed on or before this date, written <code>YYYY-MM-DD</code>."
          },
          "caseName": {
            "title": "Case name",
            "type": "string",
            "description": "Match against the case caption only, for example <code>Roe v. Wade</code>. Narrower than the search phrase, which also reads the opinion text."
          },
          "judge": {
            "title": "Judge",
            "type": "string",
            "description": "Match the authoring or panel judge, for example <code>Scalia</code>."
          },
          "docketNumber": {
            "title": "Docket number",
            "type": "string",
            "description": "Match the docket number the court assigned, for example <code>19-1392</code>."
          },
          "orderBy": {
            "title": "Sort order",
            "enum": [
              "citeCount desc",
              "citeCount asc",
              "dateFiled desc",
              "dateFiled asc",
              "dateArgued desc",
              "dateArgued asc",
              "score desc"
            ],
            "type": "string",
            "description": "Most cited first is the default because it is the ordering that fills every citation column: a slip opinion filed last week has no reporter citation yet and no case has cited it.",
            "default": "citeCount desc"
          },
          "withCitationsOnly": {
            "title": "Only cases with a reporter citation",
            "type": "boolean",
            "description": "Drop opinions that no reporter has assigned a citation to yet. Recent slip opinions are the usual case. Off by default so nothing is hidden.",
            "default": false
          },
          "includeCitedCases": {
            "title": "Resolve the cases this opinion cites",
            "type": "boolean",
            "description": "Turn the <code>citedOpinionIds</code> numbers into a <code>citedCases</code> array with the name, citation, court and date of each cited case. This costs one extra request per 20 references, so a run with it on is several times slower.",
            "default": false
          },
          "citedCasesLimit": {
            "title": "Cited cases per opinion",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many cited cases to resolve for each opinion when the option above is on. Landmark opinions cite hundreds, so the default of 20 keeps a run fast."
          },
          "courtListenerKey": {
            "title": "API key",
            "type": "string",
            "description": "Optional free CourtListener key. Anonymous callers are throttled at about 5 requests per minute; a key lifts that and makes large runs much faster. Get one at <a href=\"https://www.courtlistener.com/help/api/rest/\" target=\"_blank\">courtlistener.com/help/api/rest</a>. Leave it empty and the Actor runs anonymously.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "CourtListener is open, so the proxy is off by default. Turn it on to spread a long anonymous run across several exit IPs and dodge the 5 requests per minute throttle.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}