{
  "openapi": "3.0.1",
  "info": {
    "title": "NY Court Decisions Scraper - Official Reports & Slip Opinions",
    "description": "Reads New York State court decisions from the Law Reporting Bureau: Court of Appeals, all four Appellate Divisions, both Appellate Terms, the Supreme Court Commercial Division and the trial courts, with full opinion text, judge, counsel and index numbers, back to 2003.",
    "version": "0.1",
    "x-build-id": "VKecypL7h72pfO13h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~ny-court-decisions-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-ny-court-decisions-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~ny-court-decisions-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-ny-court-decisions-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~ny-court-decisions-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-ny-court-decisions-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": {
          "courts": {
            "title": "Courts",
            "type": "array",
            "description": "Which of the nine index families published by the New York State Law Reporting Bureau to read. Commercial Division and Other Courts are the trial level, where contract, lending and merchant cash advance disputes are decided; the Appellate Divisions and the Court of Appeals are the appeals above them.",
            "items": {
              "type": "string",
              "enum": [
                "court-of-appeals",
                "appellate-division-first",
                "appellate-division-second",
                "appellate-division-third",
                "appellate-division-fourth",
                "appellate-term-first",
                "appellate-term-second",
                "commercial-division",
                "other-courts"
              ],
              "enumTitles": [
                "Court of Appeals",
                "Appellate Division, First Department",
                "Appellate Division, Second Department",
                "Appellate Division, Third Department",
                "Appellate Division, Fourth Department",
                "Appellate Term, First Department",
                "Appellate Term, Second Department",
                "Supreme Court, Commercial Division",
                "Other Courts (trial level)"
              ]
            }
          },
          "monthsBack": {
            "title": "Archived months to read",
            "minimum": 0,
            "maximum": 300,
            "type": "integer",
            "description": "How many archived monthly indexes to walk after the current month, newest first. 0 reads only the month in progress. The archive reaches back to 2003 for most courts and to 2013 for the Commercial Division, so 274 is the whole record."
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep only decisions whose text contains these. Matching against the case title is free; matching against the full opinion opens every decision page and costs a page read each, which is what makes a subject feed such as \"merchant cash advance\" possible.",
            "items": {
              "type": "string"
            }
          },
          "keywordScope": {
            "title": "Where to match keywords",
            "enum": [
              "title",
              "fullText"
            ],
            "type": "string",
            "description": "Case title only, or the full text of the opinion.",
            "default": "title"
          },
          "matchAllKeywords": {
            "title": "Require every keyword",
            "type": "boolean",
            "description": "Off keeps a decision that matches any keyword; on requires all of them.",
            "default": false
          },
          "counties": {
            "title": "Courts or counties",
            "type": "array",
            "description": "Keep only decisions whose court line contains one of these, for example \"New York County\", \"Kings\", \"Westchester\".",
            "items": {
              "type": "string"
            }
          },
          "judges": {
            "title": "Judges",
            "type": "array",
            "description": "Keep only decisions by these judges. Matched as a substring of the judge line.",
            "items": {
              "type": "string"
            }
          },
          "decidedAfter": {
            "title": "Decided on or after",
            "type": "string",
            "description": "ISO date, for example 2026-01-01."
          },
          "decidedBefore": {
            "title": "Decided on or before",
            "type": "string",
            "description": "ISO date, for example 2026-12-31."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Specific decision pages or monthly index pages on www.nycourts.gov to read instead of walking the courts above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "outputs": {
            "title": "Outputs",
            "type": "array",
            "description": "Decisions is the case rows. Months is the directory of every archived monthly index the Bureau publishes for the selected courts, which is how you find out what is available before asking for it.",
            "items": {
              "type": "string",
              "enum": [
                "decisions",
                "months"
              ],
              "enumTitles": [
                "Decisions",
                "Archived month directory"
              ]
            },
            "default": [
              "decisions"
            ]
          },
          "includeFullText": {
            "title": "Full opinion text",
            "type": "boolean",
            "description": "The complete text of the decision, opens the decision page.",
            "default": false
          },
          "includeParties": {
            "title": "Parties",
            "type": "boolean",
            "description": "The caption split into plaintiff and defendant sides.",
            "default": false
          },
          "includeCounsel": {
            "title": "Counsel",
            "type": "boolean",
            "description": "The attorneys and firms of record, as the opinion lists them.",
            "default": false
          },
          "includeDigest": {
            "title": "Digest classification",
            "type": "boolean",
            "description": "The Bureau's own subject classification for the decision.",
            "default": false
          },
          "includeCaseNumbers": {
            "title": "Index and docket numbers",
            "type": "boolean",
            "description": "Every index, indictment, docket, motion and appeal number printed on the decision.",
            "default": false
          },
          "includeFootnotes": {
            "title": "Footnotes",
            "type": "boolean",
            "description": "The numbered footnotes of the opinion.",
            "default": false
          },
          "includePublicationNote": {
            "title": "Publication note",
            "type": "boolean",
            "description": "Whether the opinion is uncorrected, subject to revision, or final in the printed Official Reports.",
            "default": false
          },
          "includePdfText": {
            "title": "Text of PDF decisions",
            "type": "boolean",
            "description": "About three quarters of the archived trial court decisions are published as PDF rather than HTML. Tick this to download and read those PDFs for the rows a run keeps. It cannot be used to search: one opinion PDF measured 10.4 MB, so scanning them is not practical and the full text keyword filter skips them.",
            "default": false
          },
          "proxyMode": {
            "title": "Proxy",
            "enum": [
              "none",
              "datacenter",
              "residential"
            ],
            "type": "string",
            "description": "The site answers this actor without a proxy from Apify, which is why none is the default. Datacenter exists for running from outside the United States, where the site geo-filters.",
            "default": "none"
          },
          "countryCode": {
            "title": "Proxy country",
            "type": "string",
            "description": "Two letter country code used when a proxy is on.",
            "default": "US"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}