{
  "openapi": "3.0.1",
  "info": {
    "title": "US Building Permits Scraper: 201 Cities & Contractor Leads",
    "description": "Fast 128MB pure-HTTP scraper extracting live US municipal building permits across 201 cities and counties (NYC DOB NOW, LA LADBS, Chicago, Seattle, Austin, Denver, Miami-Dade). Returns permit numbers, valuations, addresses, contractors, approval days, parcels, and portal links.",
    "version": "1.0",
    "x-build-id": "A8mA4vUo69DvPcmcS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-goose~us-building-permits-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-goose-us-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/data-goose~us-building-permits-scraper/runs": {
      "post": {
        "operationId": "runs-sync-data-goose-us-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/data-goose~us-building-permits-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-data-goose-us-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",
        "properties": {
          "mode": {
            "title": "Operation Mode",
            "enum": [
              "search",
              "list_jurisdictions"
            ],
            "type": "string",
            "description": "Use 'search' to extract normalized building permits by city or state, or 'list_jurisdictions' to inspect all 201 covered municipal portals and health status ($0).",
            "default": "search"
          },
          "cities": {
            "title": "Cities or Jurisdiction IDs",
            "type": "array",
            "description": "List of 'City, ST' targets (e.g. 'Austin, TX', 'Seattle, WA') or exact jurisdiction IDs (e.g. 'nyc_dob_now', 'la_ladbs', 'chicago_buildings'). Works immediately with zero API key for up to 3 preview rows per city (10 free calls/day/IP).",
            "default": [
              "Austin, TX",
              "Seattle, WA",
              "Chicago, IL",
              "Denver, CO"
            ],
            "items": {
              "type": "string"
            }
          },
          "stateCode": {
            "title": "2-Letter State Filter (Optional)",
            "type": "string",
            "description": "Optional 2-letter US state or DC code (e.g. TX, CA, WA, FL). With a MuniMCP API key, runs multi-city statewide fan-out via search_permits_by_state; in list_jurisdictions mode, filters covered cities in that state."
          },
          "query": {
            "title": "Keyword, Address, or Permit Number",
            "type": "string",
            "description": "Optional search keyword, street address, or permit number (e.g. 'solar', 'roof', 'ADU', 'tenant improvement')."
          },
          "permitType": {
            "title": "Permit Type Filter",
            "type": "string",
            "description": "Optional filter matching permit type or work description (e.g. 'Building', 'Electrical', 'Solar', 'Mechanical')."
          },
          "contractor": {
            "title": "Contractor Name Filter",
            "type": "string",
            "description": "Optional contractor business name substring filter."
          },
          "issuedAfter": {
            "title": "Issued After (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include permits issued on or after this date (YYYY-MM-DD)."
          },
          "issuedBefore": {
            "title": "Issued Before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include permits issued on or before this date (YYYY-MM-DD)."
          },
          "minEstimatedCost": {
            "title": "Minimum Estimated Project Cost (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Filter for permits with reported valuation >= this dollar amount (where jurisdiction reports valuation)."
          },
          "hasValuationOnly": {
            "title": "Jurisdictions With Valuations Only (list_jurisdictions mode)",
            "type": "boolean",
            "description": "When mode is list_jurisdictions, return only portals exposing estimated_cost valuations.",
            "default": false
          },
          "limitPerCity": {
            "title": "Max Permits Per City",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Preview mode without an API key returns up to 3 permits per city call. Supply munimcpApiKey to unlock up to 50 rows/page and automatic pagination.",
            "default": 3
          },
          "munimcpApiKey": {
            "title": "MuniMCP API Key (Optional, Unlocks Full Results)",
            "type": "string",
            "description": "Optional Bearer API key (pmcp_live_...) from https://munimcp.com for paginated 50-row extraction and statewide multi-city fan-out. Leave empty for free 3-row/city live previews."
          },
          "x402PaymentSignature": {
            "title": "x402 v2 PAYMENT-SIGNATURE Header (Optional)",
            "type": "string",
            "description": "Optional Base64 x402 USDC payment signature on Base (eip155:8453) if paying per request instead of using an API key."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}