{
  "openapi": "3.0.1",
  "info": {
    "title": "US Building Permits Leads — 71 Jurisdictions, 28 States",
    "description": "Fresh building permits from 92 official city, county & state open-data feeds (71 jurisdictions, 700+ towns, 28 states). Trade tags (roofing, solar, HVAC, pool, ADU, new construction), project value, address, contractor name/license/phone. Filter by city, town, ZIP, trade, value.",
    "version": "1.1",
    "x-build-id": "eJqMoAgQqZArkbsYy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yuvalstudios~us-building-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yuvalstudios-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/yuvalstudios~us-building-permits/runs": {
      "post": {
        "operationId": "runs-sync-yuvalstudios-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/yuvalstudios~us-building-permits/run-sync": {
      "post": {
        "operationId": "run-sync-yuvalstudios-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": "Cities",
            "type": "array",
            "description": "Permit-issuing jurisdictions to search (cities, counties and one statewide feed). County/statewide feeds contain many municipalities — use Municipalities to narrow them. You can also type a city name (e.g. \"Detroit\").",
            "items": {
              "type": "string",
              "enum": [
                "ANA",
                "ARL",
                "ATAS",
                "AUS",
                "BACO",
                "BAL",
                "BTR",
                "BELL",
                "BOS",
                "CAM",
                "CAMP",
                "CHS",
                "CHI",
                "CIN",
                "CLE",
                "CSTX",
                "COLLIN",
                "COL",
                "COOK",
                "COR",
                "DEN",
                "DET",
                "DUR",
                "EVE",
                "FTW",
                "HFD",
                "HEN",
                "KC",
                "LA",
                "LOU",
                "MCPA",
                "MARIN",
                "MECK",
                "MED",
                "MESA",
                "MIA",
                "MPLS",
                "MOCO",
                "NASH",
                "NJ",
                "NOLA",
                "NYC",
                "NOR",
                "NRML",
                "ORL",
                "OPKS",
                "PHL",
                "JACO",
                "PIERCE",
                "PGH",
                "PSL",
                "PDX",
                "RAL",
                "ROSE",
                "SLM",
                "SA",
                "SDCO",
                "SF",
                "SJ",
                "SMTX",
                "SCOT",
                "SEA",
                "SXF",
                "SUM",
                "TAC",
                "TLH",
                "TPA",
                "TUC",
                "TYLR",
                "WAKE",
                "DC"
              ],
              "enumTitles": [
                "Anaheim, CA (ANA)",
                "Arlington, TX (ARL)",
                "Atascadero, CA (ATAS)",
                "Austin, TX (AUS)",
                "Baltimore County, MD (BACO)",
                "Baltimore, MD (BAL)",
                "Baton Rouge (East Baton Rouge Parish), LA (BTR)",
                "Bellevue, WA (BELL)",
                "Boston, MA (BOS)",
                "Cambridge, MA (CAM)",
                "Campbell, CA (CAMP)",
                "Charleston, SC (CHS)",
                "Chicago, IL (CHI)",
                "Cincinnati, OH (CIN)",
                "Cleveland, OH (CLE)",
                "College Station, TX (CSTX)",
                "Collin County, TX (COLLIN)",
                "Columbus, OH (COL)",
                "Cook County (suburban municipalities), IL (COOK)",
                "Corona, CA (COR)",
                "Denver, CO (DEN)",
                "Detroit, MI (DET)",
                "Durham (City & County), NC (DUR)",
                "Everett, WA (EVE)",
                "Fort Worth, TX (FTW)",
                "Hartford, CT (HFD)",
                "Henderson, NV (HEN)",
                "Kansas City, MO (KC)",
                "Los Angeles, CA (LA)",
                "Louisville, KY (LOU)",
                "Maricopa, AZ (MCPA)",
                "Marin County, CA (MARIN)",
                "Mecklenburg County (Charlotte & towns), NC (MECK)",
                "Medford, OR (MED)",
                "Mesa, AZ (MESA)",
                "Miami, FL (MIA)",
                "Minneapolis, MN (MPLS)",
                "Montgomery County, MD (MOCO)",
                "Nashville, TN (NASH)",
                "New Jersey (statewide), NJ — lagged ~2-3 months (NJ)",
                "New Orleans, LA (NOLA)",
                "New York City, NY (NYC)",
                "Norfolk, VA (NOR)",
                "Normal, IL (NRML)",
                "Orlando, FL (ORL)",
                "Overland Park, KS (OPKS)",
                "Philadelphia, PA (PHL)",
                "Phoenix & Talent, OR (JACO)",
                "Pierce County (unincorporated), WA (PIERCE)",
                "Pittsburgh, PA (PGH)",
                "Port St. Lucie, FL (PSL)",
                "Portland, OR (PDX)",
                "Raleigh, NC (RAL)",
                "Roseville, CA (ROSE)",
                "Salem, OR (SLM)",
                "San Antonio, TX (SA)",
                "San Diego County (unincorporated), CA (SDCO)",
                "San Francisco, CA (SF)",
                "San Jose, CA (SJ)",
                "San Marcos, TX (SMTX)",
                "Scottsdale, AZ (SCOT)",
                "Seattle, WA (SEA)",
                "Sioux Falls, SD (SXF)",
                "Sumter, SC (SUM)",
                "Tacoma, WA (TAC)",
                "Tallahassee, FL (TLH)",
                "Tampa, FL (TPA)",
                "Tucson, AZ (TUC)",
                "Tyler, TX (TYLR)",
                "Wake County (unincorporated & towns), NC (WAKE)",
                "Washington, DC (DC)"
              ]
            },
            "default": []
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two-letter state codes, e.g. CA, TX, MA. Only jurisdictions in these states are searched.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "municipalities": {
            "title": "Municipalities (inside county & statewide feeds)",
            "type": "array",
            "description": "Exact place names, e.g. \"Plano\", \"Bethesda\", \"Hoboken\". Searches single-city datasets for that city plus every county/statewide dataset (Cook County IL, Collin County TX, San Diego County, Montgomery County MD, Louisville Metro, Nashville, Wake, Mecklenburg, New Jersey…). Note: county feeds only include permits that the county itself or its assessor records.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "allJurisdictions": {
            "title": "Query all jurisdictions",
            "type": "boolean",
            "description": "When no city/state/municipality is chosen, the actor queries a fast sample of 20 large datasets. Turn this on to query all 92 datasets (about a minute).",
            "default": false
          },
          "includeLaggedSources": {
            "title": "Include lagged statewide feeds",
            "type": "boolean",
            "description": "Adds the New Jersey DCA statewide construction-permit file (~415 municipalities). The state publishes it ~2–3 months behind, so use a date range of 90+ days. No street address or contractor in this feed.",
            "default": false
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Only permits in these 5-digit ZIP codes, e.g. 78704. Note: Chicago, Norfolk and Mesa feeds publish no ZIP, so a ZIP filter excludes them.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Issued in the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Used when no dates are set below. 0 = issued today only.",
            "default": 7
          },
          "issuedFrom": {
            "title": "Issued from (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Start of the issue-date range (inclusive). Overrides 'last N days'."
          },
          "issuedTo": {
            "title": "Issued to (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "End of the issue-date range (inclusive). Default: today."
          },
          "trades": {
            "title": "Trades",
            "type": "array",
            "description": "Only permits tagged with at least one of these trades. Empty = all permits.",
            "items": {
              "type": "string",
              "enum": [
                "roofing",
                "solar",
                "hvac",
                "electrical",
                "plumbing",
                "pool",
                "adu",
                "newConstruction",
                "demolition",
                "remodel",
                "windowsDoors",
                "siding",
                "signage",
                "fence",
                "masonry",
                "fireProtection",
                "deck"
              ],
              "enumTitles": [
                "Roofing / re-roof",
                "Solar PV & battery storage",
                "HVAC / mechanical",
                "Electrical / EV chargers",
                "Plumbing / water heaters / sewer",
                "Pools & spas",
                "ADU / accessory dwelling",
                "New construction",
                "Demolition",
                "Remodel / alteration / tenant improvement",
                "Windows & doors",
                "Siding / stucco",
                "Signs",
                "Fences",
                "Masonry / concrete / foundation",
                "Fire sprinklers & alarms",
                "Decks, patios, porches"
              ]
            },
            "default": []
          },
          "minValue": {
            "title": "Minimum project value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits whose declared project value is at least this amount. Permits with no published value are excluded when this is set (Philadelphia publishes no values).",
            "default": 0
          },
          "newConstructionOnly": {
            "title": "New construction only",
            "type": "boolean",
            "description": "Only new buildings / new dwellings (from the source's own new-work class where available, otherwise from the permit text).",
            "default": false
          },
          "keyword": {
            "title": "Description contains",
            "type": "string",
            "description": "Case-insensitive text match on the description / type, e.g. \"restaurant\", \"tesla\", \"tenant improvement\". Runs on the city's server, so it is fast."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum permits to output. Shared fairly between the selected jurisdictions; unused share goes to cities that have more. Each permit is billed as one result.",
            "default": 100
          },
          "newSinceLastRun": {
            "title": "Only permits not returned in earlier runs",
            "type": "boolean",
            "description": "Remembers the permit IDs already delivered and skips them next time. Schedule daily for a fresh lead feed.",
            "default": false
          },
          "stateKey": {
            "title": "Memory key",
            "type": "string",
            "description": "Name of the memory used by 'only new permits'. Use a different key per saved search / per client.",
            "default": "default"
          },
          "sourceTimeoutSecs": {
            "title": "Time budget (seconds)",
            "minimum": 20,
            "maximum": 3000,
            "type": "integer",
            "description": "Overall time budget for querying the city portals. A slow portal is cut off at this point and the run finishes with everything collected so far.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}