{
  "openapi": "3.0.1",
  "info": {
    "title": "US Building Permits: Daily New Permits from 14 City Portals",
    "description": "No-code: daily new US building permits from 14 official city open-data portals (NYC, LA, Chicago, SF, Seattle, Austin, Dallas...). One clean table: type, value, address, contractor. Filter by type, value and ZIP in a simple form.",
    "version": "0.1",
    "x-build-id": "uNn1CekC7RIb7O8tG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alpine-data~us-building-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alpine-data-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/alpine-data~us-building-permits/runs": {
      "post": {
        "operationId": "runs-sync-alpine-data-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/alpine-data~us-building-permits/run-sync": {
      "post": {
        "operationId": "run-sync-alpine-data-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": "1. Cities",
            "type": "array",
            "description": "Which city or county open-data portals to search. Leave empty to search all of them. Each is the official government API, updated daily.",
            "items": {
              "type": "string",
              "enum": [
                "chicago",
                "nyc",
                "los-angeles",
                "san-francisco",
                "seattle",
                "austin",
                "dallas",
                "philadelphia",
                "boston",
                "cincinnati",
                "mesa",
                "baton-rouge",
                "montgomery-county-md",
                "marin-county"
              ],
              "enumTitles": [
                "Chicago, IL",
                "New York City, NY",
                "Los Angeles, CA",
                "San Francisco, CA",
                "Seattle, WA",
                "Austin, TX",
                "Dallas, TX",
                "Philadelphia, PA",
                "Boston, MA",
                "Cincinnati, OH",
                "Mesa, AZ",
                "Baton Rouge, LA",
                "Montgomery County, MD",
                "Marin County, CA"
              ]
            },
            "default": []
          },
          "daysBack": {
            "title": "2. Days back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Permits issued in the last N days (today included). 7 = the last week. Ignored if you set 'Issued from' below.",
            "default": 7
          },
          "permitTypes": {
            "title": "3. Permit types (optional)",
            "type": "array",
            "description": "Only these kinds of work. Leave empty for all. Detected from the city's permit type, work class and description, so one permit can match several types (e.g. a solar install is also electrical).",
            "items": {
              "type": "string",
              "enum": [
                "new_construction",
                "addition_alteration",
                "roofing",
                "solar",
                "electrical",
                "plumbing",
                "mechanical",
                "demolition",
                "pool",
                "other"
              ],
              "enumTitles": [
                "New construction",
                "Addition / alteration / remodel",
                "Roofing",
                "Solar / PV / battery storage",
                "Electrical",
                "Plumbing",
                "Mechanical / HVAC",
                "Demolition",
                "Pool / spa",
                "Other (signs, fences, scaffolds, grading, ...)"
              ]
            },
            "default": []
          },
          "maxResults": {
            "title": "4. Max permits",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many permits (newest first across all cities). You pay only for permits delivered, so this is your cost cap: the pre-filled 100 costs at most $0.32 (100 × $0.0032). Raise it (e.g. 5000) for full exports.",
            "default": 100
          },
          "minValuation": {
            "title": "Minimum project value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits whose declared value / estimated cost is at least this. 0 = no minimum. Permits without a value are skipped when you set a minimum.",
            "default": 0
          },
          "keywords": {
            "title": "Description contains (any of)",
            "type": "array",
            "description": "Only permits whose description or type contains at least one of these words, e.g. 'kitchen', 'ADU', 'EV charger', 'tenant improvement'. Not case-sensitive.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Only permits in these ZIP codes. A prefix works too: '787' = all ZIPs starting with 787. Leave empty for the whole city.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyNew": {
            "title": "Only new permits since my last run",
            "type": "boolean",
            "description": "Turn on for scheduled runs: each permit is delivered (and charged) only once. Already-delivered permits are skipped for free.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional. Give each monitor its own name if you run several 'only new' schedules with the same cities and filters.",
            "default": ""
          },
          "issuedFrom": {
            "title": "Issued from",
            "type": "string",
            "description": "First issue date (YYYY-MM-DD). Overrides 'Days back'. Max range is 366 days."
          },
          "issuedTo": {
            "title": "Issued to",
            "type": "string",
            "description": "Last issue date (YYYY-MM-DD). Empty = today."
          },
          "includeOwnerBusinessName": {
            "title": "Include owner business name",
            "type": "boolean",
            "description": "Adds ownerBusinessName where the city publishes the property owner AND it is a company (LLC, Inc., trust, developer...). Names of private individuals are never included.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}