# US Building Permits & Contractor Leads + MCP (`intellifin-data/us-building-permits-mcp`) Actor

Real-time US municipal building permits and licensed contractor leads across New York City (DOB), Chicago, Austin, and San Francisco via official Socrata Open Data APIs. Supports Batch Dataset runs, REST API, and Dual-Mode Streamable HTTP MCP Server for AI agents.

- **URL**: https://apify.com/intellifin-data/us-building-permits-mcp.md
- **Developed by:** [Xiaolei Lu](https://apify.com/intellifin-data) (community)
- **Categories:** Lead generation, AI, Developer tools
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 building permit & contractor leads extracted

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/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

## US Building Permits & Contractor Leads + MCP

**Extract real-time municipal building permits, licensed general contractor contacts, project valuations, and property owner entities across New York City (DOB), Chicago, Austin, and San Francisco — via Apify Dataset, REST API, or Streamable HTTP MCP Server.**

> **Want Clean B2B Leads Delivered Every Morning at 8:00 AM?**\
> Don't want to configure Apify schedules, deduplication, or custom CRM filtering yourself? Subscribe to **[IntelliFin Morning 8AM Signal Pipeline ($399/mo)](https://money-scout-cws-license.ab-claudecodegate.workers.dev/signal-pipeline)** for daily filtered high-value commercial permits (`>$100k` jobs, contractor contacts & owner entities) pushed straight to your Slack, HubSpot, or inbox.

***

### Why Use This Actor?

- **Four Top US Construction Markets in One Unified Schema:** Combines NYC Department of Buildings (`rbx6-tga4`), City of Chicago (`ydr8-5enu`), City of Austin (`3syk-w9eu`), and San Francisco DBI (`i98e-djp9`) into one clean `BuildingPermitRecord` schema.
- **High-Intent B2B Lead Signals:** Extracts `contractorCompany`, `contractorName`, `contractorLicense`, `contractorPhone` (Austin), `ownerBusiness`, `estimatedCostUsd`, `address`, and WGS84 coordinates.
- **Zero-Proxy, Sub-5s Pure HTTP Execution:** Queries official Socrata Open Data APIs directly using Crawlee `HttpCrawler` with automatic retries and zero browser overhead.
- **Dual-Mode Batch + Standby MCP Server:** Run as a scheduled Apify batch Actor or connect Claude Desktop, Cursor, or custom AI agents directly to `/mcp` using Streamable HTTP MCP.

***

### Supported Jurisdictions

| City Code | Jurisdiction | Official Source Dataset | Key Lead Fields Included |
|---|---|---|---|
| `nyc` | New York City (DOB) | `data.cityofnewyork.us` (`rbx6-tga4`) | Licensee name, business name, license #, business address, owner LLC, estimated job cost, borough |
| `chicago` | Chicago | `data.cityofchicago.org` (`ydr8-5enu`) | General & trade contractors (`contact_1..15`), owner entity, reported cost, total fee, ward |
| `austin` | Austin | `data.austintexas.gov` (`3syk-w9eu`) | Contractor company, full name, phone number, trade, remodel valuation, portal link |
| `sf` | San Francisco | `data.sfgov.org` (`i98e-djp9`) | Estimated & revised cost, proposed/existing use, neighborhood, coordinates, permit status |

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `cities` | `string[]` | `["nyc", "chicago", "austin", "sf"]` | Cities to query (`nyc`, `chicago`, `austin`, `sf`). |
| `keyword` | `string` | `""` | Optional keyword filter across description, work type, contractor, and address. |
| `minEstimatedCostUsd` | `number` | `0` | Minimum construction valuation in USD (e.g., `100000`). |
| `issuedSince` | `string` | `""` | Optional ISO start date filter (`YYYY-MM-DD`). |
| `commercialOnly` | `boolean` | `false` | Filter out single-family residential jobs and keep commercial/industrial/office permits. |
| `maxItems` | `number` | `20` | Maximum total normalized permit records to return (`1`–`1000`). |

#### Example Input JSON

```json
{
  "cities": ["nyc", "chicago", "austin", "sf"],
  "keyword": "commercial",
  "minEstimatedCostUsd": 25000,
  "commercialOnly": false,
  "maxItems": 20
}
```

***

### Output Schema & Example

Each dataset item conforms to `BuildingPermitRecord`:

| Field | Type | Description |
|---|---|---|
| `sourceCity` | `string` | Jurisdiction code (`nyc`, `chicago`, `austin`, `sf`) |
| `cityName` | `string` | Full city name |
| `permitId` | `string` | Unique identifier in source dataset |
| `permitNumber` | `string` | Official municipal permit or filing number |
| `permitType` | `string` | Permit class or filing reason |
| `workType` | `string \| null` | Scope of work classification |
| `status` | `string \| null` | Current permit status |
| `issuedDate` | `string \| null` | ISO date issued (`YYYY-MM-DD`) |
| `approvedOrFiledDate` | `string \| null` | ISO date approved or filed (`YYYY-MM-DD`) |
| `address` | `string \| null` | Project street address |
| `boroughOrNeighborhood` | `string \| null` | Borough, ward, district, or neighborhood |
| `state` | `string` | State code (`NY`, `IL`, `TX`, `CA`) |
| `zipCode` | `string \| null` | Postal ZIP code |
| `estimatedCostUsd` | `number \| null` | Estimated or revised construction cost in USD |
| `revisedOrTotalFeeUsd` | `number \| null` | Revised valuation (SF) or fee paid (Chicago) |
| `description` | `string \| null` | Cleaned scope of work description |
| `proposedUse` | `string \| null` | Proposed occupancy or use |
| `contractorName` | `string \| null` | Contractor or applicant contact name |
| `contractorCompany` | `string \| null` | Contractor company name |
| `contractorLicense` | `string \| null` | License number or trade classification |
| `contractorPhone` | `string \| null` | Publicly listed contractor phone (Austin) |
| `contractorLocation` | `string \| null` | Contractor address or city/state |
| `ownerName` | `string \| null` | Property owner contact name |
| `ownerBusiness` | `string \| null` | Property owner entity / LLC |
| `latitude` | `number \| null` | WGS84 latitude |
| `longitude` | `number \| null` | WGS84 longitude |
| `sourceUrl` | `string` | Official Socrata or municipal portal URL |
| `extractedAt` | `string` | UTC ISO extraction timestamp |

#### Example Output JSON

```json
{
  "sourceCity": "austin",
  "cityName": "Austin",
  "permitId": "2026-152520 MP",
  "permitNumber": "2026-152520 MP",
  "permitType": "Mechanical Permit",
  "workType": "New",
  "status": "Active",
  "issuedDate": "2026-11-25",
  "approvedOrFiledDate": "2026-11-09",
  "address": "13220 MORRIS RD UNIT 2401",
  "boroughOrNeighborhood": "District 6",
  "state": "TX",
  "zipCode": "78729",
  "estimatedCostUsd": 85000,
  "revisedOrTotalFeeUsd": 2121,
  "description": "Commercial tenant build-out HVAC installation",
  "proposedUse": "Commercial",
  "contractorName": "Cory Vales",
  "contractorCompany": "Protex Plumbing and Mechanical",
  "contractorLicense": "Mechanical Contractor",
  "contractorPhone": "5128989665",
  "contractorLocation": "AUSTIN 78729",
  "ownerName": null,
  "ownerBusiness": null,
  "latitude": 30.448,
  "longitude": -97.791,
  "sourceUrl": "https://abc.austintexas.gov/web/permit/public-search-other?t_detail=1&t_selected_folderrsn=13808444",
  "extractedAt": "2026-12-01T01:50:00.000Z"
}
```

***

### MCP Server & REST API Usage (Standby Mode)

When running in **Apify Standby Mode** (`APIFY_META_ORIGIN=STANDBY` or `--server`), the Actor exposes:

- `GET /health` — Server status and registered MCP tools
- `POST /api/search` — Synchronous REST JSON search matching the Actor input schema
- `POST /mcp` — Streamable HTTP MCP Server exposing:
  1. `search_building_permits`
  2. `get_high_value_commercial_permits`

#### Claude Desktop / Cursor / Apify MCP Configuration

```json
{
  "mcpServers": {
    "us-building-permits": {
      "type": "streamable-http",
      "url": "https://<YOUR_STANDBY_ACTOR_URL>/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

***

### Pay-Per-Event (PPE) Pricing

| Event | Unit Price (USD) | When Charged |
|---|---|---|
| `apify-actor-start` | `$0.02` | Automatically charged on batch Actor run start |
| `record-extracted` | `$0.005` | Per normalized permit record returned (batch or REST `/api/search`) |
| `mcp-tool-call` | `$0.02` | Per `tools/call` invocation on Standby `/mcp` |

***

### FAQ

- **Does this require proxies?** No. All four datasets are public municipal Socrata Open Data endpoints that allow fast, direct HTTP JSON access.
- **Why do some SF or Chicago permits omit contractor phone numbers?** Each city publishes different public fields; Austin publishes contractor phone numbers directly, NYC publishes licensee names/business addresses, and Chicago publishes multi-trade contractor company names and cities.
- **How are multi-city queries balanced?** When multiple cities are requested, results are sorted newest-first per jurisdiction and balanced round-robin so no single high-volume city crowds out the others.

# Changelog

This Actor's version history is a separate document: https://apify.com/intellifin-data/us-building-permits-mcp/changelog.md

# Actor input Schema

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

List of US municipal open-data jurisdictions to query: nyc, chicago, austin, sf.

## `keyword` (type: `string`):

Optional full-text keyword filter across permit description, work type, contractor, and address (e.g. 'commercial', 'renovation', 'electrical', 'solar').

## `minEstimatedCostUsd` (type: `integer`):

Keep only permits with estimated or revised job cost >= this USD threshold. Use 50000+ for high-value commercial/remodel leads.

## `issuedSince` (type: `string`):

Optional ISO start date filter (YYYY-MM-DD), e.g. '2025-01-01'.

## `commercialOnly` (type: `boolean`):

When true, filter out purely residential single-family permits and prioritize commercial, mixed-use, industrial, or institutional jobs.

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

Maximum total normalized permit records to return across selected cities (1 to 1000).

## Actor input object example

```json
{
  "cities": [
    "nyc",
    "chicago",
    "austin",
    "sf"
  ],
  "keyword": "commercial",
  "minEstimatedCostUsd": 25000,
  "commercialOnly": false,
  "maxItems": 20
}
```

# Actor output Schema

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

Normalized building permit and contractor leads dataset items.

## `mcpEndpoint` (type: `string`):

Streamable HTTP MCP endpoint for Claude Desktop, Cursor, and autonomous agents.

# 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",
        "chicago",
        "austin",
        "sf"
    ],
    "keyword": "commercial",
    "minEstimatedCostUsd": 25000,
    "commercialOnly": false,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("intellifin-data/us-building-permits-mcp").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",
        "chicago",
        "austin",
        "sf",
    ],
    "keyword": "commercial",
    "minEstimatedCostUsd": 25000,
    "commercialOnly": False,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("intellifin-data/us-building-permits-mcp").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",
    "chicago",
    "austin",
    "sf"
  ],
  "keyword": "commercial",
  "minEstimatedCostUsd": 25000,
  "commercialOnly": false,
  "maxItems": 20
}' |
apify call intellifin-data/us-building-permits-mcp --silent --output-dataset

```

## MCP server setup

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

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/mMEthCblxkloznOal/builds/CIEb5J0bVxJO2ym5M/openapi.json
