{
  "openapi": "3.0.1",
  "info": {
    "title": "New Orleans Code Enforcement - Cases, Violations, Hearings",
    "description": "New Orleans code enforcement (public open data, six linked corpora): cases, violations cited, inspections, hearings and judgments, abatements and the active pipeline, joined on the case id. Look up a property's case history, or filter by stage, status, code section, judgment or date.",
    "version": "0.0",
    "x-build-id": "2Q7wXeD93WQxPIO79"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~nola-code-enforcement/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-nola-code-enforcement",
        "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~nola-code-enforcement/runs": {
      "post": {
        "operationId": "runs-sync-j0401-nola-code-enforcement",
        "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~nola-code-enforcement/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-nola-code-enforcement",
        "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": {
          "corpus": {
            "title": "Corpus",
            "enum": [
              "cases",
              "violations",
              "inspections",
              "hearings",
              "abatements",
              "pipeline"
            ],
            "type": "string",
            "description": "Which table to query. cases = every case (the default); violations = the code sections cited; inspections = inspections performed; hearings = hearings and their judgments; abatements = City abatement actions; pipeline = the active pipeline (it includes recently closed cases; set oC=\"Open\" for live cases). Filters and groupBy differ by corpus.",
            "default": "cases"
          },
          "caseId": {
            "title": "Case id",
            "type": "string",
            "description": "Look up one case across the corpus by its numeric case id, e.g. '292742'. This is the key that joins every corpus. Exact match, not a substring. Blank = any.",
            "default": ""
          },
          "caseNumber": {
            "title": "Case number (contains)",
            "type": "string",
            "description": "Substring match on the human case number, e.g. '23-09269', 'MPM'. Available on cases, violations, inspections, hearings, abatements and pipeline. Blank = any.",
            "default": ""
          },
          "address": {
            "title": "Property address (contains)",
            "type": "string",
            "description": "Substring match on the property address or location, e.g. 'GENTILLY', 'ST CLAUDE'. Blank = any.",
            "default": ""
          },
          "stage": {
            "title": "Stage",
            "enum": [
              "",
              "1 - Inspection",
              "2 - Title Research",
              "3 - Hearing",
              "4 - Judgment",
              "5 - In Compliance",
              "6 - Case Closed",
              "X - Processing"
            ],
            "type": "string",
            "description": "Case stage. Available on cases and pipeline. Not every stage value applies to both. Blank = any.",
            "default": ""
          },
          "oC": {
            "title": "Open / closed",
            "enum": [
              "",
              "Open",
              "Closed"
            ],
            "type": "string",
            "description": "Whether the case is still open. Available on cases and pipeline. Blank = any.",
            "default": ""
          },
          "codeSection": {
            "title": "Code section",
            "type": "string",
            "description": "The municipal code section cited (corpus=violations), e.g. '26-160(a)', '26-157'. 70 distinct sections. Blank = any.",
            "default": ""
          },
          "judgment": {
            "title": "Judgment (contains)",
            "type": "string",
            "description": "Hearing judgment (corpus=hearings), e.g. 'Guilty', 'Dismissed', 'Reset'. Blank = any.",
            "default": ""
          },
          "inspectionType": {
            "title": "Inspection type (contains)",
            "type": "string",
            "description": "Substring match on the inspection type (corpus=inspections), e.g. 'Reinspection', 'Initial', 'Demolition', 'Posting'. The source has 40+ types, so this is a contains-match rather than a fixed list. Blank = any.",
            "default": ""
          },
          "inspectionResult": {
            "title": "Inspection result (contains)",
            "type": "string",
            "description": "The inspection outcome (corpus=inspections), e.g. 'Violation', 'Complete', 'No Violation'. Blank = any.",
            "default": ""
          },
          "status": {
            "title": "Abatement status",
            "enum": [
              "",
              "Complete",
              "No Access",
              "Violation: No WIP"
            ],
            "type": "string",
            "description": "The abatement's status (corpus=abatements). Blank = any.",
            "default": ""
          },
          "dateFrom": {
            "title": "On or after",
            "type": "string",
            "description": "Earliest date for the corpus's own date column: cases/pipeline = filed, violations = violation date, inspections = inspection date, hearings = hearing date, abatements = filed. YYYY-MM-DD. Blank = any.",
            "default": ""
          },
          "dateTo": {
            "title": "On or before",
            "type": "string",
            "description": "Latest date for the corpus's own date column, YYYY-MM-DD. Blank = any.",
            "default": ""
          },
          "recentDays": {
            "title": "Within the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Only records whose date is within the last N days. Cannot be combined with 'On or after' (the run fails if both are set). 0 = off.",
            "default": 0
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "rows",
              "aggregate"
            ],
            "type": "string",
            "description": "rows = records matching your filters (default). aggregate = one count row per group (see groupBy).",
            "default": "rows"
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "",
              "stage",
              "oC",
              "codeSection",
              "inspectionType",
              "inspectionResult",
              "judgment",
              "status",
              "exitReason",
              "councilDistrict"
            ],
            "type": "string",
            "description": "Which dimension to aggregate over (mode=aggregate). Blank = the corpus's default (cases/pipeline -> stage, violations -> codeSection, inspections -> inspectionType, hearings -> judgment, abatements -> status). A dimension that does not exist on the chosen corpus is rejected. Every group is returned.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}