# Washington Contractor Directory & Leads Scraper (L\&I) (`fried_calamaries/washington-contractor-directory-leads-scraper`) Actor

Browse all Washington State L\&I contractor registrations filtered by county — business name, license type, status, contact info, and principal — from the official open-data registry.

- **URL**: https://apify.com/fried\_calamaries/washington-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 / contractor records (typical mid-sized county)

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

## Washington Contractor Directory & Leads Scraper (L&I)

### Pain points

- Finding all licensed contractors in a specific Washington county requires manual browsing — the L&I portal offers single-lookup search, not bulk county exports.
- Building a contractor prospect list for King, Pierce, or Spokane County means stitching together hundreds of individual lookups.
- No structured county-level export exists in the public portal — the raw open-data is flat, with no county field.

### What we solve

- Pull every WA L&I contractor registration in bulk and filter to any county in one run.
- Derives the county for each contractor client-side from their ZIP code using a static WA ZIP→county mapping.
- Returns structured records — business name, license number, type, status, address, phone, and principal — ready for CRM import or lead scoring.

### Summary

Extract the full Washington State L&I contractor registry — all 160,000+ registrations — filtered to any county, in a single structured dataset. The official Socrata open-data API has no county field; this actor derives county from each contractor's ZIP code and lets you slice by King, Pierce, Spokane, or any of Washington's 39 counties. Every record includes business name, license number and type, active/expired status, full address, phone, and primary principal. No CAPTCHA, no proxy, no browser — pay per record returned.

### Who it's for

- GCs and specialty subs building a county-level competitor map or vendor network
- Sales reps targeting licensed WA contractors in a territory with a new tool, material, or service
- Insurance and bonding agents prospecting for contractor accounts by county
- Market researchers studying WA construction market density by region
- Staffing firms recruiting tradespeople and project managers from active-license rosters

### 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": "King",
  "statusFilter": "ACTIVE",
  "maxResults": 500
}
````

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

### What you get

One row per record:

| Field | Description |
|---|---|
| `county` | WA county derived from the contractor's ZIP code (null for out-of-state addresses or unrecognised ZIPs) |
| `business_name` | Licensed business name |
| `license_number` | L\&I contractor registration number |
| `license_type` | License type description (e.g. CONSTRUCTION CONTRACTOR, ELECTRICAL CONTRACTOR) |
| `status` | License status (e.g. ACTIVE, EXPIRED, SUSPENDED) |
| `address` | Business street address line 1 |
| `address2` | Business street address line 2 (when present) |
| `city` | Business city |
| `state_code` | Business state (often WA; some licensees are based out of state) |
| `zip_code` | Business ZIP code |
| `phone` | Business phone number (when published) |
| `license_effective_date` | Date the license became effective |
| `license_expiration_date` | License expiration date |
| `business_type` | Legal entity type (e.g. Limited Liability Company, Corporation, Sole Proprietor) |
| `specialty` | Primary specialty code description (e.g. GENERAL, ELECTRICAL, PLUMBING) |
| `specialty_2` | Secondary specialty code description (when present) |
| `ubi` | WA Unified Business Identifier |
| `primary_principal` | Primary principal / owner name |
| `source_url` | Link to the official L\&I open-data dataset |

Sample:

```json
{
  "county": "King",
  "business_name": "SEATTLE ROOFING LLC",
  "license_number": "SEATTRL123AA",
  "license_type": "CONSTRUCTION CONTRACTOR",
  "status": "ACTIVE",
  "address": "1234 Pike St",
  "address2": null,
  "city": "SEATTLE",
  "state_code": "WA",
  "zip_code": "98101",
  "phone": "2065551234",
  "license_effective_date": "2020-01-15T00:00:00.000",
  "license_expiration_date": "2026-01-15T00:00:00.000",
  "business_type": "Limited Liability Company",
  "specialty": "GENERAL",
  "specialty_2": null,
  "ubi": "601234567",
  "primary_principal": "SMITH, JOHN A.",
  "source_url": "https://data.wa.gov/Business/Washington-Contractors/m8qx-ubtq"
}
```

### Inputs

| Field | Required | Type | Default | Description |
|---|---|---|---|---|
| `county` | no | string | — | Return only contractors in this WA county (e.g. 'King', 'Pierce', 'Spokane'). Leave blank to return all counties. Case-insensitive. |
| `statusFilter` | no | string | `"ACTIVE"` | Filter by license status. Use 'ACTIVE' (default) for current licenses only, or 'ALL' to include expired and suspended records. |
| `maxResults` | no | integer | — | Cap on the number of records to return. Leave blank (or 0) for no cap. |

### Pricing (Pay Per Event)

You pay per result (`dataset-item`) — **no charge for empty runs**. Example: **5000 contractor records (typical mid-sized county)** at *$0.002/result* ≈ **$10.00**.

Illustrative — the final per-result price is set at publish time. Apify platform usage (compute) is billed separately per your plan.

### Use cases

- Territory lead generation — pull every active GC or specialty sub in King County for a sales outreach campaign.
- Competitive landscape mapping — see which license types (electrical, plumbing, HVAC) are densest in a target county.
- Insurance prospecting — build a list of active contractors in Pierce or Snohomish County for renewal outreach.
- Market sizing — count active registrations per county to prioritise which WA markets to enter first.
- Vendor onboarding — verify and enrich a supplier list by matching against the full L\&I registry for a specific county.

### Why this actor

- The only structured county-level WA contractor directory — the raw open-data has no county field; this actor derives it from ZIP codes.
- Covers all 160,000+ L\&I registrations; filter to any of Washington's 39 counties in a single run.
- Official L\&I open-data source — authoritative, not a third-party copy.
- No CAPTCHA, no proxy, no browser — lowest possible cost per record.
- Status filter built in — run active-only (default) or include expired/suspended for a full historical roster.

### Limitations & updates

County assignment depends on a static ZIP→county mapping covering Washington's major ZIP codes. Out-of-state contractors and a small fraction of less common WA ZIP codes will have county=null. The data reflects the L\&I open-data snapshot (refreshed on business days), not real-time registry state. Bond, workers-comp, and insurance details are published in separate L\&I datasets and are not joined here. Full-dataset runs (no county filter) may take several minutes to complete the ~160+ API pages.

### FAQ

**Where does the data come from?**

The official Washington State Department of Labor & Industries (L\&I) contractor-registration open-data dataset, published on data.wa.gov (Socrata). Public, authoritative, refreshed on business days.

**How does the county filter work?**

The L\&I dataset has no county field. This actor derives county from each contractor's ZIP code using a static WA ZIP→county mapping covering all 39 counties. Contractors with out-of-state or unrecognised ZIP codes will have county=null and won't match a county filter.

**How many records does a typical county run return?**

It varies by county size. King County alone has tens of thousands of active registrations; rural counties may have a few hundred. Run without a county filter to get the full dataset (~160,000 rows).

**Can I get all counties at once?**

Yes — leave the county field blank. The actor pulls the full registry and returns all records (or up to your maxResults cap).

**What does statusFilter do?**

Set to 'ACTIVE' (default) to return only currently licensed contractors. Set to 'ALL' to include expired, suspended, and re-licensed records for a full historical roster.

**How am I charged?**

Pay per record returned. No charge for runs that return zero records.

**Is this personal data?**

It's public professional-license data (business and registration records as L\&I publishes them); no personal/PII enrichment is added.

**How current is the data?**

It reflects the L\&I open-data registry, which the state refreshes on business days. Expect up to 1–2 business days of lag for recent changes.

### Which actor to choose

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

- **Washington Contractor License Lookup & Verify (L\&I)** — You have a specific license number or business/principal name and want to verify a single contractor's status, type, and expiration.
- **California Contractor Directory & Leads Scraper (CSLB)** — You need the same county-level directory but for California contractors (CSLB).
- **Florida Contractor License Lookup & Verify (DBPR)** — You're verifying a Florida contractor — type, status, expiration, county (DBPR).
- **Oregon Contractor License Lookup & Verify (CCB)** — You're verifying an Oregon contractor — status, bond, insurance & RMI (CCB).

# Actor input Schema

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

Return only contractors in this WA county (e.g. 'King', 'Pierce', 'Spokane'). Leave blank to return all counties. Case-insensitive.

## `statusFilter` (type: `string`):

Filter by license status. Use 'ACTIVE' (default) for current licenses only, or 'ALL' to include expired and suspended records.

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

Hard cap on the number of contractor records returned. A statewide pull can be 75,000+ rows and will time out the default run — set higher deliberately. Default 500.

## Actor input object example

```json
{
  "statusFilter": "ACTIVE",
  "maxResults": 500
}
```

# Actor output Schema

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

One row per WA contractor registration; county is derived from the contractor's ZIP code.

# 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 = {
    "statusFilter": "ACTIVE"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fried_calamaries/washington-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 = { "statusFilter": "ACTIVE" }

# Run the Actor and wait for it to finish
run = client.actor("fried_calamaries/washington-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 '{
  "statusFilter": "ACTIVE"
}' |
apify call fried_calamaries/washington-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/washington-contractor-directory-leads-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Washington Contractor Directory & Leads Scraper (L&I)",
        "description": "Browse all Washington State L&I contractor registrations filtered by county — business name, license type, status, contact info, and principal — from the official open-data registry.",
        "version": "0.0",
        "x-build-id": "fwcXClMYdMLtWJMa9"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/fried_calamaries~washington-contractor-directory-leads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-fried_calamaries-washington-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~washington-contractor-directory-leads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-fried_calamaries-washington-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~washington-contractor-directory-leads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-fried_calamaries-washington-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": {
                    "county": {
                        "title": "County filter",
                        "type": "string",
                        "description": "Return only contractors in this WA county (e.g. 'King', 'Pierce', 'Spokane'). Leave blank to return all counties. Case-insensitive."
                    },
                    "statusFilter": {
                        "title": "License status filter",
                        "type": "string",
                        "description": "Filter by license status. Use 'ACTIVE' (default) for current licenses only, or 'ALL' to include expired and suspended records.",
                        "default": "ACTIVE"
                    },
                    "maxResults": {
                        "title": "Maximum results",
                        "minimum": 1,
                        "maximum": 200000,
                        "type": "integer",
                        "description": "Hard cap on the number of contractor records returned. A statewide pull can be 75,000+ rows and will time out the default run — set higher deliberately. 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
