# Building Permits Scraper - Contractor Leads & Phone | $3/1k (`rickyz1x/building-permits-scraper`) Actor

New building permits daily from 6 US cities & counties with contractor phone, license and job specs: solar kW, battery kWh, roof squares, HVAC tons.

- **URL**: https://apify.com/rickyz1x/building-permits-scraper.md
- **Developed by:** [ZHANG RUIQI](https://apify.com/rickyz1x) (community)
- **Categories:** Lead generation, Real estate, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 permit records

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

## Building Permits Scraper - Contractor Leads & Phone

Get newly issued building permits from 6 official US open-data portals (Austin, San Diego County, New York City, Seattle, Los Angeles, Chicago) as contractor leads, with the contractor's phone and license wherever the portal or a license registry publishes them and job specs (solar kW, battery kWh, roof squares, HVAC tons) parsed from the permit description.

### Sample output

| Issued | Jurisdiction | Job specs | Contractor | Phone (masked) |
|---|---|---|---|---|
| 2026-11-05 | Austin | 3.8 kW solar | Vikta Energy | +1 (313) \*\*\*-\*\*80 |
| 2026-11-05 | San Diego County (unincorporated) | solar | PURE ELECTRIC SAN DIEGO | +1 (760) \*\*\*-\*\*12 |
| 2026-11-05 | Austin | battery_storage | Base Power | +1 (512) \*\*\*-\*\*03 |
| 2026-11-05 | San Diego County (unincorporated) | solar, battery_storage | SUNRUN | +1 (415) \*\*\*-\*\*57 |

*Real rows: demo mode (`useFixtures: true`): official portal data recorded 2026-11-06. Phones are masked in this README only; the dataset has the full values. The Output section below documents every field.*

### Pricing (pay per event)

| Event | Charged when | Price per event | Per 1,000 |
|---|---|---:|---:|
| `permit-record` (primary) | every permit delivered | $0.003 | $3 |
| `contact-enriched-record` | in addition, when the permit carries a contractor phone (if your max charge cannot cover it, the phone is withheld, never given away) | $0.012 | $12 |
| `apify-actor-start` | once per run (Apify platform start event) | $0.00005 | - |

**All-in: permit with contractor phone = $0.015 ($15/1k)** (`permit-record` + `contact-enriched-record`).

| Example run | Events charged at most | Cost at most |
|---|---|---:|
| Console prefill or API default `{}` (at most 10 permits) | 10 x `permit-record`, 10 x `contact-enriched-record` | $0.15 |
| Scheduled pull with `maxTotalRecords: 100`, every permit with a phone | 100 x `permit-record`, 100 x `contact-enriched-record` | $1.50 |

Never charged: permits filtered out by your categories, confidence or onlyNew settings; invalid input; the recorded sample served when every live portal is down.

Set **Max cost per run** (`maxTotalChargeUsd` in the API) to cap any run. The Actor checks the budget before every charge and stops cleanly when it is reached; add-on data that no longer fits is withheld, never given away. If the budget is below the price of a single record, the run delivers one free sample row and says so in its status message.

### Try it: copy-paste input

This is the Console prefill (the same input the Example run table prices):

```json
{
  "sources": [
    "austin_tx",
    "san_diego_ca"
  ],
  "categories": [
    "solar",
    "battery_storage"
  ],
  "daysBack": 7,
  "maxRecordsPerSource": 5,
  "maxTotalRecords": 10
}
```

### Use it from the API, MCP or n8n

Run it and get the dataset in one call (the `maxTotalChargeUsd` query parameter caps what this run can cost):

```bash
curl -X POST "https://api.apify.com/v2/acts/rickyz1x~building-permits-scraper/run-sync-get-dataset-items?maxTotalChargeUsd=0.50" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"sources":["austin_tx","san_diego_ca"],"categories":["solar","battery_storage"],"daysBack":7,"maxRecordsPerSource":5,"maxTotalRecords":10}'
```

- **AI agents (MCP):** add `https://mcp.apify.com/?actors=rickyz1x/building-permits-scraper` to Claude, Cursor or any MCP client.
- **n8n, Make, Clay:** importable templates with record limits and a max-cost cap are in the [workflow templates repository](https://github.com/Ricky-X1Z/us-permit-contractor-workflows).

### How it works

The Actor queries each selected jurisdiction's official Socrata open-data permit feed for permits issued in your `daysBack` window, normalizes every row into one schema, extracts job specs from the free-text description, and joins contractor phones and licenses from the license tables each jurisdiction publishes (CSLB for San Diego County, NYC DOB licenses, WA L\&I for Seattle). With `onlyNew` it remembers what it delivered, so a daily schedule returns only new or changed permits.

### What you get

One clean, consistent record per building permit from official city/county open-data portals:

- **The job:** permit number, type, status, issue date, valuation and the full work description.
- **Extracted specs:**
  - categories: `solar`, `battery_storage`, `roofing`, `hvac`, `ev_charger`, `adu`, `pool`
  - solar **kW** and panel count, battery **kWh** and units, roof **squares**, HVAC **tons** and SEER, EV charger count
  - a confidence score
- **The contractor:** company, trade, **phone (E.164)**, license number and state, and business address.
  - **WA:** license status plus the insurance policy and bond, via WA L\&I.
- **The property:** job-site address, ZIP and coordinates.
- **Delta flags:** `is_new` / `change` (`new`, `updated`, `unchanged`) and `first_seen_at`, so scheduled runs only deliver what's new.

### Coverage (measured, not promised)

Measured live on 2026-11-07 over permits issued 2026-10-08 … 2026-11-07 (volume = exact count; fill rates = the 300 most recent permits per source run through the full pipeline).

| Source | Permits (30 d) | Contractor name | Phone | License # | ≥1 job category | Phone comes from |
|---|---:|---:|---:|---:|---:|---|
| Austin, TX | 4,975 | 87% | 87% | 0% | 26% | permit feed |
| San Diego County (unincorporated), CA | 913 | 80% | 80% | 80% | 57% | permit feed + CSLB sidecar |
| New York City, NY | 15,026 | 100% | 92% | 100% | 5% | BIS feed + license join |
| Seattle, WA | 526 | 4% | 0% | 0% | 7% | WA L\&I name match |
| Los Angeles, CA | 4,756 | 0% | 0% | 0% | 33% | n/a (CSLB join in V1.1) |
| Chicago, IL | 2,683 | 97% | 0% | 0% | 12% | n/a (name only) |

Volume-weighted contractor-phone fill across all sources: **65%**. Spec extractor precision on the golden set: **100.0%** (208 labeled real descriptions).

WA L\&I (Actor #2): 76,335 active contractors (100% with phone); next 30 days: 3,790 insurance policies expire, 157 bonds cancel, 1,175 active licenses expire.

Phones come from the permit filing itself, not from skip-tracing:

- **Austin:** the permit feed.
- **San Diego County:** the permit feed plus the CSLB contractor table.
- **NYC:** the DOB BIS feed, plus a license-number join for DOB NOW permits.
- **Seattle:** a WA L\&I company-name match. Seattle publishes contractor names on only a small share of permits.

Los Angeles and Chicago are permit- and contractor-name sources in V1. LA phones via the CSLB bulk join are planned for V1.1.

### How the spec extraction works

The extractor is deterministic and keyword-anchored, with no LLM guessing:

- A category needs a context keyword. "22 kW generator" is never tagged as solar, and "pool fence", "car pool", "remove solar panels", "heat pump water heater" and "EVSE-ready parking" are excluded.
- Numbers only attach to the nearest matching category: `13.5 kWh` → battery, `8.6 kW DC` → solar.
- Sanity bounds apply: solar 1-2000 kW, battery 1-2000 kWh, roof 1-500 squares, HVAC 0.5-100 tons.
- `extraction_confidence` is `1.0` when the number sits next to the keyword, `0.7` when it's elsewhere in the description, and `0.5` when the category was found but no number was. Filter with **Minimum confidence**.

Quality gate: at least 95% precision on a golden set of 208 hand-labeled real permit descriptions (see the coverage section).

### Input

| Field | Default | Notes |
|---|---|---|
| `sources` | `austin_tx`, `san_diego_ca` | Any of `austin_tx`, `san_diego_ca`, `nyc_dob`, `seattle_wa`, `los_angeles_ca`, `chicago_il` |
| `categories` | *(all permits)* | Prefilled with `solar`, `battery_storage` |
| `daysBack` | 7 | Issue-date window (1-90) |
| `onlyNew` | false | Daily delta: skip permits already delivered with the same filters |
| `requirePhone` | false | Only permits with a contractor phone |
| `enrichLicenses` | true | CSLB / NYC license / WA L\&I joins |
| `minConfidencePercent` | 0 | 70 = only permits with an extracted number |
| `maxRecordsPerSource` / `maxTotalRecords` | 500 / 10 (Console prefill: 5 / 10) | Cost caps: at most `maxTotalRecords` permits are delivered and charged. The default of 10 keeps a first run, also an API call with `{}`, at $0.15 or less; raise it for production pulls |

Example: daily solar + battery leads with phones:

```json
{
  "sources": ["austin_tx", "san_diego_ca", "nyc_dob"],
  "categories": ["solar", "battery_storage"],
  "daysBack": 2,
  "onlyNew": true,
  "requirePhone": true
}
```

### Output example (synthetic values)

```json
{
  "schema_version": "1.0",
  "record_id": "5f1c0e3b9a8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b",
  "source": {"source_id": "austin_tx", "jurisdiction": "Austin", "state": "TX", "dataset_id": "3syk-w9eu",
             "source_url": "https://abc.austintexas.gov/web/permit/public-search-other?t_detail=1&t_selected_folderrsn=0000000",
             "source_updated_at": "2026-11-06T13:56:15Z", "fetched_at": "2026-11-07T07:00:03Z"},
  "permit": {"permit_number": "2026-123456 EP", "permit_type": "EP", "permit_type_desc": "Electrical Permit",
             "work_class": "Addition", "description": "Install 8.4 kW DC roof mounted solar PV with (1) Tesla Powerwall 3",
             "status": "Active", "applied_date": "2026-10-28", "issued_date": "2026-11-05", "valuation_usd": 24000},
  "property": {"address": "123 EXAMPLE ST", "city": "Austin", "state": "TX", "zip": "78701", "lat": 30.26, "lon": -97.74},
  "contractor": {"company_name": "Example Solar LLC", "person_name": null, "trade": "Electrical Contractor",
                 "phone_e164": "+15125550100", "phone_raw": "5125550100", "license_number": null, "license_state": null,
                 "license_type": null, "license_status": null,
                 "address": {"line1": "1 EXAMPLE WAY", "city": "Austin", "state": null, "zip": "78702"},
                 "insurance": {"policy_no": null, "cancel_date": null},
                 "bond": {"amount_usd": null, "expiration_date": null, "impaired": null}},
  "specs": {"categories": ["solar", "battery_storage"], "solar_kw": 8.4, "solar_panel_count": null, "battery_kwh": null,
            "battery_units": 1, "roof_squares": null, "hvac_tons": null, "hvac_seer": null, "ev_charger": false,
            "ev_charger_count": null, "adu": false, "pool": false, "extraction_confidence": 1.0,
            "category_confidence": {"solar": 1.0, "battery_storage": 1.0}},
  "enrichment": {"phone_source": "permit_feed", "license_match_method": null, "match_confidence": null},
  "delta": {"first_seen_at": "2026-11-07T07:00:03Z", "is_new": true, "change": "new"}
}
```

The formal JSON Schema lives in `permit_intel_core/schema/v1.json`. The dataset has two table views, **Leads** and **Contractor contacts**.

### Free templates

- **n8n:** "Daily solar & battery permits → Google Sheets + Slack" (`templates/n8n/solar-battery-permit-leads.json`)
- **Make:** "Contractors whose insurance/bond expires in 30 days → HubSpot/Pipedrive" (uses the Radar actor)
- **Clay / MCP:** permit history and license enrichment per contractor (uses the Permit History API actor)

The templates and source registry are in the public GitHub repo `us-permit-contractor-workflows`. Apify's free plan monthly credit is enough to try every template.

### Compliance notice

**B2B use only.**

- Records come from official government open-data portals.
- **No homeowner or owner names are collected or output.** Owner-builder filings have their contractor block removed.
- Contractor phone numbers are business contact details, but many belong to sole proprietors and may be mobile numbers.
- **You, the buyer, are solely responsible** for complying with the TCPA, the National Do-Not-Call Registry, state telemarketing and mini-TCPA laws, and CAN-SPAM before contacting anyone.
- Do not use this data for SMS blasts or autodialed calls without prior express consent.
- This is not legal advice.

### Frequently Asked Questions (FAQ)

**Why are some phone numbers missing?** The city doesn't publish them (LA, Chicago), or the permit has no contractor yet. Each source's measured fill rate is in the coverage table.

**Can you add my city?** Open an issue on the Actor page. Only jurisdictions that publish permits on an open-data API can be added; no timeline is promised.

**What happens when my max cost is reached?** The run stops cleanly. If a permit fits the budget but its contractor-phone add-on does not, the permit is delivered without the phone (`addon_withheld: true`), so you never get a phone you did not pay for. Undelivered permits are offered again by the next `onlyNew` run.

### Limitations and coverage

- Six jurisdictions only: Austin TX, San Diego County CA (unincorporated), New York City, Seattle WA, Los Angeles CA and Chicago IL. The measured phone fill rate per source is in the coverage table above; Los Angeles and Chicago carry no contractor phone in this version.
- Sources refresh daily. Los Angeles refreshes weekly, so LA permits can lag about 7 days.
- San Diego County's open-data host is flagged *at risk*. The Actor uses the public mirror with automatic fallback.
- The delta logic does not trust `:updated_at` for publishers that re-stamp every row daily (Austin, Seattle, NYC BIS, LA). It uses the issue-date window plus a per-record content hash instead.
- One portal being down never fails the run (see `RUN_SUMMARY` in the run's key-value store). If every requested portal is down, the run returns up to 10 recorded real permits for free, labeled `data_source_mode: "fixture_fallback"` with their recording date, instead of failing.
- Spec extraction is rule-based: a permit whose description does not name the work (for example "electrical permit") gets no category.

### Companion B2B & Lead Generation Actors by RickyZ1X

| Actor | Best for | Apify Store link |
| :--- | :--- | :--- |
| **Building Permits Scraper - Contractor Leads & Phone** | New permits with contractor phone and parsed job specs (6 US portals) (this Actor) | [rickyz1x/building-permits-scraper](https://apify.com/rickyz1x/building-permits-scraper) |
| **Contractor License Scraper - Insurance & Bond Expiry** | WA contractors with expiring insurance, bonds or licenses | [rickyz1x/contractor-license-scraper](https://apify.com/rickyz1x/contractor-license-scraper) |
| **Building Permit History Scraper - Address Lookup** | Permit history by contractor, phone or address (HTTP API + MCP) | [rickyz1x/permit-history-scraper](https://apify.com/rickyz1x/permit-history-scraper) |
| **Career Site Jobs Scraper - Greenhouse, Lever, Ashby** | Open jobs and hiring signals from 6 ATS platforms | [rickyz1x/career-site-jobs-scraper](https://apify.com/rickyz1x/career-site-jobs-scraper) |
| **Google Ads Transparency Scraper - Ad Library & Leads** | Which domains run Google Ads, with advertiser and creatives | [rickyz1x/google-ads-scraper](https://apify.com/rickyz1x/google-ads-scraper) |
| **Keyword Search Volume & CPC Scraper - Google & Bing** | Modeled search volume, CPC, difficulty and intent from autocomplete | [rickyz1x/keyword-volume-scraper](https://apify.com/rickyz1x/keyword-volume-scraper) |
| **Product Hunt & YC Scraper - Startup & Founder Leads** | New Product Hunt, YC and Show HN startups with founders and contacts | [rickyz1x/product-hunt-scraper](https://apify.com/rickyz1x/product-hunt-scraper) |
| **Tech Stack & Pixel Scraper - BuiltWith Alternative** | Technologies, ad pixels, GTM IDs and Shopify data for any website | [rickyz1x/tech-stack-scraper](https://apify.com/rickyz1x/tech-stack-scraper) |
| **Luma, Eventbrite & Meetup Scraper - Organizer Leads** | Upcoming events with organizer, host and sponsor leads | [rickyz1x/luma-events-scraper](https://apify.com/rickyz1x/luma-events-scraper) |

# Actor input Schema

## `sources` (type: `array`):

Official open-data permit feeds to pull. Phone coverage differs by source (see README coverage table): Austin, San Diego County and NYC carry contractor phones; Seattle via WA L\&I match; LA and Chicago are name/permit-only in V1.

## `categories` (type: `array`):

Only return permits whose description matches these categories (deterministic extractor, >=95% precision on a labeled golden set). Leave empty to return ALL permits.

## `daysBack` (type: `integer`):

Permits issued within the last N days.

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

Skip permits already delivered by a previous run with the same categories/filters. Ideal for scheduled daily runs.

## `requirePhone` (type: `boolean`):

Drop permits without a valid E.164 contractor phone.

## `enrichLicenses` (type: `boolean`):

Join CSLB (San Diego), NYC DOB license phones and WA L\&I license/insurance/bond (Seattle).

## `minConfidencePercent` (type: `integer`):

0 = keep everything. 70 = only permits where a number (kW, kWh, squares, tons) was found in the description. 100 = number right next to the category keyword.

## `maxRecordsPerSource` (type: `integer`):

Maximum number of permits to fetch from each selected jurisdiction (newest first).

## `maxTotalRecords` (type: `integer`):

Hard cap on delivered (and charged) permits per run. The default of 10 keeps a first run at $0.15 or less; raise it for production pulls. Each permit costs $0.003, plus $0.012 when it carries a contractor phone.

## `useFixtures` (type: `boolean`):

For testing integrations: returns a recorded, privacy-scrubbed sample instead of live data.

## Actor input object example

```json
{
  "sources": [
    "austin_tx",
    "san_diego_ca"
  ],
  "categories": [
    "solar",
    "battery_storage"
  ],
  "daysBack": 7,
  "onlyNew": false,
  "requirePhone": false,
  "enrichLicenses": true,
  "minConfidencePercent": 0,
  "maxRecordsPerSource": 5,
  "maxTotalRecords": 10,
  "useFixtures": false
}
```

# Actor output Schema

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

All output records stored in the default dataset.

## `leads` (type: `string`):

One row per permit: job, specs and contractor contact.

## `contractors` (type: `string`):

One row per permit with the contractor contact block.

# 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 = {
    "sources": [
        "austin_tx",
        "san_diego_ca"
    ],
    "categories": [
        "solar",
        "battery_storage"
    ],
    "daysBack": 7,
    "maxRecordsPerSource": 5,
    "maxTotalRecords": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("rickyz1x/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 = {
    "sources": [
        "austin_tx",
        "san_diego_ca",
    ],
    "categories": [
        "solar",
        "battery_storage",
    ],
    "daysBack": 7,
    "maxRecordsPerSource": 5,
    "maxTotalRecords": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("rickyz1x/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 '{
  "sources": [
    "austin_tx",
    "san_diego_ca"
  ],
  "categories": [
    "solar",
    "battery_storage"
  ],
  "daysBack": 7,
  "maxRecordsPerSource": 5,
  "maxTotalRecords": 10
}' |
apify call rickyz1x/building-permits-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rickyz1x/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/mIgSg6MZ6wJJ37ABo/builds/hf2id4ZjdqhrujeDH/openapi.json
