# US Building Permits Scraper (Official City Open Data) (`cblu/us-building-permits-scraper`) Actor

Extract building permits from official city open-data APIs — NYC, Chicago, Los Angeles, Austin, San Francisco, New Orleans, and more. Filter by date, permit type, valuation, and keyword. Normalized schema, contractor names where published. Pay per record.

- **URL**: https://apify.com/cblu/us-building-permits-scraper.md
- **Developed by:** [Steven Carleton](https://apify.com/cblu) (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 permit records

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## US Building Permits Scraper — Construction Leads from Official City Open Data

Extract **building permit records** for **New York City, Chicago, Los Angeles, Austin, San Francisco, New Orleans, Baton Rouge, Montgomery County (MD), and Norfolk (VA)** — straight from each city's **official open-data API**, normalized into one shared schema. Filter by **issue date, permit type, project valuation, and keyword**, and download clean JSON, CSV, or Excel.

Because this Actor reads the cities' own open-data APIs (Socrata/SODA) instead of scraping fragile permit-search websites, it is **fast, complete, and doesn't break** when a city redesigns its search page — the #1 failure mode of other permit scrapers.

### What data do you get?

One result per permit, in the **same schema for every city**:

| Field | Example |
|---|---|
| `city` / `state` | `New York City, NY` / `NY` |
| `permitNumber` | `M01129209-I1` |
| `permitType` / `permitClass` / `workType` | `General Construction` / `Initial Permit` / ... |
| `description` | Work description as filed |
| `status` | `Issued`, `Active`, ... |
| `appliedDate` / `issuedDate` / `expirationDate` | `2026-07-10` (ISO dates) |
| `address` / `zip` | Job site address |
| `valuation` | Declared project value in USD, e.g. `2507920` |
| `squareFootage` / `fees` | When published |
| `contractorName` / `contractorLicense` | Contractor / permittee, when published (NYC, Chicago, Austin, Baton Rouge) |
| `applicantName` / `ownerName` | When published |
| `latitude` / `longitude` | Job site coordinates |
| `raw` | Optional: every extra field the city publishes |

### Supported cities (verified sources)

| City | Source dataset |
|---|---|
| New York City, NY | DOB NOW: Build — Approved Permits (data.cityofnewyork.us) |
| Chicago, IL | Building Permits (data.cityofchicago.org) |
| Los Angeles, CA | Building Permits Issued 2020+ (data.lacity.org) |
| Austin, TX | Issued Construction Permits (data.austintexas.gov) |
| San Francisco, CA | Building Permits (data.sfgov.org) |
| New Orleans, LA | Building Permits (data.nola.gov) |
| Baton Rouge, LA | EBR Building Permits (data.brla.gov) |
| Montgomery County, MD | Residential + Commercial Permits (data.montgomerycountymd.gov) |
| Norfolk, VA | Permits (data.norfolk.gov) |

Need another city? Open an issue on the Actor's Issues tab — adding a city with a public open-data permits feed is usually a same-week change.

### Use cases

- **Construction lead generation** — new permits are the earliest public buying signal in construction. Schedule the Actor weekly with `issuedAfter` set to last week and feed fresh permits (with valuations and contractor names) into your CRM. Building-material suppliers, dumpster/equipment rental, insurance, solar, and HVAC companies all sell to the addresses on these permits.
- **Contractor prospecting** — permits name the contractor doing the work: build lists of active roofers, electricians, or GCs by city and volume of recent permits.
- **Market intelligence** — track construction activity by neighborhood, permit type, and declared value; benchmark competitors' project pipelines.
- **Real-estate due diligence** — pull the full permit history of an address before buying or underwriting.
- **AI agents / MCP** — the normalized cross-city schema means one tool call answers "what was just permitted near X?" in any supported city.

### How to use it

Fresh high-value construction leads in two cities:

```json
{
    "cities": ["austin", "chicago"],
    "issuedAfter": "2026-07-01",
    "minValuation": 50000,
    "maxResultsPerCity": 1000
}
````

Find all recent solar work in Los Angeles:

```json
{
    "cities": ["los-angeles"],
    "searchQuery": "solar",
    "issuedAfter": "2026-06-01",
    "maxResultsPerCity": 500
}
```

Leave `cities` empty to query **all supported cities** in one run. `permitTypeContains` filters by trade (`electrical`, `roof`, `plumbing`...). Set `includeRawData` to true to also get every city-specific extra field. **You are only charged for records actually returned.**

### Pricing

Pay per result: one charge per permit record extracted.

> Suggested store pricing (set in the Apify Console → Publication → Monetization):
>
> - `permit-record` event: **$0.005 per record** ($5.00 per 1,000 records)
>
> Rationale: comparable permit actors charge $0.002–$0.03 per record, and the two highest-user incumbents (79 and 83 users) sit at $0.005 and $0.002 with 1.0★/unrated reviews and failing runs. $5/1,000 keeps a 1,000-lead weekly pull under a coffee's cost while reflecting that each record is a warm, dated, valued construction lead.

### Data source & freshness

Every record comes from the city's **own open-data portal** (Socrata SODA API) — official public records published by the municipalities themselves, refreshed daily or near-daily. No HTML scraping, no captchas, no blocked requests, no stale mirrors. Date filtering and full-text search run **server-side on the portal**, so runs are fast and cheap even against multi-million-row datasets.

### FAQ

**How current is the data?** Most of the cities refresh these datasets daily (we verified issue dates from the last 24–48 hours at publication). Schedule the Actor daily or weekly for a continuous feed.

**Do I get contractor phone numbers?** Only when the city publishes them (e.g. Austin publishes contractor phone; NYC publishes license numbers). No fabricated enrichment — records are exactly what the city of record publishes.

**Can I pull a full permit history?** Yes — omit the date filters and raise `maxResultsPerCity` (up to 200,000 per city per run).

**Why is a permit missing?** If the city hasn't loaded it into its open-data feed yet, it won't be here; feeds typically lag the permit office by 0–2 days.

# Actor input Schema

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

Which official open-data sources to extract permits from. Leave empty (or include <code>all</code>) to query every supported source.

## `issuedAfter` (type: `string`):

Optional. Only return permits issued on/after this date (format <code>YYYY-MM-DD</code>). Set this to last week and schedule the Actor weekly for a fresh construction-leads feed.

## `issuedBefore` (type: `string`):

Optional. Only return permits issued on/before this date (format <code>YYYY-MM-DD</code>).

## `searchQuery` (type: `string`):

Optional. Full-text search across the source dataset (runs server-side on the open-data portal), e.g. <code>solar</code>, <code>pool</code>, <code>demolition</code>, <code>ADU</code>.

## `permitTypeContains` (type: `string`):

Optional. Case-insensitive substring match against the permit type / class / work type, e.g. <code>electrical</code>, <code>roof</code>, <code>plumbing</code>, <code>new construction</code>.

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

Optional. Only return permits whose declared project value is at least this amount. Permits without a published valuation are excluded when this is set. Not every city publishes valuations for every permit.

## `maxResultsPerCity` (type: `integer`):

Maximum number of permit records to return per selected city. You are only charged for records actually returned.

## `includeRawData` (type: `boolean`):

Attach the untouched source-API row as a <code>raw</code> field on every record (each city publishes extra fields beyond the normalized schema).

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

Optional. Your own Socrata application token for higher open-data API rate limits. Not required for normal use.

## Actor input object example

```json
{
  "cities": [
    "austin",
    "chicago"
  ],
  "maxResultsPerCity": 500,
  "includeRawData": false
}
```

# 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": [
        "austin",
        "chicago"
    ],
    "maxResultsPerCity": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("cblu/us-building-permits-scraper").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": [
        "austin",
        "chicago",
    ],
    "maxResultsPerCity": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("cblu/us-building-permits-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "austin",
    "chicago"
  ],
  "maxResultsPerCity": 500
}' |
apify call cblu/us-building-permits-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=cblu/us-building-permits-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "US Building Permits Scraper (Official City Open Data)",
        "description": "Extract building permits from official city open-data APIs — NYC, Chicago, Los Angeles, Austin, San Francisco, New Orleans, and more. Filter by date, permit type, valuation, and keyword. Normalized schema, contractor names where published. Pay per record.",
        "version": "0.1",
        "x-build-id": "zz6YC273W2a9kPYsW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/cblu~us-building-permits-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-cblu-us-building-permits-scraper",
                "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/cblu~us-building-permits-scraper/runs": {
            "post": {
                "operationId": "runs-sync-cblu-us-building-permits-scraper",
                "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/cblu~us-building-permits-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-cblu-us-building-permits-scraper",
                "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": {
                    "cities": {
                        "title": "Cities / counties",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Which official open-data sources to extract permits from. Leave empty (or include <code>all</code>) to query every supported source.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "new-york-city",
                                "chicago",
                                "los-angeles",
                                "austin",
                                "san-francisco",
                                "new-orleans",
                                "baton-rouge",
                                "montgomery-county-md-residential",
                                "montgomery-county-md-commercial",
                                "norfolk-va"
                            ],
                            "enumTitles": [
                                "New York City, NY (DOB NOW approved permits)",
                                "Chicago, IL",
                                "Los Angeles, CA (issued 2020+)",
                                "Austin, TX",
                                "San Francisco, CA",
                                "New Orleans, LA",
                                "Baton Rouge / East Baton Rouge Parish, LA",
                                "Montgomery County, MD — residential",
                                "Montgomery County, MD — commercial",
                                "Norfolk, VA"
                            ]
                        },
                        "default": [
                            "austin"
                        ]
                    },
                    "issuedAfter": {
                        "title": "Issued after",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Optional. Only return permits issued on/after this date (format <code>YYYY-MM-DD</code>). Set this to last week and schedule the Actor weekly for a fresh construction-leads feed."
                    },
                    "issuedBefore": {
                        "title": "Issued before",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Optional. Only return permits issued on/before this date (format <code>YYYY-MM-DD</code>)."
                    },
                    "searchQuery": {
                        "title": "Full-text search",
                        "type": "string",
                        "description": "Optional. Full-text search across the source dataset (runs server-side on the open-data portal), e.g. <code>solar</code>, <code>pool</code>, <code>demolition</code>, <code>ADU</code>."
                    },
                    "permitTypeContains": {
                        "title": "Permit type contains",
                        "type": "string",
                        "description": "Optional. Case-insensitive substring match against the permit type / class / work type, e.g. <code>electrical</code>, <code>roof</code>, <code>plumbing</code>, <code>new construction</code>."
                    },
                    "minValuation": {
                        "title": "Minimum project valuation (USD)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Optional. Only return permits whose declared project value is at least this amount. Permits without a published valuation are excluded when this is set. Not every city publishes valuations for every permit."
                    },
                    "maxResultsPerCity": {
                        "title": "Max results per city",
                        "minimum": 1,
                        "maximum": 200000,
                        "type": "integer",
                        "description": "Maximum number of permit records to return per selected city. You are only charged for records actually returned.",
                        "default": 500
                    },
                    "includeRawData": {
                        "title": "Include raw source fields",
                        "type": "boolean",
                        "description": "Attach the untouched source-API row as a <code>raw</code> field on every record (each city publishes extra fields beyond the normalized schema).",
                        "default": false
                    },
                    "socrataAppToken": {
                        "title": "Socrata app token (optional)",
                        "type": "string",
                        "description": "Optional. Your own Socrata application token for higher open-data API rate limits. Not required for normal use."
                    }
                }
            },
            "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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
