{
  "openapi": "3.0.1",
  "info": {
    "title": "Court Records & Case Law Scraper — Dockets, Party Name Search",
    "description": "Search US federal court dockets, case filings (PACER/RECAP mirror) and published opinions via CourtListener free API — no key, no signup. 41 flat fields incl. parties, attorneys, judge, citations, filed-date range, unpublished-opinion filter. Watch mode. $0.002/result, no start fee. Case law API",
    "version": "0.1",
    "x-build-id": "gQLgdQgfbm58heq7E"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchsmith~court-records-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchsmith-court-records-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/fetchsmith~court-records-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fetchsmith-court-records-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/fetchsmith~court-records-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fetchsmith-court-records-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 query",
            "type": "string",
            "description": "Full-text search across case names, party/attorney names, docket text and opinion bodies. Supports quoted phrases (\"fair use\") and boolean operators (AND, OR, NOT). Leave empty to browse everything matching the other filters.",
            "default": "patent infringement"
          },
          "recordType": {
            "title": "Record type",
            "enum": [
              "both",
              "opinions",
              "dockets"
            ],
            "type": "string",
            "description": "Which CourtListener index to search. Dockets are the PACER/RECAP mirror (federal case dockets with parties, attorneys and filing entries). Opinions are published court decisions with citations. They are separate indexes — a case in one is often absent from the other.",
            "default": "both"
          },
          "courts": {
            "title": "Courts",
            "uniqueItems": true,
            "type": "array",
            "description": "CourtListener court IDs — the short slug in a courtlistener.com/court/<id>/ URL. Examples: \"scotus\" (Supreme Court), \"ca9\" (9th Circuit), \"cand\" (N.D. Cal.), \"cacb\" (Bankr. C.D. Cal.), \"nysd\" (S.D.N.Y.). 3,359 federal, state and specialty courts exist. Leave empty for all courts. An unrecognised ID is not rejected upstream — it silently matches nothing — so this Actor checks every ID against CourtListener's own full court list and warns in the run log naming any it does not publish.",
            "items": {
              "type": "string"
            }
          },
          "partyName": {
            "title": "Party name",
            "type": "string",
            "description": "RECAP dockets only. Server-side search over the parties named on a docket (plaintiff, defendant, intervenor, ...). Quote a full name for an exact match (\"Google LLC\") and combine with OR for several (\"Google LLC\" OR \"Apple Inc\"). CourtListener's OPINION index does not carry party data at all and silently ignores this field, so setting it restricts the run to dockets — the Actor says so in the log rather than returning unfiltered opinions."
          },
          "attorneyName": {
            "title": "Attorney name",
            "type": "string",
            "description": "RECAP dockets only. Server-side search over the attorneys of record on a docket. Same quoting/OR rules as Party name. Also restricts the run to dockets for the same reason (the opinion index has no attorney data)."
          },
          "docketNumber": {
            "title": "Docket number",
            "type": "string",
            "description": "Case/docket number lookup, e.g. \"1:20-cv-03590\". Works on BOTH indexes and is a real field search, not full-text — much more precise than putting the number in the search query. Formats vary by court; if you get nothing, try without the office prefix (\"20-cv-03590\")."
          },
          "judge": {
            "title": "Judge",
            "type": "string",
            "description": "Opinions only. Server-side search over the authoring judge(s) of an opinion (\"Posner\", \"Sotomayor\"). The RECAP docket index ignores this field, so setting it restricts the run to opinions."
          },
          "filedAfter": {
            "title": "Filed after",
            "type": "string",
            "description": "Earliest filing date, YYYY-MM-DD (e.g. \"2024-06-05\"). Leave empty for no lower bound (the opinion archive reaches back to the 1700s). Both bounds are INCLUSIVE — verified live: a filedAfter=filedBefore=2024-06-13 window returns the 6 SCOTUS opinions filed that day. \"2024-6-5\", \"2024/6/5\" and \"20240605\" are all accepted and normalized. Anything else STOPS the run with an error instead of being ignored, because a dropped date bound would silently widen the search to the whole archive and bill you for it; US-style \"06/15/2024\" is rejected on purpose since 06/15 and 15/06 cannot be told apart."
          },
          "filedBefore": {
            "title": "Filed before",
            "type": "string",
            "description": "Latest filing date, YYYY-MM-DD (e.g. \"2024-06-09\"). Leave empty for no upper bound. Inclusive, and parsed exactly as strictly as Filed after — see that field."
          },
          "opinionStatus": {
            "title": "Opinion status",
            "enum": [
              "published",
              "unpublished",
              "any"
            ],
            "type": "string",
            "description": "Opinions mode only. CourtListener's opinion index defaults to PUBLISHED opinions only when this is left as-is — verified live, the drop varies by query (5.7%-37.2% across 4 topics tested, not a fixed number) and is silently absent unless you ask for it. \"Any\" returns every real status (published, unpublished, errata, separate, in-chambers, relating-to, and unknown) — not just published+unpublished.",
            "default": "published"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "dateFiledDesc",
              "dateFiledAsc"
            ],
            "type": "string",
            "description": "Server-side sort, verified live: \"dateFiled asc\"/\"desc\" return the identical total count as no sort, just reordered (an opinion from 1746 first vs. today first). Restricted to Filing date because it is the one sort field confirmed to work correctly on BOTH indexes — CourtListener's citation-count sort is opinions-only and returns a server error on the docket index. With record type \"both\", each index is sorted on its own; the two streams are not merged into one combined order (opinions come first, then dockets, per Max results). Not recommended together with Watch label set to \"Oldest first\": an incremental run then walks from the oldest match forward and may have to page through a long run of already-delivered records before reaching anything new.",
            "default": "relevance"
          },
          "startUrl": {
            "title": "CourtListener search URL",
            "type": "string",
            "description": "Optional shortcut: build the search on courtlistener.com, then paste the address bar here — e.g. \"https://www.courtlistener.com/?q=patent&type=r&court=cand&filed_after=2024-01-01\". An API URL (\"https://www.courtlistener.com/api/rest/v4/search/?q=patent&type=o\") works too — both use the same parameters. Whatever the URL mentions (search query, court(s), filed-after/before dates, stat_Published/stat_Unpublished checkboxes) REPLACES the matching field below; anything it doesn't mention still comes from the fields below. Only Opinions (type=o) and RECAP (type=r) URLs are supported — CourtListener's Oral Arguments/Judges/Parenthetical searches are different record shapes this Actor does not cover. Max results and the watch label always apply regardless."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many records. With recordType \"both\" the budget is shared across the two indexes (opinions first, then dockets).",
            "default": 100
          },
          "watchLabel": {
            "title": "Watch label (incremental mode)",
            "type": "string",
            "description": "Optional. Name this saved search to get ONLY records that are new since its last run. The first run on a label records the current matches as a baseline and returns zero results (you are charged nothing); every run after that returns only what appeared since. Changing any filter starts a fresh baseline under the same label. Leave empty for a normal one-off run."
          },
          "watchChanges": {
            "title": "Also alert when a docket case closes",
            "type": "boolean",
            "description": "Only used with watchLabel, and only affects dockets (RECAP). When on, a docket you were already alerted on is re-delivered (charged again) if its case is terminated after you first saw it — CourtListener keeps the docket's own id stable when a case closes, so without this option a buyer never learns a watched case ended, no matter how long the schedule runs. Re-delivered rows are tagged with _watchChangeType and _watchPrevious showing exactly what moved. Opinions have no comparable mutable field and are unaffected either way. Off by default, so a plain watchLabel only ever alerts on brand-new records, same as before this option existed.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL (notify on completion)",
            "type": "string",
            "description": "Optional. An http(s) URL to POST a small JSON summary to when the run finishes — records pushed, rows scanned, pages fetched, CourtListener's own reported total, watch-label new count if Watch label is set, and the run's dataset ID so you can fetch the results. A convenience for callers who want a completion ping without setting up an Apify platform webhook (which needs separate Console/API configuration per Task, not per run). Best-effort: a failed or slow webhook is logged as a warning and never fails the run or affects charging — it fires after every record has already been pushed and charged. Leave empty to skip."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}