{
  "openapi": "3.0.1",
  "info": {
    "title": "NYC Elevator, Boiler & Electrical Records & Permits",
    "description": "NYC DOB equipment records: electrical and elevator permits, elevator compliance and boiler filings (~1.69M, daily). BIN/BBL, address, contractor, fees, status and dates where the feed publishes them (boiler is BIN-only). Filter by borough, status, type, ZIP, BIN or year; profile a building.",
    "version": "0.0",
    "x-build-id": "8KeVGBfe1g8ZVrnK7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~nyc-building-equipment/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-nyc-building-equipment",
        "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/j0401~nyc-building-equipment/runs": {
      "post": {
        "operationId": "runs-sync-j0401-nyc-building-equipment",
        "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/j0401~nyc-building-equipment/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-nyc-building-equipment",
        "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",
              "profile",
              "aggregate"
            ],
            "type": "string",
            "description": "search = rows from one corpus (default). profile = every equipment record for one building, keyed by bin or bbl. aggregate = one count row per group (see groupBy).",
            "default": ""
          },
          "corpus": {
            "title": "Corpus",
            "enum": [
              "",
              "electrical-permits",
              "elevator-permits",
              "elevator-compliance",
              "boiler-compliance"
            ],
            "type": "string",
            "description": "Which feed to query. Blank = electrical-permits. electrical-permits ~599,000 rows; elevator-permits ~72,000; elevator-compliance ~121,000 devices; boiler-compliance ~899,000 filings (BIN only - no address or borough).",
            "default": ""
          },
          "borough": {
            "title": "Borough",
            "enum": [
              "",
              "Manhattan",
              "Brooklyn",
              "Queens",
              "Bronx",
              "Staten Island"
            ],
            "type": "string",
            "description": "One of the five boroughs. Not available for boiler-compliance, which carries only a BIN.",
            "default": ""
          },
          "status": {
            "title": "Status (exact source value)",
            "type": "string",
            "description": "Exact status string for the chosen corpus. electrical-permits: e.g. \"Permit Issued\", \"Complete\", \"Approved\", \"Cancelled\". elevator-permits: e.g. \"Signed Off\", \"Permit Entire\". elevator-compliance: \"Active\", \"Removed\", \"Work in Progress\". boiler-compliance: \"Accepted\", \"Pre-Filing\". Any other value is rejected with the allowed list.",
            "default": ""
          },
          "deviceType": {
            "title": "Device type",
            "enum": [
              "",
              "Elevator",
              "Accessibility Lift",
              "Personnel Hoist",
              "Escalator",
              "Dumbwaiter",
              "Conveyor",
              "Manlift",
              "Moving Walk"
            ],
            "type": "string",
            "description": "Elevator corpora only. \"Moving Walk\" exists only in elevator-compliance; \"Manlift\" is spelled that way in both.",
            "default": ""
          },
          "zipCode": {
            "title": "ZIP code",
            "type": "string",
            "description": "Exact five-digit ZIP, e.g. \"11206\". Not available for boiler-compliance.",
            "default": ""
          },
          "bin": {
            "title": "BIN",
            "type": "string",
            "description": "Seven-digit Building Identification Number, e.g. \"1014813\". A filter in search mode; the building key in profile mode.",
            "default": ""
          },
          "bbl": {
            "title": "BBL",
            "type": "string",
            "description": "Ten-digit Borough-Block-Lot, e.g. \"3027280001\". The building key in profile mode for the three corpora that carry a BBL (not boiler-compliance).",
            "default": ""
          },
          "firmName": {
            "title": "Contractor firm name",
            "type": "string",
            "description": "Case-insensitive partial match on the filing firm, e.g. \"AURORA\". Available for electrical-permits and elevator-permits only.",
            "default": ""
          },
          "licenseNumber": {
            "title": "Licence number",
            "type": "string",
            "description": "Exact licence number as filed. The format differs by corpus: electrical \"010327\", elevator permits \"L - 038001\", boiler \"5578\". Available for electrical-permits, elevator-permits and boiler-compliance.",
            "default": ""
          },
          "keyword": {
            "title": "Keyword in the work description",
            "type": "string",
            "description": "Partial match inside the job description, e.g. \"wiring\", \"moderniz\". Available for electrical-permits and elevator-permits.",
            "default": ""
          },
          "defectsExist": {
            "title": "Boiler defects",
            "enum": [
              "",
              "Yes",
              "No"
            ],
            "type": "string",
            "description": "boiler-compliance only. \"Yes\" = defects found on the inspection (70,783 of 899,345 filings; 2,769 filings have no value; measured 2026-11-09).",
            "default": ""
          },
          "pressureType": {
            "title": "Boiler pressure",
            "enum": [
              "",
              "Low Pressure",
              "High Pressure"
            ],
            "type": "string",
            "description": "boiler-compliance only. Low Pressure 878,825; High Pressure 20,389; 131 blank (measured 2026-11-09).",
            "default": ""
          },
          "year": {
            "title": "Year",
            "type": "integer",
            "description": "Calendar year on the corpus's main date (filing date; status date for elevator-compliance; inspection date for boiler-compliance), e.g. 2026. Cannot be combined with dateFrom/dateTo."
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Inclusive start of the main date window, YYYY-MM-DD. The boiler feed stores MM/DD/YYYY text; ranges are converted to a chronological YYYYMMDD comparison.",
            "default": ""
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Inclusive end of the main date window, YYYY-MM-DD.",
            "default": ""
          },
          "recentDays": {
            "title": "Recent days",
            "type": "integer",
            "description": "Shortcut for a window ending today, e.g. 30. Cannot be combined with dateFrom/dateTo. 0 or blank = off."
          },
          "maxResults": {
            "title": "Max records (search mode)",
            "type": "integer",
            "description": "Rows to return in search mode (default 50, maximum 10,000). When the window is capped, an uncounted _meta row says so. Profile returns up to 1,000 rows per corpus.",
            "default": 50
          },
          "groupBy": {
            "title": "Group by (aggregate mode)",
            "type": "string",
            "description": "One dimension, returned with every group up to the 500-group ceiling; a dimension that outgrows the ceiling fails the run loudly rather than dropping the tail. electrical-permits: borough, status, zipCode, buildingUse, year. elevator-permits: borough, status, deviceType, zipCode, year. elevator-compliance: borough, status, deviceType, zipCode, year. boiler-compliance: status, defectsExist, pressureType, year. Switching corpus resets the valid set.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}