{
  "openapi": "3.0.1",
  "info": {
    "title": "WA Seattle Building Permits",
    "description": "Seattle, WA building permits (public open data, 193k records): the city's construction-permit register - estimated project cost, housing units added/removed + housing-category labels, permit class, and plan-review cycle depth. Filter by type/status/category/cost or aggregate.",
    "version": "0.0",
    "x-build-id": "UZhkhKcNQatyvZxoU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~wa-seattle-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-wa-seattle-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~wa-seattle-permits/runs": {
      "post": {
        "operationId": "runs-sync-j0401-wa-seattle-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~wa-seattle-permits/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-wa-seattle-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": "The permit's mapped type: building, demolition, roof, grading, or ECA/shoreline exemption. Blank = any.",
            "default": ""
          },
          "status": {
            "title": "Status",
            "type": "string",
            "description": "Permit status. Use a source value: Completed, Issued, Expired, Withdrawn, Canceled, Reviews In Process, Ready for Issuance, Additional Info Requested, ... Blank = any. Most of the file is Completed; live work sits in the in-progress family (Reviews In Process / Ready for Issuance / Issued / Scheduled...).",
            "default": ""
          },
          "permitClass": {
            "title": "Permit class",
            "type": "string",
            "description": "residential / non-residential (the broad split), or free text over the finer class values (e.g. 'Single Family/Duplex', 'Commercial', 'Multifamily').",
            "default": ""
          },
          "housingCategory": {
            "title": "Housing category",
            "type": "string",
            "description": "The city's housing label where assigned: Middle Housing, Large Multifamily, Single-Family Add/Alt, Commercial Add/Alt, Pre-Approved DADU Plans, Multifamily - Other. Blank = any.",
            "default": ""
          },
          "address": {
            "title": "Address",
            "type": "string",
            "description": "Street number or street name from the permit's address line, e.g. '23RD AVE' or '13519'.",
            "default": ""
          },
          "contractor": {
            "title": "Contractor company",
            "type": "string",
            "description": "Contractor company name (fuzzy). Note: Seattle records the contractor on only ~17% of this register's permits - present when the city has it, not a headline field.",
            "default": ""
          },
          "zoning": {
            "title": "Zoning",
            "type": "string",
            "description": "Zoning designation on the parcel, e.g. 'SF 5000' or 'LR3' (fuzzy).",
            "default": ""
          },
          "costMin": {
            "title": "Estimated project cost at least ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits with an estimated project cost at least this amount (the cost column is numeric, so this range-filters on the register). Populated on ~82% of the file.",
            "default": 0
          },
          "costMax": {
            "title": "Estimated project cost less than ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits with an estimated project cost below this amount.",
            "default": 0
          },
          "housingUnitsMin": {
            "title": "Housing units at least",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits that carry at least this many housing units (e.g. 5+ = a multifamily-scale project). ~30k permits carry at least one housing unit.",
            "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": ""
          },
          "appliedFrom": {
            "title": "Applied on or after",
            "type": "string",
            "description": "Only permits applied on/after this date.",
            "default": ""
          },
          "appliedTo": {
            "title": "Applied before",
            "type": "string",
            "description": "Only permits applied before this date.",
            "default": ""
          },
          "planReviewedOnly": {
            "title": "Only permits that ran a full plan review",
            "type": "boolean",
            "description": "When on, returns only permits whose application went through plan review, so the review-depth fields (numberReviewCycles, totalDaysPlanReview, planReviewCompleteDate, readyToIssueDate) are populated and meaningful (~33k permits).",
            "default": false
          },
          "recentOnly": {
            "title": "Issued in the last 30 days only",
            "type": "boolean",
            "description": "When on, returns only permits issued in the last 30 days (the freshest issuances). Same as choosing the 'recent' mode.",
            "default": false
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "permitType",
              "permitClass",
              "status",
              "housingCategory"
            ],
            "type": "string",
            "description": "Which dimension to aggregate over. status -> the live vs done mix; permitClass -> Residential vs Non-Residential; permitType -> building / demolition / ECA; housingCategory -> the city's housing-program labels.",
            "default": "status"
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of 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": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}