# Illinois Roofing Contractor Directory & Leads Scraper (IDFPR) (`fried_calamaries/illinois-contractor-directory-leads-scraper`) Actor

Export every IDFPR-licensed roofing contractor in any Illinois county — name, license #, type, status, expiration, city & ZIP — from the official state open-data registry.

- **URL**: https://apify.com/fried\_calamaries/illinois-contractor-directory-leads-scraper.md
- **Developed by:** [ByteMe](https://apify.com/fried_calamaries) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.002 / roofing contractor 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/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

## Illinois Roofing Contractor Directory & Leads Scraper (IDFPR)

### Pain points

- Illinois publishes its roofing contractor license data through a Socrata open-data portal with no built-in export — there is no 'Download CSV' button for a county-filtered slice.
- Searching the IDFPR online license lookup returns one page at a time with no bulk option, making it impractical to build a full county roster.
- Roofing sales teams, suppliers, and compliance teams have no easy way to get a clean list of all active (and expired) IDFPR roofing licenses in a target county.

### What we solve

- Queries the official IDFPR Socrata dataset directly and pages through all roofing contractor records for any Illinois county in one run.
- Returns every IDFPR roofing contractor in the county: business name, license number, license type, status, expiration date, city, and ZIP.
- Discovery Mode lists all valid Illinois counties with roofing contractor records in seconds so you always know the exact county name to use.

### Summary

Export every IDFPR-licensed roofing contractor in any Illinois county straight from the official state open-data registry. Pick a county (e.g. COOK, DUPAGE, KANE), run the actor, and get a clean dataset of every roofing licensee — business name, license number, description, status, expiration date, city, and ZIP. Discovery Mode lists all counties with records in seconds. Note: Illinois has no statewide general-contractor license; roofing is the only contractor trade licensed at the state level (IDFPR). Street address and phone are not published in the IDFPR dataset.

### Who it's for

- Roofing material suppliers and distributors building county-level prospect lists
- Sales reps targeting roofing contractors for tools, coatings, or insurance products
- General contractors and property managers finding certified roofing subs in a county
- Compliance and risk teams monitoring IDFPR roofing license status at scale
- Market researchers auditing active vs expired roofing licenses by county

### How to use

Set the input, run the actor, and collect results from the run's dataset (export to JSON/CSV/Excel, or pull via the Apify API). Example input:

```json
{
  "county": "COOK",
  "maxResults": 500
}
````

See **Inputs** below for every available field.

### What you get

One row per record:

| Field | Description |
|---|---|
| `state` | Always 'IL' |
| `license_number` | IDFPR license number (e.g. 104012345). May be null for historical/deceased records. |
| `business_name` | Licensed business or individual licensee name |
| `license_type` | IDFPR license description (e.g. LICENSED ROOFING CONTRACTOR or QUALIFYING PARTY ROOFING CONTRACTOR) |
| `status` | License status (ACTIVE, NOT RENEWED, CANCELLED, DECEASED) |
| `issue_date` | Original issue date (MM/DD/YYYY) |
| `expiration_date` | License expiration date (MM/DD/YYYY) |
| `city` | Licensee city |
| `county` | Illinois county from the scrape filter |
| `zip_code` | ZIP code |
| `person_name` | Full person name for individual (non-business) licensees; null for businesses |
| `address` | Street address — not available in the IDFPR dataset; always null |
| `phone` | Phone number — not available in the IDFPR dataset; always null |
| `matched_by` | Always 'county\_directory' in Scrape Mode |
| `source_url` | Link to the IDFPR dataset page on data.illinois.gov |

Sample:

```json
{
  "state": "IL",
  "license_number": "104012345",
  "business_name": "CHICAGO SKYLINE ROOFING INC",
  "license_type": "LICENSED ROOFING CONTRACTOR",
  "status": "ACTIVE",
  "issue_date": "03/15/2010",
  "expiration_date": "06/30/2025",
  "city": "CHICAGO",
  "county": "COOK",
  "address": null,
  "zip_code": "60601",
  "phone": null,
  "person_name": null,
  "bond_amount": null,
  "bond_company": null,
  "insurance_company": null,
  "matched_by": "county_directory",
  "source_url": "https://data.illinois.gov/d/pzzh-kp68"
}
```

### Inputs

| Field | Required | Type | Default | Description |
|---|---|---|---|---|
| `listCountiesOnly` | no | boolean | `false` | When true, the actor returns all available Illinois counties that have IDFPR roofing contractor records and exits immediately (< 10 seconds, no charge). Use this to discover the exact county name before running a full scrape. |
| `county` | no | string | `"COOK"` | The Illinois county to scrape — full name in uppercase (e.g. 'COOK', 'DUPAGE', 'KANE'). Required in Scrape Mode. Run with listCountiesOnly=true to see all available county names. |
| `maxResults` | no | integer | `500` | Hard cap on the number of roofing contractor records returned. Cook County alone has thousands of records; set lower for testing. Default 500. |

### Pricing (Pay Per Event)

You pay per result (`dataset-item`) — **no charge for empty runs**. Example: **500 roofing contractor records** at *$0.002/result* ≈ **$1.00**.

Illustrative — the final per-result price is set at publish time. Apify platform usage (compute) is billed separately per your plan. Discovery Mode (listCountiesOnly=true) returns county names only and is not charged.

### Use cases

- Lead list building — export all IDFPR roofing contractors in Cook or DuPage County into a CRM or outreach sequence.
- Supplier prospecting — find every licensed roofing contractor in a target county before a territory sales push.
- Compliance monitoring — pull the full county roster monthly and flag any status changes (ACTIVE → NOT RENEWED).
- Market sizing — count active licenses by county to gauge roofing contractor density before opening a new branch.
- Subcontractor vetting — verify a roofing sub is IDFPR-licensed and in good standing before awarding a contract.

### Why this actor

- Data sourced directly from the official IDFPR Socrata open-data registry — authoritative, not a stale third-party copy.
- Discovery Mode lists all Illinois counties with roofing contractor records in seconds so you never have to guess the county name.
- Handles full county rosters of thousands of records via automatic pagination — no manual page-clicking.
- Pay per record; no charge for Discovery Mode runs or empty results.
- Covers all IDFPR roofing license types: LICENSED ROOFING CONTRACTOR and QUALIFYING PARTY ROOFING CONTRACTOR.

### Limitations & updates

Covers IDFPR roofing contractor licenses only (license\_type='ROOFING CONTRACTOR'). Illinois has no statewide general-contractor, electrical, or plumbing license — those are municipal. Street address and phone fields are null (not published by IDFPR). Approximately 15% of historical records have blank or out-of-state county values; these are filtered out in Discovery Mode and excluded when scraping by county. The IDFPR dataset includes both active and all historical/expired/cancelled licenses.

### FAQ

**Where does the data come from?**

The Illinois Department of Financial and Professional Regulation (IDFPR) publishes its license data on data.illinois.gov (Socrata dataset pzzh-kp68). This actor queries that public dataset directly.

**Why does this only cover roofing contractors?**

Illinois has no statewide general-contractor license. Roofing contractor is the only contractor-trade license issued at the state level by IDFPR. Electrical, plumbing, HVAC, and general construction are licensed at the municipal level, not by IDFPR.

**How do I find the right county name?**

Run the actor once with listCountiesOnly=true. It returns all available Illinois county names in seconds at no charge.

**How many records can I get per run?**

Cook County alone has thousands of roofing contractor records spanning active, expired, and historical licenses. The actor paginates automatically; set maxResults to control the cap.

**Why are address and phone null?**

The IDFPR dataset does not publish street address or phone number fields — only city, state, ZIP, and county. The actor sets these fields to null for schema consistency with the rest of the contractor suite.

**How am I charged?**

Pay per record in Scrape Mode. Discovery Mode (listCountiesOnly=true) is not charged.

**How current is the data?**

The IDFPR dataset is updated regularly by the state. The actor queries the live dataset at scrape time.

### Which actor to choose

Part of the contractor data suite — pick the one that fits your goal:

- **Florida Contractor Directory & Leads Scraper (DBPR)** — You want the same county-scoped contractor directory for Florida (DBPR) — general, building, and specialty contractors.
- **California Contractor License Lookup & Verify (CSLB)** — You need a California contractor verified — by license number, business, or owner/personnel name (CSLB).
- **Texas Contractor Directory & Leads Scraper (TDLR)** — You want the same county-scoped directory for Texas contractors (TDLR).
- **Multi-State Contractor & Trade License Lookup** — You need contractor data across multiple states in one run.

# Actor input Schema

## `listCountiesOnly` (type: `boolean`):

When true, the actor returns all available Illinois counties that have IDFPR roofing contractor records and exits immediately (< 10 seconds, no charge). Use this to discover the exact county name before running a full scrape.

## `county` (type: `string`):

The Illinois county to scrape — full name in uppercase (e.g. 'COOK', 'DUPAGE', 'KANE'). Required in Scrape Mode. Run with listCountiesOnly=true to see all available county names.

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

Hard cap on the number of roofing contractor records returned. Cook County alone has thousands of records; set lower for testing. Default 500.

## Actor input object example

```json
{
  "listCountiesOnly": false,
  "county": "COOK",
  "maxResults": 500
}
```

# Actor output Schema

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

One row per IDFPR-licensed roofing contractor in the selected county.

# 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 = {
    "county": "COOK"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fried_calamaries/illinois-contractor-directory-leads-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 = { "county": "COOK" }

# Run the Actor and wait for it to finish
run = client.actor("fried_calamaries/illinois-contractor-directory-leads-scraper").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 '{
  "county": "COOK"
}' |
apify call fried_calamaries/illinois-contractor-directory-leads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=fried_calamaries/illinois-contractor-directory-leads-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Illinois Roofing Contractor Directory & Leads Scraper (IDFPR)",
        "description": "Export every IDFPR-licensed roofing contractor in any Illinois county — name, license #, type, status, expiration, city & ZIP — from the official state open-data registry.",
        "version": "0.0",
        "x-build-id": "YPqPiQDPttfMkI7YH"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/fried_calamaries~illinois-contractor-directory-leads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-fried_calamaries-illinois-contractor-directory-leads-scraper",
                "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/fried_calamaries~illinois-contractor-directory-leads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-fried_calamaries-illinois-contractor-directory-leads-scraper",
                "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/fried_calamaries~illinois-contractor-directory-leads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-fried_calamaries-illinois-contractor-directory-leads-scraper",
                "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": {
                    "listCountiesOnly": {
                        "title": "List counties only (Discovery Mode)",
                        "type": "boolean",
                        "description": "When true, the actor returns all available Illinois counties that have IDFPR roofing contractor records and exits immediately (< 10 seconds, no charge). Use this to discover the exact county name before running a full scrape.",
                        "default": false
                    },
                    "county": {
                        "title": "County",
                        "type": "string",
                        "description": "The Illinois county to scrape — full name in uppercase (e.g. 'COOK', 'DUPAGE', 'KANE'). Required in Scrape Mode. Run with listCountiesOnly=true to see all available county names."
                    },
                    "maxResults": {
                        "title": "Maximum results",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Hard cap on the number of roofing contractor records returned. Cook County alone has thousands of records; set lower for testing. Default 500.",
                        "default": 500
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
