{
  "openapi": "3.0.1",
  "info": {
    "title": "US Building Permits – Contractor Leads with Phone",
    "description": "New building permits from official open data of 24 US cities (NYC, Chicago, Washington DC, Columbus, Raleigh, Minneapolis…) with contractor name, phone and state license. Filter by date, work type (roofing, solar, HVAC, ADU…), ZIP, job value.",
    "version": "0.1",
    "x-build-id": "6ppiaOiMLZ4wMSbN6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neobuster~us-building-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neobuster-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/neobuster~us-building-permits/runs": {
      "post": {
        "operationId": "runs-sync-neobuster-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/neobuster~us-building-permits/run-sync": {
      "post": {
        "operationId": "run-sync-neobuster-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": "Cities to search. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "NYC",
                "CHI",
                "SA",
                "SJ",
                "AUS",
                "CBUS",
                "SF",
                "SEA",
                "DC",
                "BOS",
                "LOU",
                "BALT",
                "MPLS",
                "MESA",
                "KC",
                "RAL",
                "NOLA",
                "PGH",
                "CIN",
                "BR",
                "CAM",
                "MOCO",
                "TEMPE",
                "BOULDER"
              ],
              "enumTitles": [
                "New York City, NY",
                "Chicago, IL",
                "San Antonio, TX",
                "San Jose, CA",
                "Austin, TX",
                "Columbus, OH",
                "San Francisco, CA",
                "Seattle, WA",
                "Washington, DC",
                "Boston, MA",
                "Louisville (Jefferson County), KY",
                "Baltimore, MD",
                "Minneapolis, MN",
                "Mesa, AZ",
                "Kansas City, MO",
                "Raleigh, NC",
                "New Orleans, LA",
                "Pittsburgh, PA",
                "Cincinnati, OH",
                "Baton Rouge (East Baton Rouge Parish), LA",
                "Cambridge, MA",
                "Montgomery County, MD",
                "Tempe, AZ",
                "Boulder, CO"
              ]
            }
          },
          "issuedWithinDays": {
            "title": "Issued in the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Permits issued in the last N days (1-365). Ignored when 'Issued on or after' is set.",
            "default": 7
          },
          "issuedAfter": {
            "title": "Issued on or after",
            "type": "string",
            "description": "Optional exact start date (YYYY-MM-DD); replaces 'Issued in the last N days'."
          },
          "issuedBefore": {
            "title": "Issued on or before",
            "type": "string",
            "description": "Optional end date (YYYY-MM-DD). The range can be at most 365 days."
          },
          "categories": {
            "title": "Work categories",
            "type": "array",
            "description": "Keep permits whose type or description matches any of these categories (matched on the city's permit type and the work description). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "roofing",
                "solar",
                "battery-ev",
                "hvac",
                "electrical",
                "plumbing",
                "new-construction",
                "addition-remodel",
                "kitchen-bath",
                "adu",
                "demolition",
                "foundation-structural",
                "pool-spa",
                "fire-protection",
                "elevator",
                "signs",
                "windows-doors",
                "siding-exterior",
                "scaffold-shed"
              ],
              "enumTitles": [
                "Roofing",
                "Solar / photovoltaic",
                "Battery storage / EV charging",
                "HVAC / mechanical",
                "Electrical",
                "Plumbing / gas",
                "New construction",
                "Addition / alteration / remodel",
                "Kitchen / bathroom",
                "ADU / accessory dwelling",
                "Demolition",
                "Foundation / structural / seismic",
                "Pools / spas",
                "Fire sprinklers / alarms",
                "Elevators / conveyances",
                "Signs / awnings",
                "Windows / doors",
                "Siding / exterior / decks",
                "Sidewalk sheds / scaffolds / fences (NYC)"
              ]
            }
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Optional text to find in the permit type, description, address, contractor or owner (e.g. heat pump, Tesla)."
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Keep permits at these 5-digit ZIP codes. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "minValuation": {
            "title": "Minimum job value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep permits with at least this declared job value. Permits without a value (NYC electrical, Washington DC, many Cambridge trade and Kansas City permits) are left out when this is set."
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "any",
              "residential",
              "commercial"
            ],
            "type": "string",
            "description": "Residential or commercial, where the city publishes it. NYC, Chicago, Cambridge and Washington DC permits have no property type and are left out when this is set.",
            "default": "any"
          },
          "requireContractor": {
            "title": "Only permits with a contractor",
            "type": "boolean",
            "description": "Leave out permits that name no contractor.",
            "default": false
          },
          "requireContractorPhone": {
            "title": "Only permits with a contractor phone",
            "type": "boolean",
            "description": "Keep permits whose contractor has a phone number (from the permit or the matched state license).",
            "default": false
          },
          "enrichContractor": {
            "title": "Match contractors to state licenses",
            "type": "boolean",
            "description": "Add the contractor's official license (number, type, status, phone, trades) from the California CSLB, Washington L&I, Texas TDLR, Minnesota DLI, Colorado DORA and NYC Department of Buildings records (NYC, San Francisco, San Jose, Seattle, Austin, San Antonio, Minneapolis, Boulder). Included in the price.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many permits (newest first). 0 = no limit (up to 365 days of permits).",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}