# NYC Building Permits Scraper (DOB) (`polychrome_haymow/nyc-dob-permits`) Actor

Contractors & suppliers: daily leads on new NYC building permits. Filter DOB NOW permits by borough, ZIP, work type, date and keyword.

- **URL**: https://apify.com/polychrome_haymow/nyc-dob-permits.md
- **Developed by:** [Levani Zurabiani](https://apify.com/polychrome_haymow) (community)
- **Categories:** Lead generation, Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## NYC Building Permits Scraper (DOB)

Contractors & suppliers: daily leads on new NYC building permits. Filter DOB NOW permits by borough, ZIP, work type, date and keyword.

Data comes from NYC Open Data (Socrata SODA API), dataset: **DOB NOW: Build – Approved Permits** (`rbx6-tga4`). Results are clean, normalized JSON you can export as CSV, Excel or JSON.

### Who is it for?

General contractors, subcontractors (plumbing, HVAC, solar, scaffolding), building-material suppliers, equipment rental companies, real-estate investors and analysts who want to know where construction work is starting in New York City.

### Use cases

- Daily lead list of newly issued permits in your trade and borough
- Scheduled alerts (`onlyNew: true`) pushed to your CRM or Slack
- Track construction activity and estimated job cost by neighborhood
- Enrich property records with BIN/BBL and permit history

### How to use

1. Click **Start** and pick filters (the form is pre-filled with an example).
2. Run the actor; results appear in the **Output** tab.
3. Download as CSV/Excel/JSON, call the API, or schedule it with alert mode (`onlyNew: true`) for daily new-record alerts.

Example input:

```json
{
  "borough": "BROOKLYN",
  "workType": "General Construction",
  "keywords": [
    "renovation"
  ],
  "maxResults": 100
}
```

#### Input fields

| Field | Description |
|---|---|
| `borough` | Filter by borough. One of: MANHATTAN, BRONX, BROOKLYN, QUEENS, STATEN ISLAND. |
| `zip` | 5-digit NYC ZIP code. |
| `dateFrom` | Inclusive start date (YYYY-MM-DD). |
| `dateTo` | Inclusive end date (YYYY-MM-DD). |
| `keywords` | Case-insensitive; a record matches if any keyword appears in the searched text fields. |
| `workType` | Filter by workType. One of: General Construction, Plumbing, Mechanical Systems, Structural, Full Demolition, Sprinklers, Standpipe, Foundation, Earth Work, Support of Excavation, Construction Fence, Sidewalk Shed, Supported Scaffold, Solar, Boiler Equipment, Antenna, Curb Cut, Sign. |
| `maxResults` | Hard cap 10000. |
| `onlyNew` | Return only records not returned by previous runs of this actor (for scheduled alerts). |
| `appToken` | Raises NYC Open Data rate limits. Can also be set with env SOCRATA_APP_TOKEN. |

### Sample output

A real record (personal data removed):

```json
{
  "id": "B01381810-I1-GC-CX-2-367353784",
  "source": "rbx6-tga4",
  "jobFilingNumber": "B01381810-I1",
  "workPermit": "B01381810-I1-GC-CX",
  "filingReason": "Renewal Permit with Changes",
  "workType": "Structural",
  "permitStatus": "Permit Issued",
  "borough": "BROOKLYN",
  "houseNumber": "37",
  "streetName": "BRIDGE STREET",
  "zip": "11201",
  "bin": "3329412",
  "bbl": "3000327501",
  "block": "32",
  "lot": "7501",
  "communityBoard": "302",
  "nta": "Downtown Brooklyn-DUMBO-Boerum Hill",
  "latitude": 40.703591,
  "longitude": -73.984621,
  "jobDescription": "East Spandrel Structural Repairs as per plans filed herewith. No change to use, egress, or occupancy.",
  "estimatedJobCost": 278191.25,
  "approvedDate": "2026-04-08",
  "issuedDate": "2026-10-09",
  "expiredDate": "2027-01-01",
  "permitteeLicenseType": "GC",
  "permitteeBusinessName": null,
  "ownerBusinessName": null
}
```

Every record has these normalized fields (any can be `null`): `id`, `source`, `jobFilingNumber`, `workPermit`, `filingReason`, `workType`, `permitStatus`, `borough`, `houseNumber`, `streetName`, `zip`, `bin`, `bbl`, `block`, `lot`, `communityBoard`, `nta`, `latitude`, `longitude`, `jobDescription`, `estimatedJobCost`, `approvedDate`, `issuedDate`, `expiredDate`, `permitteeLicenseType`, `permitteeBusinessName`, `ownerBusinessName`.

### Free sample (100 rows)

Download a free 100-row sample produced by this actor (personal data removed), no account needed:

- CSV: https://api.apify.com/v2/datasets/VSrE8TUdKa3cqJW0v/items?format=csv
- JSON: https://api.apify.com/v2/datasets/VSrE8TUdKa3cqJW0v/items?format=json

### Pricing

Pay per result: **$5.00 per 1,000 results**, plus **$0.02 per new alert match**. Platform compute is included.

| Results | Cost |
|---|---|
| 100 | $0.50 |
| 1,000 | $5.00 |
| 10,000 | $50.00 |

Alert example: a daily scheduled run with `onlyNew: true` that finds 15 new matching records costs 15 × ($0.005 + $0.02) = $0.375. An alert match is a record returned in alert mode that no earlier run returned.

Use `maxResults` to cap spending. Charges are billed through the Apify platform only.

### Integrations

Connect results to **Zapier**, **Make**, Google Sheets, Slack, or your own backend with Apify integrations and **webhooks** (e.g. trigger on "run succeeded" and fetch the dataset). You can also call the actor through the Apify API or schedule it in Apify Console.

### FAQ

**How fresh is the data?**
NYC publishes DOB NOW approved permits to NYC Open Data daily; each run queries the live dataset.

**Do I get contact details?**
No. Personal names, phones, emails and owner mailing addresses are removed. Business names are kept only when they are clearly a company (INC, LLC, CORP...).

**Is personal data included?**
No. Personal names, phone numbers, emails and residential/owner mailing addresses are removed and this cannot be switched off. Business names are kept only when they clearly look like a company (INC, LLC, CORP...).

**How many results can I get per run?**
Up to 10000 per run (`maxResults`). Narrow by date, borough, ZIP or keywords for larger pulls.

**Do I need an NYC Open Data token?**
No. An optional Socrata app token (`appToken`) only raises rate limits.

**Is the data official?**
It is public NYC Open Data, passed through as published. Verify important decisions with the issuing agency.

### Running locally

```bash
ACTOR_INPUT='{"maxResults":10}' npx tsx actors/dob-permits/src/main.ts
## results -> ./storage/datasets/default/items.json
```

### Disclaimer

This actor is not affiliated with, endorsed by, or sponsored by the City of New York or any of its agencies. Data is provided "as is" from NYC Open Data and may be incomplete, delayed or inaccurate. Check important information against official sources.

# Actor input Schema

## `borough` (type: `string`):

Filter by borough.

## `zip` (type: `string`):

5-digit NYC ZIP code.

## `dateFrom` (type: `string`):

Inclusive start date (YYYY-MM-DD).

## `dateTo` (type: `string`):

Inclusive end date (YYYY-MM-DD).

## `keywords` (type: `array`):

Case-insensitive; a record matches if any keyword appears in the searched text fields.

## `workType` (type: `string`):

Filter by workType.

## `maxResults` (type: `integer`):

Hard cap 10000.

## `onlyNew` (type: `boolean`):

Return only records not returned by previous runs of this actor (for scheduled alerts).

## `appToken` (type: `string`):

Raises NYC Open Data rate limits. Can also be set with env SOCRATA_APP_TOKEN.

## Actor input object example

```json
{
  "borough": "BROOKLYN",
  "keywords": [
    "renovation"
  ],
  "workType": "General Construction",
  "maxResults": 100,
  "onlyNew": false
}
```

# Actor output Schema

## `results` (type: `string`):

All NYC Building Permits Scraper (DOB) records (JSON; append ?format=csv|xlsx for other formats).

## `overview` (type: `string`):

Results in the Overview view.

# 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 = {
    "borough": "BROOKLYN",
    "keywords": [
        "renovation"
    ],
    "workType": "General Construction",
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("polychrome_haymow/nyc-dob-permits").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 = {
    "borough": "BROOKLYN",
    "keywords": ["renovation"],
    "workType": "General Construction",
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("polychrome_haymow/nyc-dob-permits").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 '{
  "borough": "BROOKLYN",
  "keywords": [
    "renovation"
  ],
  "workType": "General Construction",
  "maxResults": 100
}' |
apify call polychrome_haymow/nyc-dob-permits --silent --output-dataset

```

## MCP server setup

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

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/4TvpAvIZGKkYK6nq5/builds/71Zjlm2ErERABv2dz/openapi.json
