{
  "openapi": "3.0.1",
  "info": {
    "title": "Building Permits Scraper - 47 US Cities, Construction Leads",
    "description": "New building permits from 47 US cities & counties (Chicago, NYC, LA, DC, Philadelphia, San Antonio, San Jose, Miami-Dade, all of NJ...) via official open data. One schema, contractor business names. Filter by state. $2/1k.",
    "version": "0.1",
    "x-build-id": "uZBdKqFw5Q0yjnUen"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/loomwise~city-building-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-loomwise-city-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/loomwise~city-building-permits/runs": {
      "post": {
        "operationId": "runs-sync-loomwise-city-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/loomwise~city-building-permits/run-sync": {
      "post": {
        "operationId": "run-sync-loomwise-city-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": "Cities/counties to include. Leave empty for all sources (optionally narrowed by States or Regions).",
            "items": {
              "type": "string",
              "enum": [
                "chicago",
                "nyc",
                "los_angeles",
                "san_francisco",
                "seattle",
                "austin",
                "boston",
                "cincinnati",
                "baton_rouge",
                "new_orleans",
                "philadelphia",
                "montgomery_county_md_residential",
                "montgomery_county_md_commercial",
                "marin_county_ca",
                "mesa_az",
                "corona_ca",
                "collin_county_tx",
                "cambridge_ma_alterations",
                "cambridge_ma_new",
                "san_diego_county_ca",
                "pierce_county_wa",
                "orlando_fl",
                "everett_wa",
                "college_station_tx",
                "new_jersey",
                "norfolk_va",
                "columbus_oh",
                "nashville_tn",
                "cleveland_oh",
                "washington_dc",
                "miami_dade_fl",
                "anaheim_ca",
                "baltimore_md",
                "louisville_ky",
                "chesapeake_va",
                "overland_park_ks",
                "bellevue_wa",
                "sumter_sc",
                "tyler_tx",
                "hutto_tx",
                "boise_id",
                "worcester_ma",
                "boulder_co",
                "citrus_heights_ca",
                "delaware_county_oh",
                "san_antonio_tx",
                "virginia_beach_va",
                "san_jose_ca",
                "pittsburgh_pa"
              ],
              "enumTitles": [
                "Chicago, IL",
                "New York City, NY",
                "Los Angeles, CA",
                "San Francisco, CA",
                "Seattle, WA",
                "Austin, TX",
                "Boston, MA",
                "Cincinnati, OH",
                "Baton Rouge (East Baton Rouge Parish), LA",
                "New Orleans, LA",
                "Philadelphia, PA",
                "Montgomery County, MD (residential), MD",
                "Montgomery County, MD (commercial), MD",
                "Marin County, CA",
                "Mesa, AZ",
                "Corona, CA",
                "Collin County (appraisal district), TX",
                "Cambridge, MA (additions/alterations), MA",
                "Cambridge, MA (new construction), MA",
                "San Diego County (unincorporated), CA",
                "Pierce County (unincorporated), WA",
                "Orlando, FL",
                "Everett, WA",
                "College Station, TX",
                "New Jersey (statewide, all municipalities), NJ",
                "Norfolk, VA",
                "Columbus, OH",
                "Nashville (Davidson County), TN",
                "Cleveland, OH",
                "Washington, DC (last 30 days feed), DC",
                "Miami-Dade County (unincorporated), FL",
                "Anaheim, CA",
                "Baltimore, MD",
                "Louisville Metro (active construction permits), KY",
                "Chesapeake, VA",
                "Overland Park, KS",
                "Bellevue, WA",
                "Sumter, SC",
                "Tyler, TX",
                "Hutto, TX",
                "Boise (high-impact permits), ID",
                "Worcester, MA",
                "Boulder, CO",
                "Citrus Heights, CA",
                "Delaware County (townships), OH",
                "San Antonio, TX",
                "Virginia Beach, VA",
                "San Jose (last 30 days feed), CA",
                "Pittsburgh, PA"
              ]
            }
          },
          "states": {
            "title": "States (2-letter codes)",
            "type": "array",
            "description": "Only include sources in these states, e.g. [\"TX\",\"CA\"]. Combined with Regions. Applies to the Cities list (or to all sources if Cities is empty).",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "US Census regions to include.",
            "items": {
              "type": "string",
              "enum": [
                "northeast",
                "midwest",
                "south",
                "west"
              ],
              "enumTitles": [
                "Northeast",
                "Midwest",
                "South",
                "West"
              ]
            }
          },
          "issuedWithinDays": {
            "title": "Issued within the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Permits issued in the last N days. Ignored when 'Issued from' is set. Note: Los Angeles refreshes weekly, so use 14+ days for LA.",
            "default": 7
          },
          "issuedFrom": {
            "title": "Issued from (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional start of the issue-date window."
          },
          "issuedTo": {
            "title": "Issued to (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional end of the issue-date window (defaults to today)."
          },
          "workCategories": {
            "title": "Work categories",
            "type": "array",
            "description": "Normalized work categories (derived from each city's permit type and work class).",
            "items": {
              "type": "string",
              "enum": [
                "Demolition",
                "Solar",
                "Roofing",
                "Electrical",
                "Plumbing",
                "Mechanical / HVAC",
                "Fire protection",
                "Sign",
                "Scaffold / shed / fence",
                "Structural / foundation / earthwork",
                "New construction",
                "Addition / alteration",
                "Other"
              ]
            }
          },
          "permitTypes": {
            "title": "Permit type / work class contains",
            "type": "array",
            "description": "Keep permits whose original permit type or work class contains any of these words, e.g. 'new', 'demolition', 'Sidewalk Shed', 'Commercial'.",
            "items": {
              "type": "string"
            }
          },
          "minValuation": {
            "title": "Minimum valuation (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits with a declared job valuation at or above this amount. Permits without a valuation are excluded when set."
          },
          "keywords": {
            "title": "Description keywords",
            "type": "array",
            "description": "Keep permits whose description, type or work class contains any of these words, e.g. 'restaurant', 'ADU', 'pool', 'battery'.",
            "items": {
              "type": "string"
            }
          },
          "onlyWithContractor": {
            "title": "Only permits with a business contractor",
            "type": "boolean",
            "description": "Only return permits that list a contractor business (legal entity) name.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum permits to return across all cities, newest first. You pay per result.",
            "default": 100
          },
          "maxResultsPerCity": {
            "title": "Max results per city",
            "minimum": 0,
            "type": "integer",
            "description": "Optional cap per city (0 = no cap)."
          },
          "descriptionMaxLength": {
            "title": "Description max length",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Truncate descriptions to this many characters (0 = full text).",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}