# Building Permits Tracker (15 US Cities, Trade Filters) (`signalloom/building-permits-tracker`) Actor

New building permits from 15 US city open-data portals (NYC, LA, Chicago, SF, Seattle, DC, Denver and more) with trade category (roofing, solar, HVAC...), valuation and contractor business. New-permit alerts. No owner or applicant names. Unofficial; not affiliated with the cities.

- **URL**: https://apify.com/signalloom/building-permits-tracker.md
- **Developed by:** [Signalloom](https://apify.com/signalloom) (community)
- **Categories:** Lead generation, Real estate
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 building permits

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

## Building Permits Tracker (15 US cities)

*Unofficial, not affiliated with or endorsed by any of the cities below or their departments. Austin data: City of Austin, Texas, Austin Development Services. Mesa data: City of Mesa.*

### What does Building Permits Tracker do?

Finds **newly issued building permits** in official city open-data portals and tells you which ones appeared since your last run. It reads a short look-back window (3 days by default, 31 at most) and never downloads a whole permit history.

**15 cities:** New York City (DOB NOW), Los Angeles, Chicago, San Francisco, Seattle, Washington DC, Denver, Minneapolis, Austin, New Orleans, Cincinnati, Raleigh, Mesa (AZ), Norfolk (VA) and Buffalo.

Every permit gets a **trade category** (roofing, solar, HVAC, plumbing, electrical, pool, demolition, new construction, addition / remodel, signage, other), so you can pull, say, only roofing and solar jobs across all 15 cities. Filters for **new construction only** and **minimum valuation** find the big projects.

Typical uses: leads for roofers, solar and HVAC installers, plumbers, pool builders, suppliers and subcontractors; tracking large projects for insurers, lenders and investors.

### Who is it for?

- **Trades and installers** (roofing, solar, HVAC, plumbing, electrical, pools) looking for fresh jobs in their cities
- **Suppliers and subcontractors** following new construction
- **Insurers, lenders and investors** tracking large projects
- **Analysts and developers** who need permit data from many cities in one schema

### Example output

One row per permit. Real rows from a run on the Apify platform on 2026-11-23 (run LUbGbESA7wf6lSaqu, build 0.3.3) (the `sourceNotes` text is left out here):

```json
[
  {
    "changeType": "snapshot",
    "changeReason": "snapshot row",
    "isBaseline": false,
    "detectedAt": "2026-11-23T02:10:05.645Z",
    "eventDate": "2026-11-19",
    "permitId": "7172982-RR",
    "usCity": "SEA",
    "permitType": "Roof",
    "workType": null,
    "workDescription": "Overlay re-reroof project lasting roughly two weeks: DuroLast PVC membrane overtop of the existing roof system. Install method: Hot air weld.",
    "tradeCategory": "roofing",
    "valuation": 60000,
    "isNewConstruction": false,
    "permitStatus": "Issued",
    "issueDate": "2026-11-19",
    "expirationDate": "2028-05-19",
    "address": "617 Broadway E",
    "borough": null,
    "city": "Seattle",
    "state": "WA",
    "zip": "98102",
    "latitude": 47.62474735,
    "longitude": -122.32135675,
    "contractorBusinessName": "James King Roofing LLC",
    "contractorBusinessNameWithheld": false,
    "contractorTrade": null,
    "contractorLicenseNo": null,
    "sourceDataset": "data.seattle.gov/76t5-zqzr",
    "sourceUrl": "https://data.seattle.gov/d/76t5-zqzr",
    "changedFields": null,
    "previousValues": null
  },
  {
    "changeType": "snapshot",
    "changeReason": "snapshot row",
    "isBaseline": false,
    "detectedAt": "2026-11-23T02:10:05.645Z",
    "eventDate": "2026-11-20",
    "permitId": "BLDG1211583",
    "usCity": "MSP",
    "permitType": "Res",
    "workType": "Remodel",
    "workDescription": "INSTALL A SOLAR PV SYSTEM ON ROOF OF BUILDING. (MAA) COLLECTOR CAPACITY _6.16___ KW SOLAR CHECKLIST ATTACHED. MEETS OR EXCEEDS SRCC CERT PER MN RULES 1325.1100 Subp.5a as applicable. ADDITIONAL PERMITS: PV SYSTEMS ALSO RE",
    "tradeCategory": "solar",
    "valuation": 6160,
    "isNewConstruction": false,
    "permitStatus": "Issued",
    "issueDate": "2026-11-20",
    "expirationDate": null,
    "address": "4745 Elliot Ave",
    "borough": "Northrop",
    "city": "Minneapolis",
    "state": "MN",
    "zip": null,
    "latitude": 44.91625,
    "longitude": -93.26099,
    "contractorBusinessName": "CENTAURI SYSTEMS LLC",
    "contractorBusinessNameWithheld": false,
    "contractorTrade": null,
    "contractorLicenseNo": null,
    "sourceDataset": "opendata.minneapolismn.gov/ccs-permits",
    "sourceUrl": "https://opendata.minneapolismn.gov/datasets/cityoflakes::ccs-permits",
    "changedFields": null,
    "previousValues": null
  },
  {
    "changeType": "snapshot",
    "changeReason": "snapshot row",
    "isBaseline": false,
    "detectedAt": "2026-11-23T02:10:05.645Z",
    "eventDate": "2026-11-20",
    "permitId": "PMT26-19057",
    "usCity": "MESA",
    "permitType": "Sign Permit",
    "workType": null,
    "workDescription": "Install non illuminated lettering on monument sign PRICE MANOR 20 sq. ft. REF: PMT25-01195 civil improvements for monument sign construction. Results in CofC.",
    "tradeCategory": "signage",
    "valuation": null,
    "isNewConstruction": false,
    "permitStatus": "Issued",
    "issueDate": "2026-11-20",
    "expirationDate": null,
    "address": "2225 N Center St",
    "borough": null,
    "city": "Mesa",
    "state": "AZ",
    "zip": null,
    "latitude": 33.455862,
    "longitude": -111.830841,
    "contractorBusinessName": "ASSOCIATED SIGN COMPANY",
    "contractorBusinessNameWithheld": false,
    "contractorTrade": null,
    "contractorLicenseNo": "078852",
    "sourceDataset": "citydata.mesaaz.gov/dzpk-hxfb",
    "sourceUrl": "https://citydata.mesaaz.gov/d/dzpk-hxfb",
    "changedFields": null,
    "previousValues": null
  },
  {
    "changeType": "snapshot",
    "changeReason": "snapshot row",
    "isBaseline": false,
    "detectedAt": "2026-11-23T02:10:05.645Z",
    "eventDate": "2026-11-19",
    "permitId": "BLDNR-020062-2026",
    "usCity": "RAL",
    "permitType": "Building",
    "workType": "New Building",
    "workDescription": "Building 3 Construction of a new multifamily apartment building within the Fifth Oak Multifamily dev",
    "tradeCategory": "new_construction",
    "valuation": 3320971.2,
    "isNewConstruction": true,
    "permitStatus": "Issued",
    "issueDate": "2026-11-19",
    "expirationDate": "2027-05-18",
    "address": "5230 Pinecross Way",
    "borough": null,
    "city": "Raleigh",
    "state": "NC",
    "zip": "27616",
    "latitude": 35.84558593335598,
    "longitude": -78.515525706502,
    "contractorBusinessName": "Front Street Construction Services, LLC",
    "contractorBusinessNameWithheld": false,
    "contractorTrade": null,
    "contractorLicenseNo": null,
    "sourceDataset": "data.raleighnc.gov/building-permits-past-31-days",
    "sourceUrl": "https://data.raleighnc.gov/datasets/ral::building-permits-past-31-days",
    "changedFields": null,
    "previousValues": null
  }
]
```

### Trade categories

`tradeCategory` comes from the permit type, work type and work description, using a **fixed keyword list** (no AI, no guessing). The rules, in order:

1. **Solar, pool, signage, demolition** when the type or description clearly says so (for example "PV system", "swimming pool", "monument sign", "demolish", "raze"). Interior demolition inside a remodel is not demolition; "exit sign" is not signage.
2. **Roofing, HVAC, plumbing, electrical** from the permit or work type ("Mechanical HVAC", "Plumbing And Gas", "Electrical Service"). If the type names no trade, the description decides when it names exactly one trade.
3. **New construction**: the city's own new-construction flag, or new-building words.
4. **Addition / remodel**: alterations, additions, repairs, renovations, tenant improvements.
5. Everything else is **other**.

Known limits: a general building permit whose description lists several trades is classed as addition / remodel or new construction, not as each trade. Norfolk publishes re-roofs and solar panels as one work type ("Reroof/Solar Panels"); those rows are classed as **roofing**. Denver publishes no work description, so its categories rely on the permit class.

### Cities, sources and terms

All reads go through each portal's documented public API: Socrata SODA for most cities, ArcGIS REST for DC, Minneapolis, Raleigh and Denver. No scraping, no login, no browser, no proxy. The Actor checks `robots.txt` before its first request to each host, waits **at least 1 second** between requests and retries 429 / 5xx errors with back-off.

| Code | City | Dataset | Licence / terms |
|---|---|---|---|
| NYC | New York City | [DOB NOW: Build – Approved Permits](https://data.cityofnewyork.us/d/rbx6-tga4); new-building jobs from [Job Application Filings](https://data.cityofnewyork.us/d/w9ak-ipjd) | NYC Open Data Law: no use restrictions; no warranty |
| CHI | Chicago | [Building Permits](https://data.cityofchicago.org/d/ydr8-5enu) | City of Chicago Data Terms of Use: disclaimer required (below and in `sourceNotes`); the City may require use to stop; includes an **indemnity clause** |
| AUS | Austin | [Issued Construction Permits](https://data.austintexas.gov/d/3syk-w9eu), Austin Development Services | Public domain (USGOV_WORKS); credit to the City and the department (below); do not contact individuals in the data |
| BUF | Buffalo | [Permits](https://data.buffalony.gov/d/9p2d-f3yt) | Dataset licence USGOV_WORKS; no warranty |
| LA | Los Angeles | [LADBS Building Permits Issued from 2020 to Present](https://data.lacity.org/d/pi9x-tg5x) | No licence field on the dataset. The portal's Terms of Use give no warranty and do not restrict reuse; the City's open-data policy makes the data freely available to the public and businesses. **Refreshed weekly**: use a look-back of 10+ days |
| SF | San Francisco | [DBI Building Permits](https://data.sfgov.org/d/i98e-djp9) | Open Data Commons PDDL (public domain) |
| SEA | Seattle | [SDCI Building Permits](https://data.seattle.gov/d/76t5-zqzr) | Public domain |
| NOLA | New Orleans | [Safety and Permits – Permits](https://data.nola.gov/d/rcm3-fn58) | CC0 (public domain dedication) |
| CIN | Cincinnati | [Cincinnati Building Permits](https://data.cincinnati-oh.gov/d/uhjb-xac9) | Public domain |
| MESA | Mesa, AZ | [Building Permits](https://citydata.mesaaz.gov/d/dzpk-hxfb), Development Services | City of Mesa Open Data Terms: open licence, commercial use allowed; **the City must be listed as the source** (data credit: City of Mesa) |
| NOR | Norfolk, VA | [Permits](https://data.norfolk.gov/d/fahm-yuh4), Development Services Center | No licence field. City open-data policy: data "can be used, reused and redistributed by anyone without restriction or cost" |
| DC | Washington, DC | [Building Permits in Last 30 Days](https://opendata.dc.gov/datasets/building-permits-in-last-30-days), Department of Buildings | CC BY 4.0 (attribution: District of Columbia, Department of Buildings). **Last 30 days only** |
| MSP | Minneapolis | [CCS Permits](https://opendata.minneapolismn.gov/datasets/cityoflakes::ccs-permits) | The City has waived all copyright (CC0-style); no warranty |
| RAL | Raleigh | [Building Permits Past 31 Days](https://data.raleighnc.gov/datasets/ral::building-permits-past-31-days) | Open Raleigh Data Policy: no warranty; the City may discontinue feeds or require that use stops. **Last 31 days only** |
| DEN | Denver | Residential and Commercial Construction Permits ([Denver Open Data Catalog](https://opendata-geospatialdenver.hub.arcgis.com/)) | CC BY 3.0 (City GIS page). Use constraints: no warranty, and an **indemnity clause** (as with Chicago) |

> **Chicago disclaimer (City of Chicago Data Terms of Use):** “This site provides applications using data that has been modified for use from its original source, www.cityofchicago.org, the official website of the City of Chicago. The City of Chicago makes no claims as to the content, accuracy, timeliness, or completeness of any of the data provided at this site. The data provided at this site is subject to change at any time. It is understood that the data provided at this site is being used at one’s own risk.”

> **Austin credit:** Austin Development Services. (n.d.). *Issued Construction Permits* \[Data set]. City of Austin, Texas Open Data Portal. https://data.austintexas.gov/d/3syk-w9eu. Austin permit data courtesy of the City of Austin, Texas, Austin Development Services.

> **Attribution:** Washington DC data © District of Columbia, Department of Buildings, CC BY 4.0. Denver data © City and County of Denver, CC BY 3.0. Mesa data: City of Mesa. Rows are modified (fields renamed, trimmed and classified).

This Actor is unofficial and is not affiliated with any city. Nothing here is legal advice.

#### Cities that were checked and left out

| City | Why not included |
|---|---|
| Boston, San Antonio, Phoenix, Houston | Their CKAN portals' `robots.txt` disallows `/api/` and `/datastore/`, the only query endpoints. (Phoenix's permit file was also last updated in 2023.) |
| Pittsburgh (WPRDC) | `robots.txt` disallows `/api/`. Its comments say apps may ignore that, but this Actor always follows `robots.txt`. |
| Philadelphia | Its licence says the City "reserves all rights in the database", so commercial reuse is not granted, and its contractor field often holds personal names. |
| Nashville | Metro's open-data order says the data are "for informational purposes only", and its website terms forbid commercial use without written permission. |
| Baton Rouge | The portal's terms limit use to "informational, non-commercial and personal use" and forbid "data mining, robots". |
| Dallas | No licence or terms of use could be found for the permit dataset, and its dates are stored as 2-digit-year text. |
| Cambridge, MA | Public domain, but split across six datasets with only a handful of permits a week. |
| Albany, Syracuse, Rochester, Saratoga Springs | Checked in 0.2: no current dataset, or no licence found. |

### What data can it extract?

| Field | Description |
|---|---|
| `changeType` | `new`, `changed` (only when *Only new* is off), `baseline` (first run) or `snapshot` |
| `permitId`, `usCity` | The city's permit id and the city code (`NYC`, `LA`, `CHI`, ...) |
| `permitType`, `workType` | As published (for example NYC: filing reason and trade; LA: permit type and building type; Denver: residential / commercial and permit class) |
| `workDescription` | First paragraph only, phone numbers and emails removed, 400 characters max (null where the city publishes none: Norfolk, Denver) |
| `tradeCategory` | One of 11 categories, see above |
| `valuation` | Reported job cost in USD (null when not reported; DC publishes none) |
| `isNewConstruction` | true / false from the city's own labels; null for Buffalo |
| `permitStatus`, `issueDate`, `expirationDate` | As published |
| `address`, `borough`, `city`, `state`, `zip`, `latitude`, `longitude` | The work site (`borough` = borough, neighborhood or ward where published) |
| `contractorBusinessName`, `contractorTrade` | Contractor / permittee business and trade or licence type, where the city publishes them |
| `contractorLicenseNo` | Contractor licence number where published (NYC, Buffalo, Mesa, Raleigh), and only when the business name is kept |
| `sourceDataset`, `sourceUrl`, `sourceNotes` | Where the row came from, with the terms / disclaimer text |

Contractor names are published by NYC, Chicago, Austin, Buffalo, Seattle, New Orleans, Cincinnati, Mesa, Minneapolis, Raleigh and Denver. Los Angeles, San Francisco, Washington DC and Norfolk publish none in these datasets.

How "new construction" is decided: the city's own label (NYC: job filed as "New Building"; Chicago: permit type "New Construction"; Austin, Seattle, Cincinnati, Raleigh, Norfolk: building permit with work class "New"; LA: "Bldg-New"; SF: permit types 1 and 2; New Orleans: "New Construction"; Mesa: new residential permit; DC: "New Building"; Minneapolis: residential or commercial work type "New"; Denver: class "New Building").

### How it works

1. Each run reads permits issued in the last `lookbackDays` days from each selected city (one request at a time, 1 s apart), then applies your filters.
2. Records are compared with the state saved by the previous run in a **named key-value store** (`SNAPSHOT_V1` in `stateStoreName`).
3. **The first run for a city (or a run after its filters change) is a baseline.** With the default `emitBaselineRows` the window's permits are output as `baseline` rows (`isBaseline: true`).
4. Later runs output **new** permits. Turn **Only new permits** off to also output **changed** ones (for example a status or valuation change).
5. Permits that age out of the window are not events. Keep `lookbackDays` at least as long as the gap between runs (10+ days if you include Los Angeles).

The `RUN_SUMMARY` key-value record lists, per city: rows fetched and kept, the newest source date, diff statistics and any error. If one city's portal fails, the others still run and the failed city keeps its previous saved state.

### Input

| Field | Meaning |
|---|---|
| `cities` | Any of `NYC`, `CHI`, `AUS`, `BUF`, `LA`, `SF`, `SEA`, `NOLA`, `CIN`, `MESA`, `NOR`, `DC`, `MSP`, `RAL`, `DEN`. Default: `NYC`, `CHI`, `AUS`, `BUF` (as before, so saved inputs behave the same). |
| `lookbackDays` | 1-31, default 3 (prefilled 7: the city portals publish with a delay and fewer permits are issued on weekends). DC and Raleigh only publish the last 30 / 31 days. |
| `tradeCategories` | Keep only these trade categories, e.g. `roofing`, `solar`. Empty = all. |
| `newConstructionOnly` | Default off. Skips Buffalo while on. |
| `minValuation` | USD. 0 = no minimum. With a minimum set, permits without a reported value are dropped (so DC drops out). |
| `permitTypes` | Text filter on permit type / work type, e.g. `Plumbing`, `Demolition`. |
| `includeRenewals` | NYC re-issues permits on renewal; renewals are skipped unless this is on. |
| `onlyNew`, `outputMode`, `emitBaselineRows`, `maxItems` | See the Input tab. |
| `stateStoreName`, `commitState` | Named store for saved state; untick `commitState` for a dry run. |
| `sourceRowLimit` | Testing only: read at most N rows per city. |

Example: roofing and solar permits in five Sun Belt and West Coast cities, run weekly:

```json
{ "cities": ["LA", "SF", "MESA", "AUS", "RAL"], "tradeCategories": ["roofing", "solar"], "lookbackDays": 10 }
```

### Privacy

Business-level data only:

- **Never requested or output:** owner names and owner addresses, applicant names, filing-representative names, contractor phone numbers, e-mails and addresses (Mesa, Raleigh), Austin's `contractor_full_name`, Minneapolis' property-owner `fullName`, DC's `OWNER_NAME` and `PERMIT_APPLICANT`, New Orleans' `owner` and `applicant`.
- **Contractor names:** a name is output only when it looks like a business (Inc, LLC, Construction, Plumbing, digits...). Anything else, including joint personal names and names with a label such as "Owner: ...", is withheld (`contractorBusinessName: null`, `contractorBusinessNameWithheld: true`). This is a heuristic: a few real business names are withheld by mistake and a few personal names with business words in them can pass. New Orleans and Buffalo often list a person, so many of their rows have no contractor name.
- **Licence numbers** are output only together with a kept business name (a withheld person's licence number is not output).
- **Work descriptions** are free text written by applicants. They are cut to the first paragraph and stripped of phone numbers and emails, but a stray personal name can remain in some descriptions.
- The work-site address is output because it identifies the project; it is the property address, not an owner's address.

### Pricing and cost

Pay-per-event pricing, shown on the Pricing tab:

- **actor-start**: once per run
- **permit**: each output row (new, changed, baseline or snapshot row)

A run that finds nothing new is charged only the start event. Set **Maximum cost per run** to cap spend: the Actor stops cleanly at the limit and keeps everything delivered so far. Rows held back by the limit stay pending and are reported by the next run. All 15 cities produce a few thousand permits a week, so use the filters and `maxItems` to keep a first (baseline) run small.

Measured on the Apify platform on 2026-11-23 (1024 MB): the prefilled input (a week of NYC permits above $250,000) took 15 seconds and about $0.0013 of platform usage; a snapshot of the 30 newest permits from each of the 15 cities (423 rows) took 63 seconds and about $0.0021.

### Limitations

- Only the cities above are covered. Valuations are what applicants report and are often 0 or missing.
- Los Angeles publishes weekly; DC and Raleigh publish only the last 30 / 31 days.
- NYC permit renewals share a permit id with the original; the Actor keys them by permit id plus sequence number.
- New-construction flags rely on each city's own labels. Buffalo cannot be filtered to new construction, and its `permitStatus` is not published.
- NYC's job-filings dataset (used for the NYC new-building flag) is sometimes reloaded by the city and is then incomplete. In change mode the Actor saves each good NYC lookup in your state store and, when a live lookup has under half of that one's jobs, uses the saved lookup instead and says so (with its date) in the log and `RUN_SUMMARY` (`newBuildingLookup`). Jobs filed after that date may not be flagged. Before the first good lookup is saved, the run only warns.
- `tradeCategory` is a keyword rule, not a reading of the plans: see "Trade categories".

### FAQ

**Why did my run return no rows?**
The look-back window had no new permits that match your filters. City portals lag by a day or more (Los Angeles by up to a week), and fewer permits are issued on weekends. The run still finishes cleanly; check `newestSourceDate` per city in `RUN_SUMMARY` and widen `lookbackDays` if needed.

**Does it output owner or applicant names?**
No. Owner and applicant names, owner addresses, phones and emails are never requested or output. Contractor names are output only when they look like a business.

**Will my saved input change after this update?**
No. Fields were only added. The default cities are still NYC, Chicago, Austin and Buffalo, and the saved change-detection state from earlier runs keeps working (no new baseline) unless you change filters.

**What happens on the first run?**
A baseline is stored for each city. With the default *Output rows on the first run* the window's permits are also output as `baseline` rows. Later runs output only new (and optionally changed) permits.

**Can I add another city?**
Open an issue with the city and its open-data portal.

### Tests

`npm test` runs the unit tests (throttling, robots.txt refusal, diff logic, privacy rules, per-city column mapping for all 15 cities, the trade classifier against real permit texts, filters, the NYC saved-lookup fallback, and full runs against a fake portal). Local runs use `apify run` and cost nothing.

# Actor input Schema

## `cities` (type: `array`):

Which city portals to read. NYC = New York City DOB NOW, CHI = Chicago, AUS = Austin, BUF = Buffalo, LA = Los Angeles (refreshed weekly: use a look-back of 10+ days), SF = San Francisco, SEA = Seattle, NOLA = New Orleans, CIN = Cincinnati, MESA = Mesa AZ, NOR = Norfolk VA, DC = Washington DC (last 30 days only), MSP = Minneapolis, RAL = Raleigh (last 31 days only), DEN = Denver. Buffalo is skipped when 'New construction only' is on. Default: the first four.

## `lookbackDays` (type: `integer`):

Read permits issued in the last N days (1-31). Keep it at least as long as the gap between your runs.

## `newConstructionOnly` (type: `boolean`):

Keep only permits for new construction. NYC: jobs filed as 'New Building' in DOB NOW. Chicago: permit type 'New Construction'. Austin: a Building Permit with work class 'New'.

## `minValuation` (type: `integer`):

Keep only permits whose reported job cost is at least this much. 0 = no minimum. Permits with no reported value are dropped when a minimum is set.

## `permitTypes` (type: `array`):

Only keep permits whose permit type or work type contains one of these texts, e.g. Plumbing, Demolition, Solar. Empty = all.

## `tradeCategories` (type: `array`):

Only keep permits whose tradeCategory is one of these (roofing, solar, HVAC, plumbing, electrical, pool, demolition, new construction, addition / remodel, signage, other). The category is derived from the permit type and work description with a fixed keyword list. Empty = all.

## `includeRenewals` (type: `boolean`):

NYC re-issues permits on renewal. Off (default): renewal permits are skipped so only initial permits are output.

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

On (default): output only permits that were not in the previous run's state. Off: also output permits whose published fields changed (for example a status change).

## `outputMode` (type: `string`):

'changes' = compare with the previous run (the first run stores a baseline). 'snapshot' = output everything in the look-back window; never touches the stored state.

## `emitBaselineRows` (type: `boolean`):

On the first run (or after the filters change) nothing can be compared yet. On (default): output the window's permits as 'baseline' rows. Off: only store the baseline.

## `redactIndividualNames` (type: `boolean`):

Deprecated and ignored: output is always business-only. A contractor name is kept only if it looks like a business (Inc, LLC, Construction, Plumbing...); otherwise contractorBusinessName is null and contractorBusinessNameWithheld is true.

## `maxItems` (type: `integer`):

Cap on rows pushed to the dataset (0 = no cap).

## `newConstructionLookbackDays` (type: `integer`):

NYC permits are matched to 'New Building' jobs filed in this many days (30-1825). Longer = fewer missed new-construction flags, a few more requests.

## `stateStoreName` (type: `string`):

Named key-value store that holds the previous run's state. The default run store is erased with each run, so a named store is needed for change detection (it is created on first use).

## `commitState` (type: `boolean`):

Untick for a dry run that leaves the stored state untouched.

## `sourceRowLimit` (type: `integer`):

0 = read the whole look-back window. Set a small number only for tests; part of the state signature, so changing it starts a new baseline.

## `requestDelayMs` (type: `integer`):

Pause between requests to the city portals. Minimum 1000 (the portals declare Crawl-delay: 1).

## Actor input object example

```json
{
  "cities": [
    "NYC"
  ],
  "lookbackDays": 7,
  "newConstructionOnly": false,
  "minValuation": 250000,
  "permitTypes": [],
  "tradeCategories": [],
  "includeRenewals": false,
  "onlyNew": true,
  "outputMode": "changes",
  "emitBaselineRows": true,
  "redactIndividualNames": true,
  "maxItems": 50,
  "newConstructionLookbackDays": 1095,
  "stateStoreName": "building-permits-state",
  "commitState": true,
  "sourceRowLimit": 0,
  "requestDelayMs": 1000
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset with the new / changed / baseline / snapshot rows

## `summary` (type: `string`):

Counts, filters, per-source status and whether this was a baseline run

# 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 = {
    "cities": [
        "NYC"
    ],
    "lookbackDays": 7,
    "minValuation": 250000,
    "permitTypes": [],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("signalloom/building-permits-tracker").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 = {
    "cities": ["NYC"],
    "lookbackDays": 7,
    "minValuation": 250000,
    "permitTypes": [],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("signalloom/building-permits-tracker").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 '{
  "cities": [
    "NYC"
  ],
  "lookbackDays": 7,
  "minValuation": 250000,
  "permitTypes": [],
  "maxItems": 50
}' |
apify call signalloom/building-permits-tracker --silent --output-dataset

```

## MCP server setup

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

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/mBvEn7yyXT1hg6z3m/builds/Ut7rdRjfgexDgfiRZ/openapi.json
