{
  "openapi": "3.0.1",
  "info": {
    "title": "NYC OATH Hearings - Administrative Tribunal Case Records",
    "description": "NYC OATH administrative tribunal cases (public open data, 22M cases): issuing agency, violation date and location, hearing / decision dates, outcome, fines and compliance status, plus up to ten charge slots. Filter by agency, result, borough or date.",
    "version": "0.0",
    "x-build-id": "efDJhlSgQjvHNpmxT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~nyc-oath-hearings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-nyc-oath-hearings",
        "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/j0401~nyc-oath-hearings/runs": {
      "post": {
        "operationId": "runs-sync-j0401-nyc-oath-hearings",
        "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/j0401~nyc-oath-hearings/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-nyc-oath-hearings",
        "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": {
          "agency": {
            "title": "Issuing agency (contains)",
            "type": "string",
            "description": "Substring match on the issuing agency, e.g. 'BUILDINGS', 'SANITATION', 'TAXI'. Blank = any.",
            "default": ""
          },
          "respondent": {
            "title": "Respondent last name (contains)",
            "type": "string",
            "description": "Substring match on the respondent's last name. Blank = any.",
            "default": ""
          },
          "street": {
            "title": "Street name (contains)",
            "type": "string",
            "description": "Substring match on the violation street name. Blank = any.",
            "default": ""
          },
          "chargeCode": {
            "title": "Charge code (contains)",
            "type": "string",
            "description": "Substring match on the first charge's code, e.g. 'H2'. Blank = any.",
            "default": ""
          },
          "ticketNumber": {
            "title": "Ticket number (contains)",
            "type": "string",
            "description": "Substring match on the ticket number. Blank = any.",
            "default": ""
          },
          "hearingResult": {
            "title": "Hearing result",
            "enum": [
              "",
              "IN VIOLATION",
              "DEFAULTED",
              "WRITTEN OFF",
              "DISMISSED",
              "DEFAULT",
              "SETTL IN-VIO",
              "SUSTAINED",
              "Sustained",
              "STIPULATED",
              "ADMIT IN-VIO",
              "Default/ No Appearance",
              "DEFAULT/NO APPEARNCE",
              "POP IN-VIOL",
              "Dismissed Defective Service",
              "Dismissed No Violation/On the Merits",
              "ADJOURNED",
              "FINED",
              "REOPENED/DEFAULT/CON",
              "POP/IN-VIOL",
              "Dismissed - Wrong Party Named",
              "NONE",
              "ADMITTED SETTLED",
              "Default continued",
              "Dismissed Defective Summons/Charge (Defective on its face)",
              "Withdrawn prior to hearing",
              "Dismissed - Other Reasons",
              "APPEAL DECIS. CONFRM",
              "WITHDRAWN",
              "Adjournment - At request of Respondent",
              "Dismissed - No NOV",
              "N/A",
              "HBAM Adjourned for In-person- Other reasons",
              "Second Default/ No Appearance",
              "Adjournment req by respondent",
              "Dismissed - No Prima Facie Case",
              "REOPEN/DEFAULT/MAIL",
              "Dismissed - Failure to Prosecute",
              "Dismissed No Jurisdiction",
              "Adjournment - Inspector",
              "ADMIT/IN-VIO",
              "APPEAL DECIS. REFUND",
              "HBAM Adjourned for In-person - Inspector",
              "Adjournment req for inspector by Respondent",
              "Dismissed - Missing / wrong code sec.",
              "RT'N APPL NOTE/MAIL",
              "Dismissed - Failure to prosecute",
              "Adjournment req by petitioner",
              "Reserved",
              "Adjourned for inspector",
              "Withdrawal after adjudication",
              "DENIED",
              "Adjourned for other reasons",
              "Dismissed - Successfully Disputed Ownership",
              "Adjournment req for inspector by Petitioner",
              "DEFAULT/VACATED",
              "RQST FOR INFO/MAIL",
              "Third Default/ No Appearance",
              "DOTR",
              "RESERVED",
              "COSRV INVIO",
              "STAY",
              "Adjournment - Attorney",
              "DMRT",
              "MAIL/DISMISSED PARTY",
              "MOTION TO REOPEN DEN",
              "SUSPENDED",
              "MAIL/DISMISSED SVC",
              "MOTION TO REOPEN GNT",
              "ADJORNMENT RQST/MAIL",
              "Select",
              "Withdrawn",
              "Adjournment - Translator",
              "Adjournment - Locate NOV",
              "HBAM Adjourned for Evidence/Documents"
            ],
            "type": "string",
            "description": "Exact outcome. The tribunal's own clerks typed these, so it is a 74-value list with many near-duplicates - 'IN VIOLATION', 'ADMIT IN-VIO' and 'POP IN-VIOL' are separate values, matched exactly and never as substrings. Blank = any. 41% of cases have no result recorded yet and come back with an empty field.",
            "default": ""
          },
          "hearingStatus": {
            "title": "Hearing status",
            "enum": [
              "",
              "PAID IN FULL",
              "WRITTEN OFF",
              "HEARING COMPLETED",
              "DOCKETED",
              "DEFAULTED",
              "NEW ISSUANCE",
              "RESCHEDULED",
              "APPEAL DECIS RENDERD",
              "PAY BEFORE ISS",
              "ASSIGNED",
              "STAYED",
              "STIPULATION OFFERED",
              "HRG BEFORE ASSIGN",
              "ACCEPTED FOR APPEAL",
              "ASSIGNED TO APPEALS",
              "STIP NEEDS REVIEW",
              "PERFECTION REQUIRED",
              "STAY DENIED",
              "STAY REQUESTED",
              "ADJOURNED"
            ],
            "type": "string",
            "description": "Exact hearing status, e.g. 'PAID IN FULL', 'HEARING COMPLETED', 'DOCKETED'. Blank = any.",
            "default": ""
          },
          "complianceStatus": {
            "title": "Compliance status",
            "enum": [
              "",
              "All Terms Met",
              "Penalty Due",
              "Compliance Due",
              "Both Due"
            ],
            "type": "string",
            "description": "Exact compliance status: 'All Terms Met', 'Penalty Due', 'Compliance Due', 'Both Due'. Blank = any.",
            "default": ""
          },
          "borough": {
            "title": "Violation borough",
            "enum": [
              "",
              "BROOKLYN",
              "MANHATTAN",
              "QUEENS",
              "BRONX",
              "NOT NYC",
              "STATEN IS"
            ],
            "type": "string",
            "description": "Borough where the violation occurred. 'NOT NYC' covers summonses issued outside the five boroughs. Blank = any.",
            "default": ""
          },
          "violationFrom": {
            "title": "Violation date from",
            "type": "string",
            "description": "Earliest violation date, YYYY-MM-DD. Blank = any.",
            "default": ""
          },
          "violationTo": {
            "title": "Violation date to",
            "type": "string",
            "description": "Latest violation date, YYYY-MM-DD. Blank = any.",
            "default": ""
          },
          "hearingFrom": {
            "title": "Hearing date from",
            "type": "string",
            "description": "Earliest hearing date, YYYY-MM-DD. Blank = any.",
            "default": ""
          },
          "hearingTo": {
            "title": "Hearing date to",
            "type": "string",
            "description": "Latest hearing date, YYYY-MM-DD. Blank = any.",
            "default": ""
          },
          "decisionFrom": {
            "title": "Decision date from",
            "type": "string",
            "description": "Earliest decision date, YYYY-MM-DD. Note 34% of cases have no decision yet; a date range still returns them. Blank = any.",
            "default": ""
          },
          "decisionTo": {
            "title": "Decision date to",
            "type": "string",
            "description": "Latest decision date, YYYY-MM-DD. Blank = any.",
            "default": ""
          },
          "recentDays": {
            "title": "Violated within the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Only cases whose violation date falls within the last N days. Ignored when 'Violation date from' is set. 0 = off.",
            "default": 0
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "rows",
              "aggregate"
            ],
            "type": "string",
            "description": "rows = hearing cases matching your filters (default). aggregate = one count row per group (see groupBy).",
            "default": "rows"
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "",
              "agency",
              "borough",
              "complianceStatus",
              "hearingResult",
              "hearingStatus"
            ],
            "type": "string",
            "description": "Which dimension to aggregate over (mode=aggregate). Blank = agency. Every group is returned - aggregate mode is not cut off by maxResults. Date dimensions are deliberately absent: clerical typos split the decision column into 1,213 distinct 'years'.",
            "default": ""
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of records pushed in rows mode (0 = default 50; up to 2,000 per run). Each record is metered individually, so there is no per-run charge cap. Aggregate mode returns every group.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}