# City Building Permits Scraper (`nanodata/city-building-permits-scraper`) Actor

Building permits from the public open-data portals of Chicago, New York City, Los Angeles, San Francisco and Austin, in one common format. Filter by date, permit type and cost.

- **URL**: https://apify.com/nanodata/city-building-permits-scraper.md
- **Developed by:** [nanodata](https://apify.com/nanodata) (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 $2.50 / 1,000 building 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/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

## City Building Permits Scraper

Get building permits from the public open-data portals of five large US cities, in one common format: Chicago, New York City, Los Angeles, San Francisco and Austin. Each city publishes its permits in its own layout. This actor reads them from the city portals and maps them into the same fields, so you can compare cities or load them into one table.

### What you can do with it

- Find new construction, renovation and demolition permits issued in a date range.
- Build lists of contractors and applicants active in a city, with license numbers where the city publishes them.
- Filter by permit type (for example "demolition" or "electrical") and by minimum project cost.
- Keep every original field of the city record in the `raw` object, so nothing the city publishes is lost.

All data comes from each city's public open-data portal. The actor reads the same records you can see on the portal and adds no data of its own.

### Supported cities

| Input value | City | Portal | Date used for filters |
|-------------|------|--------|-----------------------|
| `chicago` | Chicago | data.cityofchicago.org (Building Permits) | issue date |
| `nyc` | New York City | data.cityofnewyork.us (DOB NOW: Build, Approved Permits) | issue date |
| `la` | Los Angeles | data.lacity.org (Building Permits Issued from 2020 to Present) | issue date |
| `sf` | San Francisco | data.sf.gov (Building Permits) | issue date |
| `austin` | Austin | data.austintexas.gov (Issued Construction Permits) | issue date |

Results come newest first. An empty input (`{}`) runs a small demo: Chicago, 5 permits.

### Input

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `cities` | string\[] | One or more of `chicago`, `nyc`, `la`, `sf`, `austin`. A comma separated string also works. | `["chicago"]` |
| `dateFrom` | string | Only permits issued on or after this date, `YYYY-MM-DD`. | none |
| `dateTo` | string | Only permits issued on or before this date, `YYYY-MM-DD`. | none |
| `permitTypes` | string\[] | Keep permits whose type contains one of these words, ignoring case. Each city names its types differently. | all types |
| `minEstimatedCost` | number | Keep permits with an estimated or reported cost of at least this amount in USD. A numeric string also works. | none |
| `maxResults` | integer | Maximum permits for each selected city, 1 to 5000. A numeric string also works. | 100 (5 in the demo) |

Example:

```json
{
  "cities": ["chicago", "nyc"],
  "dateFrom": "2026-10-01",
  "permitTypes": ["demolition", "new construction"],
  "minEstimatedCost": 100000,
  "maxResults": 200
}
```

Notes on filters:

- Date and permit type filters are applied by the city portal.
- The cost filter is applied by the portal for Chicago, Los Angeles and San Francisco when the portal accepts it. For New York City and Austin, and whenever the portal does not accept it, the filter is applied after reading, and the actor looks at the 2000 newest permits that match your other filters. Permits without a cost are left out when a minimum cost is set.
- Austin publishes the total job valuation for only some permits. When it is missing, the actor adds up the building, electrical, mechanical, plumbing and medical gas valuations if they are published.

### Output

One row per permit. Fields that a city does not publish are `null`.

| Field | Description |
|-------|-------------|
| `city`, `cityName` | City code and name |
| `source` | Portal host and dataset id |
| `permitId` | Permit number as the city publishes it |
| `sourceRowId` | Row identifier inside the city dataset |
| `permitType`, `permitSubType`, `workType` | Type, sub type or class, and type of work, as published. Chicago has a `work_type` column, but it is blank for many permits, mostly newer ones, so `workType` and `workTypes` are often empty there. |
| `workDescription` | Work description text |
| `status` | Permit status |
| `issueDate`, `applicationDate`, `approvalDate`, `expirationDate` | Dates as `YYYY-MM-DD` |
| `address`, `zip` | Street address of the work and ZIP code |
| `latitude`, `longitude` | Coordinates as numbers |
| `estimatedCost`, `reportedCost` | Costs in USD as numbers. Chicago publishes a reported cost, San Francisco both an estimated and a revised cost, the other cities an estimated cost. |
| `currency` | Always `USD` |
| `contractorName`, `contractorLicense` | First contractor business listed and its license number when published |
| `applicantBusinessName`, `applicantLicense` | Applicant business and license when published |
| `ownerBusinessName` | Owner business name when published |
| `contractors` | All contractor businesses on the permit: `role`, `name`, `licenseNumber`, `phone`, `address`, `city`, `state`, `zip` |
| `permitUrl` | Link to the permit page. Only Austin publishes a link field in its dataset, so only Austin rows have it. It is `null` for Chicago, New York City, Los Angeles and San Francisco, whose datasets have no per-permit link. |
| `scrapedAt` | ISO 8601 UTC time of collection |
| `raw` | All original fields of the city record |

Sample row (New York City, `raw` shortened):

```json
{
  "city": "nyc",
  "cityName": "New York City",
  "source": "data.cityofnewyork.us dataset rbx6-tga4",
  "permitId": "B00293526-I1-FN",
  "permitType": "Construction Fence",
  "permitSubType": "Renewal Permit Without Changes",
  "workDescription": "Temporary Construction Fence",
  "status": "Permit Issued",
  "issueDate": "2026-11-04",
  "approvalDate": "2021-08-18",
  "expirationDate": "2026-12-31",
  "address": "2134 OCEAN PARKWAY, Brooklyn",
  "zip": "11223",
  "latitude": 40.597029,
  "longitude": -73.965334,
  "estimatedCost": 5000,
  "currency": "USD",
  "contractorName": "MNC GENERAL CONTR CORP",
  "contractorLicense": "028630",
  "contractors": [
    {
      "role": "GC",
      "name": "MNC GENERAL CONTR CORP",
      "licenseNumber": "028630",
      "address": "1711 GRAVESEND NECK RD, 3RD FL"
    }
  ],
  "scrapedAt": "2026-11-06T09:59:35Z",
  "raw": { "work_type": "Construction Fence", "bin": "3181927" }
}
```

### Run outcomes

| Situation | Exit code | Status message |
|-----------|-----------|----------------|
| Permits found | 0 | Delivered N permits. |
| No permit matches the filters | 0 | No permits found for these filters. Nothing was charged. |
| Max total charge reached | 0 | Stopped at the max charge limit. N permits delivered. |
| Every request refused, no rows | 1 | Describes the refusal; retry later. |
| Input that cannot be read | 1 | Invalid input, with a hint. |

### Pricing

Pay per event:

| Event | When it is charged | Price |
|-------|--------------------|-------|
| `actor-start` | Once per run, after the first permit row has been delivered. A run that delivers nothing is not charged. | $0.001 |
| `permit-result` | Per permit row delivered. | $0.0025 ($2.50 per 1,000) |

If you set a maximum total charge for the run, rows stop when the next row would exceed it, and the run ends with the status "Stopped at the max charge limit. N permits delivered."

### FAQ

**Where does the data come from?**
From each city's public open-data portal. The portal name and dataset id are in the `source` field of every row.

**How fresh is it?**
As fresh as the city makes it. Most portals update daily. A permit appears after the city publishes it.

**Why do some fields stay empty?**
The cities publish different columns. For example, Chicago has no ZIP code for the work site, Los Angeles and San Francisco list no contractors in these datasets, and Austin has coordinates for only part of its permits. Empty fields are `null`.

**Are names of individuals included?**
Contractor and applicant businesses are included as published. Names of owners, individual applicants and other individual contacts are left out of the `raw` object. Chicago contact names are kept only for contractor roles.

**How many rows can I get?**
Up to 5000 per city and run. For bigger exports, split the run by date range.

**Why is my result smaller than maxResults?**
The filters matched fewer permits than you asked for, or the city dataset has fewer rows in that range.

**Can I resume an interrupted run?**
Yes. Progress is saved after each batch. A run that is moved to another machine continues where it stopped and does not deliver or charge rows twice.

**Is this legal advice or an official record?**
No. Check the city portal for the official permit record before relying on a row.

# Actor input Schema

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

Cities to read. Supported: chicago, nyc, la, sf, austin. Defaults to Chicago.

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

Only permits issued on or after this date (YYYY-MM-DD).

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

Only permits issued on or before this date (YYYY-MM-DD).

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

Keep permits whose type contains one of these words, ignoring case (for example 'demolition', 'new construction', 'electrical'). Each city names its types differently. Leave empty for all types.

## `minEstimatedCost` (type: `number`):

Keep permits with an estimated or reported cost of at least this amount. Permits without a cost are dropped when this is set.

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

Maximum permits returned for each selected city. Newest permits come first.

## `proxyConfiguration` (type: `object`):

Connection settings. The default works for most runs.

## Actor input object example

```json
{
  "cities": [
    "chicago"
  ],
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

Building permits from the city open-data portals

# 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": [
        "chicago"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("nanodata/city-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": ["chicago"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("nanodata/city-building-permits-scraper").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": [
    "chicago"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call nanodata/city-building-permits-scraper --silent --output-dataset

```

## MCP server setup

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

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/egQBfhI3KIvVluxfz/builds/mG8TJJJxCmiA7E8o0/openapi.json
