# NYC Elevator Inspection Violations & Compliance Leads (`kempdata/nyc-elevator-compliance`) Actor

Find NYC elevator devices out of inspection compliance. 93,520 active devices from NYC DOB open data, flagged for CAT1 test not filed this year, CAT5 due and stale inspections. Address, BIN and borough attached - a lead list for elevator service firms.

- **URL**: https://apify.com/kempdata/nyc-elevator-compliance.md
- **Developed by:** [Mark Kemp](https://apify.com/kempdata) (community)
- **Categories:** Lead generation, Real estate, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 elevator device records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## NYC Elevator Compliance & Inspection Leads

**48,000+ NYC elevators haven't filed this year's legally required safety test yet.** Every one of them belongs to a building that will need an elevator inspection company — soon, and by law. This Actor gives you that list, fresh from the NYC Department of Buildings' daily-updated records, filtered the way a sales team actually uses it.

### Who this is for

- **Elevator service & inspection companies** — pull every active device in your boroughs with the annual CAT1 test still outstanding, or the 5-year CAT5 test coming due in the next 6 months. Each record is a building that must buy what you sell, with the address and a plain-English reason to call.
- **Property investors & due-diligence teams** — check the full compliance history of every device in a building (by address or ZIP) before you buy.
- **Insurers, lenders, and proptech** — monitor compliance status across a portfolio; the dataset updates daily.

### What you get

One clean record per elevator device, with computed compliance flags you won't find in the raw city data:

```json
{
    "device_number": "1P16006",
    "device_type": "Elevator",
    "device_status": "Active",
    "address": "613 WEST 186 STREET",
    "borough": "Manhattan",
    "zip_code": "10033",
    "neighborhood": "Washington Heights (North)",
    "cat1_filed_current_year": false,
    "cat1_latest_report_filed": "2025-06-11",
    "cat5_next_due": "2027-01-25",
    "cat5_due_in_days": 151,
    "periodic_latest_inspection": "2026-03-05",
    "is_lead": true,
    "lead_reasons": [
        "CAT1 test not filed for 2026 (latest: 2025)",
        "CAT5 test due in 151 days"
    ]
}
```

Every record also includes latitude/longitude, BIN and BBL (for joining to other NYC property data), and the untouched source record. Export to Excel, CSV, or JSON with one click, or pull via API on a schedule.

### How to use it

1. Pick a **lead filter**:
   - *CAT1 not filed this year* — the annual-test lead list (the big one)
   - *CAT5 due soon* — devices whose 5-year test lands within your chosen window
   - *Any lead* — both combined
   - *All devices* — no compliance filter, full inventory
2. Narrow by **borough**, **ZIP codes**, or **device type** if you work a territory.
3. Set **maximum records** — you're only charged for records actually delivered.
4. Run it. Schedule it weekly and the list refreshes itself; the city updates the data daily.

### Why the flags matter (NYC rules, in one breath)

NYC requires every elevator device to file a **Category 1 test every calendar year** and a **Category 5 test every five years**. Buildings that fall behind face DOB violations and civil penalties. `cat1_filed_current_year: false` on an active device means that clock is ticking right now; `cat5_due_in_days` counts down the five-year deadline computed from the device's own filing history.

### Data source & fair use

Data comes from the NYC Department of Buildings **DOB NOW Elevator Safety Compliance** open dataset, updated daily, accessed through the city's official public-data API — no scraping, no bot games, fully public records. This Actor reads politely (paged requests with rate-limit handling) and includes only what the city itself publishes.

### Support

Questions and feature requests are answered fast — usually within hours. If a filter you need is missing (violations, permit activity, other cities/states), open an issue: siblings of this Actor are being built in the order people ask for them.

# Actor input Schema

## `leadFilter` (type: `string`):

Which devices to return. "CAT1 not filed this year" and "CAT5 due soon" are the compliance-lead lists; "All devices" returns everything matching the location filters.

## `cat5DueWithinMonths` (type: `integer`):

For the CAT5 filters: a device counts as "due soon" when its next 5-year test falls within this many months (or is already overdue).

## `boroughs` (type: `array`):

Limit results to these boroughs. Leave empty for all five.

## `zipCodes` (type: `array`):

Limit results to these ZIP codes (e.g. 10007). Leave empty for all.

## `deviceStatus` (type: `string`):

Most users want Active devices only — those are the ones that must stay in compliance.

## `deviceTypes` (type: `array`):

Limit to specific device types. Leave empty for all (elevators, escalators, dumbwaiters, etc.).

## `maxRecords` (type: `integer`):

Stop after this many results. You are only charged for records actually returned.

## `socrataAppToken` (type: `string`):

Optional NYC Open Data app token. Not required — only useful for very large pulls, to lift the anonymous rate limit.

## Actor input object example

```json
{
  "leadFilter": "cat1NotFiledThisYear",
  "cat5DueWithinMonths": 6,
  "boroughs": [],
  "zipCodes": [],
  "deviceStatus": "Active",
  "deviceTypes": [],
  "maxRecords": 500
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset of elevator device records with computed compliance flags (CAT1/CAT5/periodic) and lead reasons.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("kempdata/nyc-elevator-compliance").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("kempdata/nyc-elevator-compliance").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call kempdata/nyc-elevator-compliance --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kempdata/nyc-elevator-compliance"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KNZVIfdfBNfFIgkjX/builds/IPhdluaK7YCf6KCV1/openapi.json
