{
  "openapi": "3.0.1",
  "info": {
    "title": "Chicago Building Permits - Contractors, Costs & Timeline",
    "description": "Chicago building permits (public open data, 846k records, live): the city's full permit register with the contractor / owner / architect behind each job, the fee schedule and reported cost, and the application-to-issue timeline. Filter by type/status/contractor/cost/ward.",
    "version": "0.0",
    "x-build-id": "Hl6SOlmyrwTQ5evTv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~chicago-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-chicago-permits",
        "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-permits/runs": {
      "post": {
        "operationId": "runs-sync-j0401-chicago-permits",
        "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-permits/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-chicago-permits",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "rows",
              "recent",
              "aggregate"
            ],
            "type": "string",
            "description": "rows = permits matching your filters (default). recent = permits issued in the last 30 days. aggregate = one count row per group (see groupBy).",
            "default": "rows"
          },
          "permitType": {
            "title": "Permit type",
            "type": "string",
            "description": "Permit type. Use a short word - express, easy, renovation, sign, new construction, elevator, demolition, scaffolding, porch, extension, reinstate - or the exact source value. Blank = any.",
            "default": ""
          },
          "status": {
            "title": "Status",
            "type": "string",
            "description": "Permit status: COMPLETE, ACTIVE, EXPIRED, SUSPENDED, PHASED PERMITTING, CANCELLED, REVOKED - or 'blank' for the express / easy / sign / elevator / scaffolding lanes the city does not status-track. Blank = any.",
            "default": ""
          },
          "reviewType": {
            "title": "Review type",
            "type": "string",
            "description": "The review lane: EXPRESS PERMIT PROGRAM, EASY PERMIT, STANDARD PLAN REVIEW, SIGN PERMIT, SELF CERT, EASY PERMIT WEB, CONVEYANCE DEVICE PERMIT, DEMOLITION PERMIT, TRADITIONAL DEVELOPER SERVICES, DIRECT DEVELOPER SERVICES. Blank = any.",
            "default": ""
          },
          "workType": {
            "title": "Work type",
            "type": "string",
            "description": "Work-classification substring, e.g. 'Electrical Work', 'Reroofing', 'Masonry', 'Solar', 'Fire Alarm'. Present on ~38% of the file. Blank = any.",
            "default": ""
          },
          "contractor": {
            "title": "Contractor name",
            "type": "string",
            "description": "Name of a party in any contact slot whose role is a contractor (general / electrical / plumbing / masonry / wrecking / ...). Substring match. Blank = any.",
            "default": ""
          },
          "owner": {
            "title": "Owner name",
            "type": "string",
            "description": "Name of a party in any contact slot whose role is an owner. Substring match. Blank = any.",
            "default": ""
          },
          "address": {
            "title": "Street name",
            "type": "string",
            "description": "Street name substring, e.g. 'HARRISON' or 'WESTERN'. Blank = any.",
            "default": ""
          },
          "communityArea": {
            "title": "Community area",
            "type": "string",
            "description": "Chicago community-area number (exact), e.g. '49' (Uptown). Blank = any.",
            "default": ""
          },
          "ward": {
            "title": "Ward",
            "type": "string",
            "description": "Chicago ward number (exact), e.g. '42'. Blank = any.",
            "default": ""
          },
          "keywords": {
            "title": "Work description keywords",
            "type": "string",
            "description": "Free-text match on the work description, e.g. 'solar', 'roof', 'garage'. Blank = any.",
            "default": ""
          },
          "costMin": {
            "title": "Reported cost at least ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits whose reported project cost is at least this amount (numeric range; populated on ~96% of the file).",
            "default": 0
          },
          "costMax": {
            "title": "Reported cost less than ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits whose reported project cost is below this amount. 0 = any.",
            "default": 0
          },
          "feeMin": {
            "title": "Total fee at least ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits whose total permit fee is at least this amount.",
            "default": 0
          },
          "feeMax": {
            "title": "Total fee less than ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits whose total fee is below this amount. 0 = any.",
            "default": 0
          },
          "issuedFrom": {
            "title": "Issued on or after",
            "type": "string",
            "description": "Only permits issued on/after this date (YYYY-MM-DD).",
            "default": ""
          },
          "issuedTo": {
            "title": "Issued before",
            "type": "string",
            "description": "Only permits issued before this date (YYYY-MM-DD).",
            "default": ""
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "status",
              "permitType",
              "reviewType",
              "workType",
              "communityArea",
              "ward"
            ],
            "type": "string",
            "description": "Which dimension to aggregate over (only mode=aggregate). status -> the done vs live vs express-lane mix; permitType / reviewType -> what kind of work; ward / communityArea -> where.",
            "default": "status"
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the records pushed (0 = up to 10k per run). Each record is metered individually, so there is no per-run charge cap. An aggregate has at most a few hundred groups.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}