{
  "openapi": "3.0.1",
  "info": {
    "title": "US Building Permits: 13 Cities & Alerts (MCP)",
    "description": "Find building permits in 13 US city and county feeds. Filter by trade, date, contractor, ZIP and value; monitor newly observed permits. Source links, optional contractor contacts, and per-city coverage warnings.",
    "version": "0.0",
    "x-build-id": "1GeE10NoDq7BrjoDf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/amygraphics~us-building-permit-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-amygraphics-us-building-permit-radar",
        "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/amygraphics~us-building-permit-radar/runs": {
      "post": {
        "operationId": "runs-sync-amygraphics-us-building-permit-radar",
        "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/amygraphics~us-building-permit-radar/run-sync": {
      "post": {
        "operationId": "run-sync-amygraphics-us-building-permit-radar",
        "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": "Mode",
            "enum": [
              "search",
              "monitor"
            ],
            "type": "string",
            "description": "Search now or save a baseline and report newly observed permits in the rolling window.",
            "default": "search"
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Municipal open-data feeds to search. Fields and coverage vary by city.",
            "items": {
              "type": "string",
              "enum": [
                "chicago",
                "nyc",
                "austin",
                "seattle",
                "san_francisco",
                "los_angeles",
                "new_orleans",
                "baton_rouge",
                "cincinnati",
                "mesa",
                "montgomery_md",
                "orlando",
                "norfolk"
              ],
              "enumTitles": [
                "Chicago, IL",
                "New York City, NY",
                "Austin, TX",
                "Seattle, WA",
                "San Francisco, CA",
                "Los Angeles, CA",
                "New Orleans, LA",
                "Baton Rouge, LA",
                "Cincinnati, OH",
                "Mesa, AZ",
                "Montgomery County, MD (commercial)",
                "Orlando, FL",
                "Norfolk, VA"
              ]
            },
            "default": [
              "chicago",
              "nyc",
              "austin"
            ]
          },
          "keyword": {
            "title": "Work description keyword",
            "type": "string",
            "description": "Literal substring in source work description; for Orlando and Norfolk this is the work-type field. Keyword and trade use AND."
          },
          "daysBack": {
            "title": "Rolling days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Issue dates in the last N calendar days, including today (UTC).",
            "default": 7
          },
          "minValueUsd": {
            "title": "Minimum declared cost (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only permits with a reported cost at least this amount. Records without a cost are excluded."
          },
          "maxResults": {
            "title": "Max permits returned",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on delivered, chargeable permit rows across all cities.",
            "default": 10
          },
          "maxScanPerCity": {
            "title": "Max source records scanned per city",
            "minimum": 100,
            "maximum": 5000,
            "type": "integer",
            "description": "Records scanned before the local minimum-value filter. A summary warns when this cap is reached.",
            "default": 1000
          },
          "trade": {
            "title": "Trade keywords",
            "enum": [
              "all",
              "roofing",
              "solar",
              "hvac",
              "plumbing",
              "electrical",
              "new_construction",
              "remodel",
              "demolition",
              "pool"
            ],
            "type": "string",
            "description": "Phrase matches in the source work description/type, not an exhaustive classifier. Orlando filters locally after the scan cap.",
            "default": "all"
          },
          "dateFrom": {
            "title": "Issue date from",
            "type": "string",
            "description": "Search mode only. Optional inclusive YYYY-MM-DD start date; overrides the rolling start."
          },
          "dateTo": {
            "title": "Issue date to",
            "type": "string",
            "description": "Search mode only. Optional inclusive YYYY-MM-DD end date; overrides today."
          },
          "zipCode": {
            "title": "ZIP code",
            "type": "string",
            "description": "Five-digit worksite ZIP filter. Applied after source scan; records without a source ZIP are excluded."
          },
          "contractorContains": {
            "title": "Contractor name contains",
            "type": "string",
            "description": "Filter contractor or applicant business name, case-insensitive. Applied after source scan; excludes records lacking a name."
          },
          "onlyWithContractor": {
            "title": "Require contractor name",
            "type": "boolean",
            "description": "Exclude records without a source-supplied contractor or NYC permittee business name.",
            "default": false
          },
          "includeBusinessContact": {
            "title": "Include published contractor contacts",
            "type": "boolean",
            "description": "Include public contractor phone when available in Austin, Mesa and Orlando, and email where published by Mesa. Contacts may belong to individuals; use responsibly.",
            "default": false
          },
          "monitorUpdates": {
            "title": "Report updates to seen permits",
            "type": "boolean",
            "description": "Monitor mode: also emit an update if a previously seen permit changes status, type, description, address, value or contractor. Separate baseline.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}