{
  "openapi": "3.0.1",
  "info": {
    "title": "Building Permits Scraper: Contractor, Solar & Roofing Leads",
    "description": "US building permits from city and county open-data portals (Chicago, NYC, Los Angeles, Austin, Seattle and 13 more): address, valuation, contractor name, phone and licence, owner. Construction leads by trade (solar, roofing, HVAC, pool), date and value. Export to JSON, CSV or Excel, or via API.",
    "version": "1.0",
    "x-build-id": "8Lcy2eYzpANjgN7uy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~building-permits-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-building-permits-scraper",
        "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/steadyscrape~building-permits-scraper/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-building-permits-scraper",
        "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/steadyscrape~building-permits-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-building-permits-scraper",
        "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",
        "required": [
          "jurisdictions"
        ],
        "properties": {
          "jurisdictions": {
            "title": "Cities and counties",
            "minItems": 1,
            "type": "array",
            "description": "The portals to read, each one's newest permits first. Every permit row names its portal, dataset and licence. Read today: Chicago, IL, New York City, NY, Los Angeles, CA, San Francisco, CA, Seattle, WA, Austin, TX, Dallas, TX, Orlando, FL, Mesa, AZ, Cincinnati, OH, Baton Rouge, LA (East Baton Rouge Parish), New Orleans, LA, Montgomery County, MD, Marin County, CA, Norfolk, VA, San Diego County (unincorporated), CA, Cambridge, MA, Calgary, AB (Canada). Montgomery County publishes its permits about two weeks late.",
            "items": {
              "type": "string",
              "enum": [
                "chicago",
                "new-york-city",
                "los-angeles",
                "san-francisco",
                "seattle",
                "austin",
                "dallas",
                "orlando",
                "mesa",
                "cincinnati",
                "baton-rouge",
                "new-orleans",
                "montgomery-county-md",
                "marin-county",
                "norfolk",
                "san-diego-county",
                "cambridge-ma",
                "calgary"
              ],
              "enumTitles": [
                "Chicago, IL",
                "New York City, NY",
                "Los Angeles, CA",
                "San Francisco, CA",
                "Seattle, WA",
                "Austin, TX",
                "Dallas, TX",
                "Orlando, FL",
                "Mesa, AZ",
                "Cincinnati, OH",
                "Baton Rouge, LA (East Baton Rouge Parish)",
                "New Orleans, LA",
                "Montgomery County, MD",
                "Marin County, CA",
                "Norfolk, VA",
                "San Diego County (unincorporated), CA",
                "Cambridge, MA",
                "Calgary, AB (Canada)"
              ]
            },
            "default": [
              "chicago",
              "new-york-city",
              "los-angeles",
              "austin",
              "seattle"
            ]
          },
          "issuedWithinDays": {
            "title": "Issued in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Permits issued from this many days ago up to today. Ignored when the dates below are set.",
            "default": 30
          },
          "issuedFrom": {
            "title": "Issued from (optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "The first issue day, YYYY-MM-DD. Leave empty to count back from the last day."
          },
          "issuedTo": {
            "title": "Issued to (optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "The last issue day, YYYY-MM-DD. Leave empty for today."
          },
          "trades": {
            "title": "Trades",
            "type": "array",
            "description": "Only permits for these trades, read in the permit's type and in its work description (a re-roof filed as a building permit is still roofing). Leave empty for every permit. Each row carries the trades it was tagged with in <code>tradeTags</code>.",
            "items": {
              "type": "string",
              "enum": [
                "solar",
                "roofing",
                "hvac",
                "electrical",
                "plumbing",
                "pool",
                "new_construction",
                "demolition",
                "addition_remodel"
              ],
              "enumTitles": [
                "Solar",
                "Roofing",
                "HVAC",
                "Electrical",
                "Plumbing",
                "Pool and spa",
                "New construction",
                "Demolition",
                "Addition and remodel"
              ]
            },
            "default": []
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Only permits whose description, type or any name (owner, contractor, applicant) contains this text, case aside: <code>tesla</code>, <code>generac</code>, <code>ADU</code>.",
            "default": ""
          },
          "minValuation": {
            "title": "Minimum valuation",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits whose declared job value is at least this much (US dollars; Calgary's are Canadian dollars). Datasets that publish no value (Los Angeles' electrical and mechanical permits) are then not read, and a free row says so. 0 for any value.",
            "default": 0
          },
          "propertyUse": {
            "title": "Property use",
            "enum": [
              "any",
              "residential",
              "commercial"
            ],
            "type": "string",
            "description": "Residential or commercial, read in the portal's class, use or occupancy codes and the description. A permit the portal gives no class is left out when this is set (New York City publishes none).",
            "default": "any"
          },
          "onlyWithContractor": {
            "title": "Only permits that name a contractor",
            "type": "boolean",
            "description": "Leave out permits without a contractor company or person. Los Angeles, San Francisco, Dallas, Montgomery County and Norfolk publish no contractor, so this leaves them empty.",
            "default": false
          },
          "maxResultsPerJurisdiction": {
            "title": "Max permits per city or county",
            "minimum": 0,
            "type": "integer",
            "description": "Stop reading a city or county after this many permits. 0 for no limit.",
            "default": 100
          },
          "maxResults": {
            "title": "Max permits in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop the run after this many permits across every city and county. 0 for no limit.",
            "default": 1000
          },
          "maxScannedPerJurisdiction": {
            "title": "Max permits scanned per jurisdiction",
            "minimum": 0,
            "type": "integer",
            "description": "Filters the portal cannot apply (property use, contractor) are checked on each permit read; this caps how many a city or county is read for them. 0 for no limit.",
            "default": 20000
          },
          "includeRawRecord": {
            "title": "Include the original record",
            "type": "boolean",
            "description": "Add every column the portal publishes, as it publishes it, in <code>raw</code> (inspection dates, parcel numbers, fees…). Off keeps spreadsheet exports to the normalized columns.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}