# Building Permit Contractor Leads: Active Contractors (`latamdatatools/building-permit-contractor-leads`) Actor

Turn official building-permit open data into contractor lead lists: one row per contractor company with permits pulled, total and largest job value, trades, cities and recent jobs. 13 US and Canada city presets or any Socrata permit dataset, plus an only-new-contractors mode for weekly alerts.

- **URL**: https://apify.com/latamdatatools/building-permit-contractor-leads.md
- **Developed by:** [Julian Genuario](https://apify.com/latamdatatools) (community)
- **Categories:** Lead generation, Real estate, Business
- **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 contractors

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 Permit Contractor Leads: Active Contractors

Find the **contractors that are actually working in a city right now**. This Actor reads issued building permits from official open-data portals and rolls them up into **one lead row per contractor company**: how many permits they pulled, total and largest job value, trades, cities, ZIP codes and their most recent jobs.

Use it to build B2B lead lists of roofers, electricians, HVAC, plumbing, solar and general contractors, ranked by real activity instead of directory listings.

### What does Building Permit Contractor Leads do?

It reads permits issued in the date range you choose (default: last 30 days) from 13 built-in city portals in the US and Canada, or **from any Socrata permit dataset you point it to**, keeps the permits that name a contractor company, groups name variants ("ABC Roofing, L.L.C." = "ABC ROOFING LLC") and returns a ranked contractor list. You can also get the permit rows themselves, with the contractor on each row.

Turn on **Only new contractors** and schedule it weekly: each run returns only companies that never appeared before under that alert, which is how you spot contractors that just started working in your area.

### Who uses it

- **Building material suppliers, distributors and equipment rental**: which contractors are pulling the most permits in your territory this month.
- **Contractor software, insurance, financing and staffing companies**: active contractors by trade, with job volume as a qualifier.
- **Solar, roofing and HVAC manufacturers**: installer networks and competitor activity by city and ZIP code.
- **Market analysts**: contractor market share by trade and city.

### Cities included (presets)

| Preset | Jurisdiction | Portal |
|---|---|---|
| `austin` | Austin, TX (includes the contractor's trade) | data.austintexas.gov |
| `chicago` | Chicago, IL | data.cityofchicago.org |
| `new-york-city` | New York City, NY (DOB NOW: Build) | data.cityofnewyork.us |
| `seattle` | Seattle, WA | data.seattle.gov |
| `cincinnati` | Cincinnati, OH | data.cincinnati-oh.gov |
| `cambridge` | Cambridge, MA | data.cambridgema.gov |
| `marin-county` | Marin County, CA | data.marincounty.gov |
| `baton-rouge` | East Baton Rouge Parish, LA | data.brla.gov |
| `new-orleans` | New Orleans, LA | data.nola.gov |
| `mesa` | Mesa, AZ | citydata.mesaaz.gov |
| `buffalo` | Buffalo, NY | data.buffalony.gov |
| `orlando` | Orlando, FL | data.cityoforlando.net |
| `calgary` | Calgary, AB, Canada (values in CAD) | data.calgary.ca |

#### Any other city: custom Socrata datasets

Hundreds of US and Canadian cities publish permits on Socrata. Paste the portal domain and the dataset id (the `abcd-1234` part of the dataset URL) and the Actor reads the dataset's official column list and detects the issue date, contractor, value, address and permit number columns by itself. You can override any column.

```json
"customDatasets": [
  { "domain": "data.cincinnati-oh.gov", "datasetId": "uhjb-xac9", "city": "Cincinnati", "state": "OH" },
  { "domain": "data.example.gov", "datasetId": "abcd-1234", "city": "Example", "contractorField": "contractor_name", "dateField": "issued_date" }
]
```

The dataset needs a date column (Socrata type "date") and a contractor company column. The detected columns are printed in the run log.

### How to use it

1. Click **Try for free** (a free Apify account is enough).
2. Pick cities and a date range, optionally a minimum job value, work tags (roofing, solar, HVAC...) or keywords.
3. Click **Start**. A 30-day run of 3 cities takes about a minute.
4. Download the list from the **Output** tab as CSV, Excel or JSON, or read it with the API.
5. Optional: add a **Schedule** with **Only new contractors** on, and an integration (Google Sheets, HubSpot via Make/Zapier, Slack, webhook).

### Input

| Field | What it does |
|---|---|
| **Cities (presets)** | Any of the 13 presets above. |
| **Custom Socrata datasets** | Any other Socrata permit dataset (see above). |
| **Days back** / **Issued from / to** | Issue-date window, up to 366 days per run. |
| **Minimum job value per permit** | Only count permits with at least this declared value. |
| **Property type**, **Work tags**, **Keywords** | Residential / commercial; new construction, roofing, solar, electrical, plumbing, HVAC, pool, ADU, EV charger and more; free-text words. |
| **Output** | One row per contractor (default), one row per permit, or both. |
| **Minimum permits / total value per contractor** | Keep only active or larger contractors. |
| **Only new contractors** + **Alert name** | Return only contractors never delivered before under that alert. |
| **Max contractors**, **Max permit rows**, **Max pages per city** | Limits. |

#### Example: roofing and solar contractors in Austin and Chicago, last 90 days, at least 3 permits

```json
{
  "sources": ["austin", "chicago"],
  "daysBack": 90,
  "workTags": ["roofing", "solar"],
  "minPermitsPerContractor": 3
}
```

### Output

One row per contractor company (most active first):

```json
{
  "recordType": "contractor",
  "contractorCompany": "SUNRUN INSTALLATION SERVICES",
  "contractorKey": "SUNRUN INSTALLATION SERVICES",
  "nameVariants": [
    "SUNRUN INSTALLATION SERVICES",
    "SUNRUN INSTALLATION SERVICES INC"
  ],
  "permitCount": 110,
  "permitsWithValue": 110,
  "totalJobValue": 1440855,
  "averageJobValue": 13099,
  "largestJobValue": 46765,
  "currency": "USD",
  "totalsByCurrency": {
    "USD": 1440855
  },
  "firstPermitDate": "2026-10-13",
  "lastPermitDate": "2026-11-10",
  "jurisdictions": [
    "Chicago, IL"
  ],
  "topWorkTags": [
    {
      "tag": "electrical",
      "count": 110
    },
    {
      "tag": "solar",
      "count": 67
    }
  ],
  "trades": [],
  "topPermitTypes": [
    {
      "type": "PERMIT – EXPRESS PERMIT PROGRAM",
      "count": 110
    }
  ],
  "residentialPermits": 0,
  "commercialPermits": 0,
  "topZips": [],
  "largestJob": {
    "permitId": "B200516537",
    "issuedDate": "2026-10-21",
    "city": "Chicago",
    "permitType": "PERMIT – EXPRESS PERMIT PROGRAM",
    "workTags": [
      "solar",
      "electrical"
    ],
    "jobValue": 46765,
    "currency": "USD",
    "address": "5743 S FRANCISCO AVE",
    "zip": null,
    "recordUrl": null
  },
  "recentPermits": [
    {
      "permitId": "B200509673",
      "issuedDate": "2026-11-10",
      "city": "Chicago",
      "permitType": "PERMIT – EXPRESS PERMIT PROGRAM",
      "workTags": [
        "solar",
        "electrical"
      ],
      "jobValue": 16115,
      "currency": "USD",
      "address": "8220 S HOMAN AVE",
      "zip": null,
      "recordUrl": null
    },
    {
      "permitId": "B200519508",
      "issuedDate": "2026-11-10",
      "city": "Chicago",
      "permitType": "PERMIT – EXPRESS PERMIT PROGRAM",
      "workTags": [
        "electrical"
      ],
      "jobValue": 5000,
      "currency": "USD",
      "address": "11715 S WESTERN AVE",
      "zip": null,
      "recordUrl": null
    }
  ],
  "dateFrom": "2026-10-13",
  "dateTo": "2026-11-12"
}
```

With **Output = permits** (or both) you also get one row per permit with `contractorCompany`, `contractorTrade` (Austin), `permitType`, `workTags`, `jobValue`, `address`, `zip`, `issuedDate` and a link to the official record when the city has one. A `RUN_SUMMARY` record lists permits read per city, permits without a contractor and any source error.

### Pricing

Pay per event:

- **USD 3 per 1,000 contractor rows** (USD 0.003 per contractor).
- **USD 2 per 1,000 permit rows** (only when you ask for permit rows).
- A negligible start fee per run (USD 0.00005).

Permits are read for free: a 30-day pull of 9,000 permits that rolls up into 1,000 contractors costs USD 3. Permits without a contractor, filtered permits, duplicates and contractors already delivered in "only new" mode are not charged. The Actor stops at your "max charge per run".

### Privacy

Only **company** names are returned. A contractor value that looks like a person's name is dropped, and "Company LLC - John Smith" becomes "Company LLC". Owner, applicant and contact-person columns are never read, and phone numbers or emails inside descriptions are replaced with `[phone removed]` / `[email removed]`. There are no phone numbers or emails in the output: enrich the company names with your own tools if you need them.

### Good to know

- Job values are the **declared** value on the application. Many trade permits (electrical, plumbing, mechanical) carry no value, so `totalJobValue` can be empty for pure trade contractors.
- Name grouping removes punctuation and legal suffixes (LLC, Inc, Corp, Co, Ltd). Two different companies with the same base name in different cities are merged; check `jurisdictions` and `nameVariants`.
- Every city decides what it publishes and how often (most update daily, new permits usually appear 1-5 days after issue).
- Data comes from official public open-data APIs (Socrata SODA), read at about one request per second per portal.

### FAQ

**How is this different from a building permits scraper?** Permit scrapers give you thousands of permit rows. This Actor gives you the contractor list behind them, ranked by activity, with totals per company. Permit rows are still available if you want them.

**Can I add a city that is not in the list?** Yes, if it publishes permits on Socrata with a contractor column: use **Custom Socrata datasets**. Search "building permits" on the city's open-data portal and copy the domain and dataset id.

**Can I run it automatically?** Yes: create a Schedule (weekly is typical) with **Only new contractors** on and connect Google Sheets, a CRM through Make or Zapier, Slack or a webhook.

**Can I call it from code or an AI agent?** Yes, with the Apify API, the JavaScript / Python clients, or as an MCP tool through `mcp.apify.com`.

**Which export formats are available?** JSON, JSONL, CSV, Excel, XML and HTML, from the Output tab or the API.

### Changelog

- 0.1 (2026-11): first version. 13 presets (12 US + Calgary), custom Socrata datasets with column detection, contractor roll-up, only-new-contractors alerts.

# Actor input Schema

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

Official open-data portals with a contractor company column. Leave empty if you only use custom datasets.

## `customDatasets` (type: `array`):

Any Socrata permit dataset with a contractor column. Required: domain and datasetId (the abcd-1234 id in the dataset URL). Columns are detected automatically from the dataset metadata; override with dateField, contractorField, valueField, addressField, permitIdField, typeField, descriptionField, tradeField. Optional: city, state, country, currency. Example: \[{"domain": "data.cincinnati-oh.gov", "datasetId": "uhjb-xac9", "city": "Cincinnati", "state": "OH"}]

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

Permits issued in the last N days (ignored if Issued from is set). 30-90 days gives the best contractor profiles.

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

YYYY-MM-DD. Overrides Days back.

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

YYYY-MM-DD. Default: today.

## `minJobValue` (type: `integer`):

Only count permits with a declared job value of at least this amount (USD; CAD for Calgary).

## `includeWithoutValue` (type: `boolean`):

When a minimum value is set, also keep permits whose portal publishes no value.

## `propertyClass` (type: `string`):

Residential or commercial permits only (detected from the permit class/use).

## `workTags` (type: `array`):

Only permits tagged with at least one of these (detected from type and description). Example: roofing + solar for a roofing supplier.

## `keywords` (type: `array`):

Only permits whose type, description or contractor name contains one of these words.

## `outputMode` (type: `string`):

Output

## `minPermitsPerContractor` (type: `integer`):

Skip contractors with fewer permits in the period (2-3 = active companies only).

## `minTotalJobValue` (type: `integer`):

Skip contractors whose permits add up to less than this.

## `onlyNewContractors` (type: `boolean`):

Remember every contractor delivered under the alert name and return only companies never seen before. Schedule it weekly to catch contractors that just started pulling permits in your area. The first run returns everyone.

## `alertName` (type: `string`):

Separate memory for each saved search when Only new contractors is on.

## `maxContractors` (type: `integer`):

Upper limit of contractor rows returned (the most active contractors come first).

## `maxPermits` (type: `integer`):

Only used when the output includes permit rows.

## `maxPagesPerSource` (type: `integer`):

Safety limit per city: each page is 1,000 permits.

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

Free token from any Socrata portal; only needed for very large pulls.

## Actor input object example

```json
{
  "sources": [
    "austin",
    "seattle",
    "chicago"
  ],
  "customDatasets": [],
  "daysBack": 30,
  "includeWithoutValue": true,
  "propertyClass": "any",
  "workTags": [],
  "keywords": [],
  "outputMode": "contractors",
  "minPermitsPerContractor": 1,
  "onlyNewContractors": false,
  "alertName": "default",
  "maxContractors": 1000,
  "maxPermits": 5000,
  "maxPagesPerSource": 30
}
```

# Actor output Schema

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

No description

## `runSummary` (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 = {
    "sources": [
        "austin",
        "seattle",
        "chicago"
    ],
    "customDatasets": [],
    "daysBack": 30,
    "outputMode": "contractors"
};

// Run the Actor and wait for it to finish
const run = await client.actor("latamdatatools/building-permit-contractor-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 = {
    "sources": [
        "austin",
        "seattle",
        "chicago",
    ],
    "customDatasets": [],
    "daysBack": 30,
    "outputMode": "contractors",
}

# Run the Actor and wait for it to finish
run = client.actor("latamdatatools/building-permit-contractor-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 '{
  "sources": [
    "austin",
    "seattle",
    "chicago"
  ],
  "customDatasets": [],
  "daysBack": 30,
  "outputMode": "contractors"
}' |
apify call latamdatatools/building-permit-contractor-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,latamdatatools/building-permit-contractor-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/kMwHXcBNltMO1tI7f/builds/uc7IWxyoYDcu7oMif/openapi.json
