{
  "openapi": "3.0.1",
  "info": {
    "title": "TX Austin Building Permits",
    "description": "Austin, TX building permits (public open data, 2.37M records) - the city's full consolidated permit file (electrical/plumbing/building/mechanical) with the contractor behind each job plus valuation, housing units and status. Filter by office/contractor/valuation or aggregate.",
    "version": "0.0",
    "x-build-id": "ji80Q8nbp9kCK3uVv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~tx-austin-building-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-tx-austin-building-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~tx-austin-building-permits/runs": {
      "post": {
        "operationId": "runs-sync-j0401-tx-austin-building-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~tx-austin-building-permits/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-tx-austin-building-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 city's last-30-days window (live work). aggregate = one count row per group (see groupBy).",
            "default": "rows"
          },
          "permitType": {
            "title": "Permit office / type",
            "type": "string",
            "description": "The consolidated office the permit was pulled under: electrical, plumbing, building, mechanical, driveway / sidewalk. Blank = any.",
            "default": ""
          },
          "status": {
            "title": "Status",
            "type": "string",
            "description": "Permit status. Use a source value: Active, Final, Expired, VOID, Withdrawn, Cancelled, ... Blank = any. Most of the file is Final (completed); live work is Active.",
            "default": ""
          },
          "permitClass": {
            "title": "Permit class",
            "type": "string",
            "description": "residential / commercial (the broad split), or free text over the finer class codes (e.g. 'Single Family', 'Commercial Remodel').",
            "default": ""
          },
          "workClass": {
            "title": "Work class",
            "type": "string",
            "description": "New / Remodel / Repair / Addition / Change Out / Demolition ... (fuzzy).",
            "default": ""
          },
          "address": {
            "title": "Address",
            "type": "string",
            "description": "Street number or street name from the permit's address line, e.g. 'Congress' or '1200'.",
            "default": ""
          },
          "contractor": {
            "title": "Contractor",
            "type": "string",
            "description": "Contractor company or contact name (fuzzy), e.g. 'KB Home' or 'D R Horton'. The file carries the job's contractor on ~half its records.",
            "default": ""
          },
          "councilDistrict": {
            "title": "Council district",
            "type": "string",
            "description": "Austin city council district (1-10).",
            "default": ""
          },
          "valuationMin": {
            "title": "Job valuation at least ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits with total job valuation at least this amount (the valuation column is numeric, so this range-filters on the register).",
            "default": 0
          },
          "valuationMax": {
            "title": "Job valuation less than ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits with total job valuation below this amount.",
            "default": 0
          },
          "housingUnitsMin": {
            "title": "Housing units at least",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits with at least this many housing units (e.g. 5+ = a multifamily project).",
            "default": 0
          },
          "recentOnly": {
            "title": "Issued in last 30 days only",
            "type": "boolean",
            "description": "When on, returns only permits the city flags as issued in its last-30-days window (the freshest work).",
            "default": false
          },
          "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": ""
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "permitTypeDescription",
              "permitClass",
              "status",
              "councilDistrict",
              "workClass",
              "calendarYearIssued"
            ],
            "type": "string",
            "description": "Which dimension to aggregate over. permitTypeDescription -> which office (electrical/plumbing/building/mechanical); status -> the live vs done mix; councilDistrict -> where; calendarYearIssued -> volume by year.",
            "default": "permitTypeDescription"
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}