{
  "openapi": "3.0.1",
  "info": {
    "title": "US Building Permits with Job Types & Solar kW",
    "description": "Recent building permits from official open data of 11 US cities and counties, tagged by job type (solar, battery, EV charger, roof, HVAC, ADU, new homes...) with solar kW, battery kWh, new units, ZIP income and home value, and the contractor's state license status.",
    "version": "0.7",
    "x-build-id": "KzVI3RuksRZCjSSoz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blazume~us-building-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blazume-us-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/blazume~us-building-permits/runs": {
      "post": {
        "operationId": "runs-sync-blazume-us-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/blazume~us-building-permits/run-sync": {
      "post": {
        "operationId": "run-sync-blazume-us-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": {
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Cities to read. Most publish daily; Los Angeles weekly; Seattle's building permits run a few days behind. Boston is available for the last 12 months, currently up to November 2, 2026 (paused, see the README). Chicago, Minneapolis and Miami-Dade publish no ZIP codes, so they are skipped when you set ZIP codes.",
            "items": {
              "type": "string",
              "enum": [
                "new-york",
                "los-angeles",
                "chicago",
                "boston",
                "san-francisco",
                "seattle",
                "austin",
                "washington-dc",
                "minneapolis",
                "sacramento-county",
                "miami-dade"
              ],
              "enumTitles": [
                "New York, NY",
                "Los Angeles, CA",
                "Chicago, IL",
                "Boston, MA",
                "San Francisco, CA",
                "Seattle, WA",
                "Austin, TX",
                "Washington, DC",
                "Minneapolis, MN",
                "Sacramento County, CA",
                "Miami-Dade County, FL"
              ]
            },
            "default": [
              "austin"
            ]
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Permits issued in the last N days, counting today. Default 7, or 14 with 'Only new'. Ignored when 'From' is set.",
            "default": 7
          },
          "since": {
            "title": "From (issue date)",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Optional: permits issued on or after this day."
          },
          "until": {
            "title": "To (issue date)",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Optional: permits issued on or before this day. Empty = today."
          },
          "jobTypes": {
            "title": "Job types",
            "type": "array",
            "description": "Only permits covering at least one of these job types. Empty = all permits.",
            "items": {
              "type": "string",
              "enum": [
                "solar",
                "battery",
                "ev-charger",
                "electrical-service",
                "roof",
                "hvac",
                "water-heater",
                "plumbing",
                "pool-spa",
                "adu",
                "new-single-family",
                "new-multifamily",
                "new-commercial",
                "addition",
                "remodel",
                "kitchen-bath",
                "windows-doors",
                "foundation-structural",
                "fence-deck-patio",
                "demolition",
                "fire-safety",
                "sign",
                "other"
              ],
              "enumTitles": [
                "Solar PV",
                "Battery storage",
                "EV charger",
                "Electrical service / panel",
                "Roof",
                "HVAC / heat pump",
                "Water heater",
                "Plumbing",
                "Pool / spa",
                "ADU (accessory dwelling)",
                "New single-family home",
                "New multifamily",
                "New commercial building",
                "Addition",
                "Remodel / alteration",
                "Kitchen / bath",
                "Windows / doors",
                "Foundation / structural",
                "Fence / deck / patio",
                "Demolition",
                "Fire alarm / sprinkler",
                "Sign",
                "Other"
              ]
            }
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "any",
              "residential",
              "commercial"
            ],
            "type": "string",
            "description": "Permits whose property type cannot be told are kept only with 'Any'.",
            "default": "any"
          },
          "minValuationUsd": {
            "title": "Minimum job value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits with a stated job value of at least this amount. Many trade permits state no value and are then left out."
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Only permits in these 5-digit ZIP codes, e.g. 78704. Empty = the whole city.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only permits whose type or description contains at least one of these words (not case-sensitive), e.g. skylight or elevator. Use it for work outside the job types above; it combines with them.",
            "items": {
              "type": "string"
            }
          },
          "useAi": {
            "title": "Refine tags with AI",
            "type": "boolean",
            "description": "Keyword rules always run. With this on, a language model (Claude Haiku) reviews each permit to fix job types and read solar kW, battery kWh, EV chargers and new units. Included in the per-permit price; turn it off only if you want rule tags alone.",
            "default": true
          },
          "contractorLicenses": {
            "title": "Add contractor license status",
            "type": "boolean",
            "description": "Matches each permit's contractor to the state license board's list and adds its license number, classes, status (active, expired, suspended...), expiry, bond and workers' compensation where the board publishes them. Available for New York City, San Francisco, Sacramento County (California CSLB), Seattle (Washington L&I) and Austin (Texas TDLR, electrical and air-conditioning contractors only). Included in the per-permit price.",
            "default": true
          },
          "maxItems": {
            "title": "Max permits",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "You pay per permit delivered, so this also caps the cost of a run.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new since my last run",
            "type": "boolean",
            "description": "Return only permits this monitor has not delivered before, so a daily schedule gets each permit once. Looks back 14 days by default to catch permits that cities publish late.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps a separate 'only new' memory for each filter set. Leave empty for one default monitor."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}