{
  "openapi": "3.0.1",
  "info": {
    "title": "Building Permits & Code Violations Scraper — Owner Skip Trace",
    "description": "Scrape municipal building, roofing, solar & ADU permits, code violations & contractor/mechanics liens via Socrata/ArcGIS + auto-chain owner wireless mobile phone, email & LLC SOS piercing. Pure HTTP, $0.004/permit on Bronze+, $0 on misses.",
    "version": "1.0",
    "x-build-id": "mpNfdGTq92uKrCBAT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cea_digital~building-permits-code-violations-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cea_digital-building-permits-code-violations-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/cea_digital~building-permits-code-violations-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cea_digital-building-permits-code-violations-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/cea_digital~building-permits-code-violations-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cea_digital-building-permits-code-violations-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",
        "properties": {
          "citiesOrZips": {
            "title": "Cities, Counties, or ZIP Codes",
            "type": "array",
            "description": "List of municipal jurisdictions, cities, or 5-digit ZIP codes to scrape for building permits, code violations, and liens (e.g., [\"Charleston, SC\", \"29403\", \"Austin, TX\"]). Leave empty to run the <6s instant 2-record live demo.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "permitTypes": {
            "title": "Permit & Offline B2B Trigger Types",
            "type": "array",
            "description": "Filter by high-intent offline B2B trigger categories: roofing, solar, adu_addition, commercial_ti, code_violation, pre_foreclosure_lien.",
            "default": [
              "roofing",
              "solar",
              "adu_addition",
              "commercial_ti",
              "code_violation",
              "pre_foreclosure_lien"
            ],
            "items": {
              "type": "string"
            }
          },
          "minJobValueUsd": {
            "title": "Minimum Estimated Job / Valuation USD",
            "type": "number",
            "description": "Minimum permit valuation or estimated remediation value in USD (default $15,000).",
            "default": 15000
          },
          "autoSkipTraceOwner": {
            "title": "Auto-Chain Property Owner Skip-Trace & LLC Piercing (Actor #1)",
            "type": "boolean",
            "description": "Automatically pierce LLC property owners and resolve verified wireless mobile phones + deliverable emails for every permit or violation address.",
            "default": true
          },
          "screenContractorKyb": {
            "title": "Screen General Contractor License & U.S. Treasury OFAC SDN KYB",
            "type": "boolean",
            "description": "Verify General Contractor state license active status, workers comp/bonding indicators, and screen against the U.S. Treasury OFAC SDN list.",
            "default": false
          },
          "zillowOrMapsDatasetId": {
            "title": "1-Click Chained Dataset ID (Zillow / Google Maps / PropStream)",
            "type": "string",
            "description": "Paste a Dataset ID from maxcopell/zillow-detail-scraper or compass/crawler-google-places to automatically pull permit history, code violations, and owner phones for every property in the dataset."
          },
          "watchlistId": {
            "title": "Recurring Watchlist ID (KV Deduplication)",
            "type": "string",
            "description": "Set a custom Watchlist ID (e.g. 'charleston-commercial-ti-daily') when running on a schedule so previously emitted permits/violations are never billed twice."
          },
          "onlyNew": {
            "title": "Only Emit Net-New Permits & Violations",
            "type": "boolean",
            "description": "When paired with watchlistId, skips any permit or violation case already processed in previous runs ($0.00 charged on duplicates).",
            "default": true
          },
          "webhookUrl": {
            "title": "Real-Time Webhook Alert URL (GHL / Clay / n8n)",
            "type": "string",
            "description": "Optional HTTP POST webhook URL to push newly filed high-value permits and code violations in real time."
          },
          "telegramChatId": {
            "title": "Telegram Deal / Trigger Alert Chat ID",
            "type": "string",
            "description": "Optional Telegram Chat ID for instant mobile notifications when new commercial TI permits or code violations are filed."
          },
          "feedback": {
            "title": "Request a Custom Municipal Portal or Accela / EnerGov Feed",
            "type": "string",
            "description": "Need a specific county Socrata/ArcGIS/Accela endpoint or custom CRM webhook? Tell us here."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}