# US Building Permit Leads - Chicago & San Francisco (`technicaldost/us-building-permit-leads`) Actor

Build trade-specific construction prospect lists from official Chicago and San Francisco permit records. Filter by project value and issue date; export permit addresses and publicly listed contractors.

- **URL**: https://apify.com/technicaldost/us-building-permit-leads.md
- **Developed by:** [Technical Dost Solutions](https://apify.com/technicaldost) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 result delivereds

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

## US Building Permit Leads - Chicago & San Francisco

Build trade-specific construction prospect lists from official Chicago and San Francisco permit records. Filter by project value and issue date; export permit addresses and publicly listed contractors.

### Quick start

1. Use the example input below and click Start.
2. Open Results to preview rows or download JSON, CSV, Excel or XML.
3. Read SUMMARY for page coverage, errors, limits and delivered count.

```json
{
  "cities": [
    "chicago"
  ],
  "maxResults": 5
}
```

### Output

Each result includes a stable `id`, a `title`, a `sourceUrl`, `fetchedAt` in UTC and `changeType`. Typed fields and a table view are defined in `.actor/dataset_schema.json`. The output schema links both result rows and SUMMARY. No invented data or error rows are sold as results. See `sample-output.json` in the source for real source samples.

### Recurring workflows

Set `onlyNew: true` and a unique `stateKey`, then schedule in Apify Console. The first run returns matching rows. Later runs omit unchanged records and return new or changed rows. Every invocation has its own dataset; export or integrate it through Apify API, Make or n8n. No third-party messages are sent by this Actor.

State is stored in a named key-value store on your account. Use the same filters and namespace for the same workflow, and avoid overlapping runs. Results are deduplicated within a run. State retains up to 50,000 IDs; evicted records may reappear. Source windows and maxResults can hide older records; widen the date window and page/result budgets for backfills. This is bounded polling, not a complete change-data-capture log; removed records are not emitted.

### Limits and error reporting

`maxResults`: 1-10,000 delivered rows (default 100). `maxPages`: 1-100 source pages total (default 20). Selective filters may require more pages. SUMMARY reports pageBudgetReached, maxResultsReached, partial source errors, unchanged and duplicate counts. No matches is a valid empty result. If every attempted source fails, the run fails. Some sources can succeed while others fail; always inspect SUMMARY before treating an export as complete. 429 and transient server errors get bounded retries; there are no paid proxies or external paid APIs.

### Pricing

Launch price: **$0.006 per delivered result** ($6.00/1,000), charged through Apify's default dataset-item event. Unchanged records, filtered records, retries and empty searches produce no billable dataset rows. Apify may display its automatic Actor-start fee separately; check the live Pricing tab and run cost limit before starting. There are no add-on enrichment fees. Prices on the live Pricing tab take precedence.

### Source and limitations

Chicago and San Francisco only. No phone/email enrichment. A permit is a project signal, not verified buying intent. The San Francisco dataset may lag; inspect issuedAt and source records. since filters issue date. Reported costs may be absent or estimates.

Source documentation: <https://data.cityofchicago.org/Buildings/Building-Permits/ydr8-5enu>. This Actor is independent and is not affiliated with the source provider. Source data availability and licensing remain subject to the provider's terms. Public data alone does not guarantee a right to contact someone; use any published business contact details responsibly.

### Support

Report a reproducible issue in this Actor's Issues tab with your run ID and a redacted input. Never post API tokens or private data.

# Actor input Schema

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

Supported official city datasets.

## `minValue` (type: `number`):

Exclude missing values when set.

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

Maximum delivered rows across all sources.

## `maxPages` (type: `integer`):

Request budget. SUMMARY reports when reached. Increase for selective filters.

## `since` (type: `string`):

Source date cutoff; see README for date meaning.

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

Requires a unique stateKey. First run emits matching rows.

## `stateKey` (type: `string`):

A stable, unique namespace for your scheduled workflow.

## Actor input object example

```json
{
  "cities": [
    "chicago"
  ],
  "maxResults": 100,
  "maxPages": 20,
  "onlyNew": false
}
```

# Actor output Schema

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

No description

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

No description

# 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("technicaldost/us-building-permit-leads").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("technicaldost/us-building-permit-leads").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 '{}' |
apify call technicaldost/us-building-permit-leads --silent --output-dataset

```

## MCP server setup

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

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/HjNLBREBhQm3MZo4o/builds/tbokgN93w85JOsh9V/openapi.json
