# US Building Permits Scraper — Multi-City Construction Leads (`vivar_bolivar/us-building-permits-aggregator`) Actor

Fresh building permits from official open-data APIs of NYC, Chicago, LA, SF, Seattle & Austin, normalized into one analysis-ready schema. Built for construction lead gen: contractors, valuations, addresses, geocodes.

- **URL**: https://apify.com/vivar\_bolivar/us-building-permits-aggregator.md
- **Developed by:** [Vivar Bolivar](https://apify.com/vivar_bolivar) (community)
- **Categories:** Real estate, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

$2.50 / 1,000 permit scrapeds

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/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 — Multi-City Construction Leads

Get **freshly issued building permits from 6 major US cities in one run, in one clean schema**. Solar installers, roofers, HVAC companies, suppliers, and lead-gen teams use new permits to reach property owners and follow contractor activity the week work is approved — weeks before traditional permit-lead brokers deliver their lists. This Actor pulls directly from each city's **official open-data portal** (no fragile HTML scraping), normalizes every record into the same analysis-ready JSON, and returns permits issued as recently as **yesterday** for most cities.

### Cities covered (v1)

| City | Source (official open data) | Typical freshness | Contractor info | Geocodes |
|---|---|---|---|---|
| New York City | DOB NOW: Build — Approved Permits | 1–3 days | ✅ name + license | ✅ |
| Chicago | Chicago Data Portal — Building Permits | 1–2 days | ✅ name | ✅ |
| San Francisco | DataSF — Building Permits | 1–2 days | — (not published) | ✅ |
| Austin | Austin Open Data — Issued Construction Permits | 1–2 days | ✅ name (most) | partial |
| Seattle | Seattle Open Data — Building Permits | 1–2 days | partial | ✅ |
| Los Angeles | LADBS — Permits Issued 2020–Present | **~2–4 week lag** (city-side) | — (not published) | ✅ |

More cities are added on request — open an issue with the city you need.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `cities` | array | all 6 | Any of `nyc`, `chicago`, `la`, `sf`, `seattle`, `austin` |
| `issuedSince` | string | last 7 days | `YYYY-MM-DD`; only permits issued on/after this date |
| `maxRecordsPerCity` | integer | 500 | Hard cap per city, 1–5000 |
| `permitClass` | string | `all` | `residential` / `commercial`; unclassified permits are always included |

> **Tip for LA:** because the city publishes with a lag, use `issuedSince` ≥ 30 days back or you may get zero LA records (the other five cities are day-fresh).

### Output

One JSON object per permit, identical schema across all cities:

```json
{
  "permit_id": "B200473293",
  "city": "Chicago",
  "state": "IL",
  "permit_type": "PERMIT - EXPRESS PERMIT PROGRAM",
  "permit_class": "unknown",
  "work_description": "TUCKPOINTING AND UNIT MASONRY REPAIR / REPLACEMENT: 800 SQ. FT.",
  "status": "ACTIVE",
  "filed_date": "2026-06-04",
  "issued_date": "2026-06-08",
  "address": "4700 W MONTROSE AVE",
  "zip_code": "60641",
  "latitude": 41.961,
  "longitude": -87.741,
  "valuation": 12000.0,
  "contractor_name": "ACME MASONRY LLC",
  "contractor_license": null,
  "owner_name": "LLC 4510 CLARK",
  "source_dataset": "https://data.cityofchicago.org/resource/ydr8-5enu",
  "source_record_url": null,
  "fetched_at": "2026-06-09T18:00:00+00:00"
}
````

Fields a city doesn't publish are `null` (see the coverage table above) — your pipeline gets a stable schema either way.

### Cost of a typical run

Pulling permits from official JSON APIs is fast and cheap: a full 6-city run capped at 500 permits/city (~3,000 records) completes in well under a minute on the smallest memory setting. You pay per permit scraped — see the pricing tab. A typical weekly all-cities pull costs a few dollars; there are **no proxy surcharges** because government open-data portals don't block.

### Known limitations

- **LA lags** ~2–4 weeks behind real issuance (the city's publishing cadence, not ours).
- `permit_class` is `unknown` where a city doesn't classify permits (NYC, Chicago); the `permitClass` filter never drops unclassified records.
- SF and LA do not publish contractor names in their permit datasets.
- Valuation is missing on permit types some cities don't cost (e.g., many trade permits).
- Data quality is the city's: occasional missing geocodes (Austin ~50%) or typos pass through as-is; we normalize structure, not truth.

### Changelog

- **0.1** (2026-06-09) — initial release: NYC, Chicago, LA, SF, Seattle, Austin; unified schema; residential/commercial filter; per-city caps with graceful partial-failure handling.

# Actor input Schema

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

Which cities to pull permits from. Default: all six.

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

Only permits issued on/after this date. Default: last 7 days. Older dates return more records — mind your per-city cap.

## `maxRecordsPerCity` (type: `integer`):

Hard cap per city per run (1–5000). Default 500.

## `permitClass` (type: `string`):

Filter to residential or commercial permits where the city provides a classification. Permits the city does not classify are always included.

## Actor input object example

```json
{
  "cities": [
    "nyc",
    "chicago",
    "la",
    "sf",
    "seattle",
    "austin"
  ],
  "maxRecordsPerCity": 500,
  "permitClass": "all"
}
```

# Actor output Schema

## `permits` (type: `string`):

All scraped permits in the unified schema (one JSON object per permit)

# API

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

## JavaScript example

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

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

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("vivar_bolivar/us-building-permits-aggregator").call(input);

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

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

```

## Python example

```python
from apify_client import ApifyClient

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

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("vivar_bolivar/us-building-permits-aggregator").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 '{}' |
apify call vivar_bolivar/us-building-permits-aggregator --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "US Building Permits Scraper — Multi-City Construction Leads",
        "description": "Fresh building permits from official open-data APIs of NYC, Chicago, LA, SF, Seattle & Austin, normalized into one analysis-ready schema. Built for construction lead gen: contractors, valuations, addresses, geocodes.",
        "version": "0.1",
        "x-build-id": "Ig3W41KuIePcRSk2p"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/vivar_bolivar~us-building-permits-aggregator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-vivar_bolivar-us-building-permits-aggregator",
                "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/vivar_bolivar~us-building-permits-aggregator/runs": {
            "post": {
                "operationId": "runs-sync-vivar_bolivar-us-building-permits-aggregator",
                "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/vivar_bolivar~us-building-permits-aggregator/run-sync": {
            "post": {
                "operationId": "run-sync-vivar_bolivar-us-building-permits-aggregator",
                "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",
                        "type": "array",
                        "description": "Which cities to pull permits from. Default: all six.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "nyc",
                                "chicago",
                                "la",
                                "sf",
                                "seattle",
                                "austin"
                            ],
                            "enumTitles": [
                                "New York City",
                                "Chicago",
                                "Los Angeles",
                                "San Francisco",
                                "Seattle",
                                "Austin"
                            ]
                        },
                        "default": [
                            "nyc",
                            "chicago",
                            "la",
                            "sf",
                            "seattle",
                            "austin"
                        ]
                    },
                    "issuedSince": {
                        "title": "Issued since (YYYY-MM-DD)",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Only permits issued on/after this date. Default: last 7 days. Older dates return more records — mind your per-city cap."
                    },
                    "maxRecordsPerCity": {
                        "title": "Max records per city",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Hard cap per city per run (1–5000). Default 500.",
                        "default": 500
                    },
                    "permitClass": {
                        "title": "Permit class filter",
                        "enum": [
                            "all",
                            "residential",
                            "commercial"
                        ],
                        "type": "string",
                        "description": "Filter to residential or commercial permits where the city provides a classification. Permits the city does not classify are always included.",
                        "default": "all"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
