{
  "openapi": "3.0.1",
  "info": {
    "title": "Chicago Ordinance Violations - Cases, Fines & Hearings",
    "description": "Chicago ordinance-violation citations from administrative hearings (824,745 rows): docket and notice numbers, address and ward, violation code and description, respondents, hearing date, disposition, imposed fine and costs, with a change stamp. Filter by address, ward, code or date.",
    "version": "0.0",
    "x-build-id": "RruxMPML4ulR531jm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~chicago-ordinance-violations/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-chicago-ordinance-violations",
        "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~chicago-ordinance-violations/runs": {
      "post": {
        "operationId": "runs-sync-j0401-chicago-ordinance-violations",
        "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~chicago-ordinance-violations/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-chicago-ordinance-violations",
        "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": {
          "address": {
            "title": "Address prefix",
            "type": "string",
            "description": "Violation-address prefix, case-insensitive, e.g. \"543 N LAWNDALE\"."
          },
          "ward": {
            "title": "Ward",
            "minimum": 0,
            "maximum": 50,
            "type": "number",
            "description": "Chicago ward number. 1-50 normally; the source also carries ward 0 (71 rows) and a blank ward (2,919 rows), which are selected with 0 or by leaving the field empty and filtering in rows mode."
          },
          "docketNumber": {
            "title": "Docket number",
            "type": "string",
            "description": "Exact administrative-hearing docket number, e.g. \"26BT00911A\"."
          },
          "novNumber": {
            "title": "Notice of violation number",
            "type": "string",
            "description": "Exact NOV number, e.g. \"26W0730889\"."
          },
          "respondent": {
            "title": "Respondent prefix",
            "type": "string",
            "description": "Cited-party name prefix, case-insensitive, e.g. \"HOMAN\"."
          },
          "disposition": {
            "title": "Case disposition",
            "type": "string",
            "description": "Exact disposition, e.g. Liable, Not Liable, Default, Non-Suit, Continuance, Dismissed Without Prejudice."
          },
          "violationCode": {
            "title": "Violation code",
            "type": "string",
            "description": "Violation code or a leading prefix to select a code family, e.g. \"0610\". Most codes are numeric; some carry a suffix such as 001000FR or EV1110."
          },
          "issuingDepartment": {
            "title": "Issuing department",
            "type": "string",
            "description": "Issuing department name. Every row in this extract is issued by \"Buildings\"."
          },
          "minFine": {
            "title": "Minimum imposed fine (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only rows whose imposed fine is at least this amount."
          },
          "dateFrom": {
            "title": "Violation date from",
            "type": "string",
            "description": "ISO date YYYY-MM-DD on the violation date."
          },
          "dateTo": {
            "title": "Violation date to",
            "type": "string",
            "description": "ISO date YYYY-MM-DD, inclusive, on the violation date."
          },
          "hearingFrom": {
            "title": "Hearing date from",
            "type": "string",
            "description": "ISO date YYYY-MM-DD on the administrative hearing date (future scheduled hearings included)."
          },
          "hearingTo": {
            "title": "Hearing date to",
            "type": "string",
            "description": "ISO date YYYY-MM-DD, inclusive, on the hearing date."
          },
          "updatedSince": {
            "title": "Modified since",
            "type": "string",
            "description": "ISO date YYYY-MM-DD; only rows whose source last-modified date is on or after it. Use it to pull a daily or weekly delta."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "",
              "rows",
              "cases",
              "aggregate"
            ],
            "type": "string",
            "description": "rows = citations (default). cases = one row per administrative docket and hearing date, with citationCount and that hearing's fine counted once instead of once per citation (a docket heard twice yields two coherent rows). aggregate = one row per group.",
            "default": ""
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "",
              "ward",
              "disposition",
              "violationCode",
              "violationDescription",
              "streetName",
              "year"
            ],
            "type": "string",
            "description": "Dimension for mode=aggregate (blank = ward). Every group is returned; implausible violation dates are bucketed as \"suspect\" under year.",
            "default": ""
          },
          "metric": {
            "title": "Aggregate metric",
            "enum": [
              "",
              "count"
            ],
            "type": "string",
            "description": "Only count. The source repeats the case-level fine and costs on every citation row of a docket, so a dollar sum would multiply each case fine by its citation count - no money aggregate is offered; take one row per docket and hearing date with mode=cases instead.",
            "default": ""
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on records pushed in rows and cases mode (0 = default 50; up to 5,000 per run). Aggregate mode returns every group and ignores it. Each record is metered individually, so there is no per-run charge cap.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}