# Contractor License Scraper - Insurance & Bond Expiry | $4/1k (`rickyz1x/contractor-license-scraper`) Actor

Contractors whose liability insurance, surety bond or license expires within N days, with phone, insurer & policy details. Official Washington L\&I data.

- **URL**: https://apify.com/rickyz1x/contractor-license-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 $4.00 / 1,000 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/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

## Contractor License Scraper - Insurance & Bond Expiry

Find Washington contractors whose general liability insurance expires, surety bond cancels or license expires within your window, with the contractor's phone, insurer, policy number and bond details from official Washington L\&I open data.

### Sample output

| Contractor | City | Alert | Insurer | Phone (masked) |
|---|---|---|---|---|
| 7 BRIDGES CONSTRUCTION LLC | Mount Vernon | license_expiring in 0 d | Contractors Bonding & Insuranc | +1 (360) \*\*\*-\*\*83 |
| EXPERT TREE TRANSPLANTINGS LLC | Snohomish | bond_cancelling in 0 d | Ohio Security Ins Co | +1 (253) \*\*\*-\*\*54 |
| AA ENHANCED STRUCTURES LLC | Kennewick | insurance_expiring in 1 d | State National Ins Co Inc | +1 (509) \*\*\*-\*\*26 |
| AJ DIAZ RENOVATION LLC | Normandy Park | license_expiring in 0 d | Spinnaker Insurance Company | +1 (206) \*\*\*-\*\*16 |

*Real rows: demo mode (`useFixtures: true`): official WA L\&I 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 |
|---|---|---:|---:|
| `contractor-record` (primary) | every contractor delivered | $0.004 | $4 |
| `expiring-alert-record` | in addition, when the contractor has an insurance, bond or license alert in your window (if your max charge cannot cover it, the alert details are withheld) | $0.018 | $18 |
| `apify-actor-start` | once per run (Apify platform start event) | $0.00005 | - |

**All-in: contractor with an expiration alert (every row in the default alert mode) = $0.022 ($22/1k)** (`contractor-record` + `expiring-alert-record`).

| Example run | Events charged at most | Cost at most |
|---|---|---:|
| Console prefill or API default `{}` (at most 10 contractors) | 10 x `contractor-record`, 10 x `expiring-alert-record` | $0.22 |
| Scheduled run with `maxRecords: 100`, every contractor with an alert | 100 x `contractor-record`, 100 x `expiring-alert-record` | $2.20 |

Never charged: contractors without an alert are not returned unless you enable includeNonExpiring; invalid input (e.g. an unsupported state); the recorded sample served when the WA L\&I 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
{
  "state": "WA",
  "expiringWithinDays": 30,
  "alertTypes": [
    "insurance",
    "bond",
    "license"
  ],
  "maxRecords": 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~contractor-license-scraper/run-sync-get-dataset-items?maxTotalChargeUsd=0.50" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"state":"WA","expiringWithinDays":30,"alertTypes":["insurance","bond","license"],"maxRecords":10}'
```

- **AI agents (MCP):** add `https://mcp.apify.com/?actors=rickyz1x/contractor-license-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 radar reads three official Washington Department of Labor & Industries open-data tables (General license, Insurance, Bond), finds the contractors whose governing policy, bond or license expires inside your window, and returns each with its phone, insurer, policy number, bond and license details. Only Washington publishes contractor insurance and bond data as open data, so Washington is the only state covered.

### Who it's for

- **Insurance agents and brokers:** general-liability renewals coming up in your territory.
- **Surety and bonding agents:** contractor bonds that are about to cancel.
- **Equipment lenders and suppliers:** contractors at risk of lapsing, or newly renewed and active.
- **B2B SaaS sales:** active, licensed contractors by city or specialty.

### How alerts work

1. Seeds come from the WA L\&I tables:
   - insurance policies expiring in your window (`ciwg-agsx.expirationdate`),
   - bonds with a cancellation date in your window (`bzff-4fmt.bondcanceldate`),
   - active licenses expiring in your window (`m8qx-ubtq.licenseexpirationdate`).
2. The radar pulls each contractor's full history from all three tables by `contractorlicensenumber` (exact join).
3. It keeps the **governing** row: the latest-expiring insurance policy, and the most recently effective bond.
4. An alert fires only if that governing row falls in your window. A contractor who already filed a renewal is **not** alerted.
5. The selection is balanced across the alert types you asked for (round-robin, soonest first), so a run is never all insurance alerts while bond and license alerts exist. Rows are then sorted by `days_until`.
6. Name, city and specialty filters are resolved to matching license numbers first and pushed into every seed query, so a filtered run scans only the matching contractors.

Alert types: `insurance_expiring`, `bond_cancelling`, `license_expiring`. Each carries `date` and `days_until`.

### Input

| Field | Default | Notes |
|---|---|---|
| `state` | `WA` | Washington only |
| `expiringWithinDays` | 30 | 1-365 |
| `alertTypes` | insurance, bond, license | Any subset |
| `onlyActive` | true | Skip expired or suspended licenses |
| `businessNameContains` / `city` / `specialtyContains` | none | e.g. `ROOFING`, `SEATTLE`, `ELECTRICAL` |
| `licenseNumbers` | none | Monitor your own book of business |
| `includeNonExpiring` | false | Also return matching contractors without an alert |
| `maxRecords` | 10 | Cost cap: at most this many contractors are delivered and charged. The default of 10 keeps a first run, also an API call with `{}`, at $0.22 or less; raise it for production runs |

Example: weekly insurance and bond renewals for roofers in Spokane:

```json
{"state": "WA", "expiringWithinDays": 30, "alertTypes": ["insurance", "bond"], "businessNameContains": "ROOF", "city": "SPOKANE"}
```

### Output example (synthetic values)

```json
{
  "schema_version": "1.0", "record_type": "contractor", "record_id": "0f9e8d7c6b5a49382716051f2e3d4c5b6a798877",
  "source": {"source_id": "wa_lni", "state": "WA", "dataset_ids": ["m8qx-ubtq", "ciwg-agsx", "bzff-4fmt"],
             "source_url": "https://data.wa.gov/resource/m8qx-ubtq.json?contractorlicensenumber=EXAMPRL800XX",
             "fetched_at": "2026-11-07T06:00:00Z"},
  "contractor": {"company_name": "EXAMPLE ROOFING LLC", "license_number": "EXAMPRL800XX", "license_state": "WA",
                 "license_type": "CONSTRUCTION CONTRACTOR", "license_status": "ACTIVE",
                 "license_effective_date": "2025-05-02", "license_expiration_date": "2027-05-02", "license_suspend_date": null,
                 "ubi": "600000000", "business_type": "Limited Liability Company", "specialties": ["ROOFING"],
                 "phone_e164": "+12065550100",
                 "address": {"line1": "100 EXAMPLE AVE", "city": "Seattle", "state": "WA", "zip": "98101"}},
  "insurance": {"company": "Example Mutual Insurance Co", "policy_no": "GL-0000000", "amount_usd": 1000000.0,
                "effective_date": "2025-11-21", "expiration_date": "2026-11-21", "agency_name": "Example Brokers LLC",
                "days_to_expiration": 14},
  "bond": {"surety": "Example Surety Co", "bond_account_id": "100000000", "amount_usd": 30000.0,
           "effective_date": "2025-05-02", "cancel_date": null, "days_to_cancel": null},
  "alerts": [{"type": "insurance_expiring", "date": "2026-11-21", "days_until": 14}],
  "is_expiring_alert": true
}
```

The JSON Schema is in `permit_intel_core/schema/contractor_v1.json`.

### Free template

The Make scenario "Contractors whose insurance or bond expires in 30 days → HubSpot/Pipedrive task" is in `templates/make/insurance-expiry-to-crm.blueprint.json`.

### Compliance notice

**B2B use only.**

- The data is official WA Department of Labor & Industries open data.
- **No homeowner data, and no personal principal names, are output.**
- **You, the buyer, are solely responsible** for complying with the TCPA, the National Do-Not-Call Registry, state telemarketing laws and CAN-SPAM.
- Insurance details are as filed with L\&I, so verify coverage with the carrier before relying on it.
- This is not legal advice.

### Limitations and coverage

- **Washington only.** Washington L\&I publishes contractor licenses, insurance and bonds as open data; no other state is covered.
- Coverage measured on 2026-11-07: 76,335 active WA contractors (100% with a phone on file); in the following 30 days 3,790 insurance policies expired, 157 bonds cancelled and 1,175 active licenses expired.
- Insurance details are as filed with L\&I. Verify coverage with the carrier before relying on it.
- If your max cost cannot cover the alert add-on for a contractor, the contractor is delivered without its alert details (`alerts: []`, `addon_withheld: true`).
- If the WA L\&I portal is unreachable, the run returns up to 10 recorded real contractors for free, labeled `data_source_mode: "fixture_fallback"` with their recording date, instead of failing.

### 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) | [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 (this Actor) | [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

## `state` (type: `string`):

Licensing state. Washington (WA L\&I license, insurance and bond tables) is the only state covered today.

## `expiringWithinDays` (type: `integer`):

Alert window starting today.

## `alertTypes` (type: `array`):

insurance = general liability policy expiration; bond = surety bond cancellation date; license = contractor registration expiration.

## `onlyActive` (type: `boolean`):

Only check contractors whose current license status is ACTIVE.

## `businessNameContains` (type: `string`):

Optional filter, e.g. ROOFING or SOLAR.

## `city` (type: `string`):

Optional exact city of the contractor's business address, e.g. SEATTLE.

## `specialtyContains` (type: `string`):

Optional filter on the L\&I specialty, e.g. ELECTRICAL, ROOFING, HVAC, PLUMBING, GENERAL.

## `licenseNumbers` (type: `array`):

Monitor a book of business: only these WA contractor license numbers (e.g. your clients).

## `includeNonExpiring` (type: `boolean`):

Return every matching contractor (charged as contractor-record); alerts are still computed.

## `maxRecords` (type: `integer`):

Hard cap on delivered (and charged) contractor records per run. The default of 10 keeps a first run at $0.22 or less; raise it for production runs. Each record costs $0.004, plus $0.018 when it carries an expiration alert ($0.022 all-in).

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

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

## Actor input object example

```json
{
  "state": "WA",
  "expiringWithinDays": 30,
  "alertTypes": [
    "insurance",
    "bond",
    "license"
  ],
  "onlyActive": true,
  "includeNonExpiring": false,
  "maxRecords": 10,
  "useFixtures": false
}
```

# Actor output Schema

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

All output records stored in the default dataset.

## `alerts` (type: `string`):

One row per contractor with its expiration alerts, insurance and bond.

# 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 = {
    "state": "WA",
    "expiringWithinDays": 30,
    "alertTypes": [
        "insurance",
        "bond",
        "license"
    ],
    "maxRecords": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("rickyz1x/contractor-license-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 = {
    "state": "WA",
    "expiringWithinDays": 30,
    "alertTypes": [
        "insurance",
        "bond",
        "license",
    ],
    "maxRecords": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("rickyz1x/contractor-license-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 '{
  "state": "WA",
  "expiringWithinDays": 30,
  "alertTypes": [
    "insurance",
    "bond",
    "license"
  ],
  "maxRecords": 10
}' |
apify call rickyz1x/contractor-license-scraper --silent --output-dataset

```

## MCP server setup

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