# California Contractor License Lookup & Verification (CSLB) Bulk (`cblu/california-license-records-scraper`) Actor

Search, look up & verify California CSLB contractor licenses in bulk — status, classification, expiration, address, phone, bond & workers' comp. Official CSLB public data. Export CSV/JSON/Excel.

- **URL**: https://apify.com/cblu/california-license-records-scraper.md
- **Developed by:** [Steven Carleton](https://apify.com/cblu) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 license 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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## California CSLB Contractor License Records Scraper — Bulk Lookup & Verification

Extract **official California contractor license records** — general building (B), engineering (A), electrical (C10), plumbing (C36), HVAC (C20), roofing (C39), painting (C33), landscaping (C27), and every other CSLB classification — straight from the Contractors State License Board's public Master List (~243,000 licenses). Filter by **classification, county, city, ZIP, status, business type, and expiration date** and download clean JSON, CSV, or Excel.

Because this Actor reads CSLB's **official statewide master file** (not a fragile one-at-a-time search form), it is fast, complete, and does not miss records — and every record includes the **business phone number, contractor bond, and workers' comp details** that CSLB publishes.

### What data do you get?

One result per license record:

| Field | Example |
|---|---|
| `licenseNumber` | `1000002` |
| `businessName` / `fullBusinessName` | `DOCKERY RANDALL MARK` |
| `businessType` | `Sole Owner` / `Corporation` / `Limited Liability` |
| `addressLine1`, `city`, `state`, `zip`, `county` | Mailing address of record |
| `phone` | `(925) 383 0487` |
| `primaryStatus` / `secondaryStatus` | `CLEAR` (in good standing) or suspension flags |
| `classifications` | `A, B, C10` |
| `issueDate` / `expirationDate` | `2015-01-10` / `2027-01-31` |
| `workersCompCoverageType`, `wcInsuranceCompany`, `wcExpirationDate` | Workers' comp coverage |
| `contractorBondCompany`, `contractorBondNumber`, `contractorBondAmount` | Contractor bond |

### Use cases

- **Lead generation** — build county- or city-level lists of active contractors *with phone numbers* for insurance, building materials, SaaS, CE courses, or financial products. Combine with `expiresBefore` to target contractors whose **renewal is coming up**.
- **License verification at scale** — verify that subcontractors, vendors, or marketplace signups hold a CLEAR California license with active workers' comp.
- **Insurance & lending** — underwriting checks: license status, bond amount, workers' comp coverage type and insurer in one record.
- **Compliance & risk** — flag partners whose license is suspended (bond, workers' comp, judgement suspensions) or expiring; the `suspended` status filter returns exactly the flagged population.
- **Market sizing & analytics** — count C10 electricians per county, track new licensees, analyze contractor density.

### How to use it

```json
{
    "classifications": ["B"],
    "counties": ["Los Angeles"],
    "status": "clear",
    "expiresBefore": "2026-12-31",
    "maxResults": 5000
}
```

Leave `classifications`, `counties`, `cities`, and `zips` empty for statewide, all-classification pulls. `maxResults` caps the run — **you are only charged for records actually returned**.

### Pricing

Pay per result: one charge per license record extracted — $4.00 per 1,000 records ($0.004/record). A 1,000-lead county list with phone numbers costs $4 versus hours of manual CSLB searching.

### Data source & freshness

Records come from the CSLB Public Data Portal's Master List of California Licensed Contractors (cslb.ca.gov), which CSLB refreshes **weekly**. This is public information published by the State of California. The master list contains licenses that are currently renewed or expired-but-renewable; cancelled, revoked, and expired non-renewable licenses are excluded by CSLB at the source. Email addresses are not published by CSLB (B\&P Code Section 27) — no actor can legitimately provide them.

### Reliability

Whale-sized pulls are safe by design: the ~78 MB master file is processed as a stream (memory-safe at any `maxResults`), downloads retry automatically across proxy tiers if CSLB's CDN cuts or blocks a connection, and progress is checkpointed so a platform restart never double-charges or drops records.

### FAQ

**How current is the data?** CSLB regenerates the master list weekly (the run log shows the streaming source). Schedule the Actor weekly to keep your lists fresh.

**Can I pull all ~243,000 licenses?** Yes — leave the filters empty, set `maxResults` to 250000, and let it stream. A full statewide scan takes several minutes because CSLB serves the file slowly; filtered county/classification pulls that hit `maxResults` early finish much faster.

**What does `primaryStatus: CLEAR` mean?** In good standing. Suspension-type statuses (contractor bond suspension, workers' comp suspension, judgement suspension...) are included when you set `status` to `any` or `suspended`.

**Do you have the qualifier/personnel names or workers' comp history?** CSLB publishes separate Personnel and Workers' Compensation files; support is on the roadmap — open an issue on the Actor's Issues tab if you need them.

# Actor input Schema

## `classifications` (type: `array`):

Optional. CSLB classification codes, e.g. <code>B</code> (General Building), <code>A</code> (General Engineering), <code>C10</code> (Electrical), <code>C36</code> (Plumbing), <code>C33</code> (Painting), <code>C27</code> (Landscaping), <code>C20</code> (HVAC), <code>C39</code> (Roofing). A record matches if it holds ANY of the listed classifications. Leave empty for all classifications.

## `counties` (type: `array`):

Optional. California county names, e.g. <code>Los Angeles</code>, <code>San Diego</code>, <code>Orange</code>, <code>Riverside</code>. Leave empty for statewide.

## `cities` (type: `array`):

Optional. Exact city names of the mailing address, e.g. <code>LOS ANGELES</code>, <code>SACRAMENTO</code>. Case-insensitive. Leave empty for all cities.

## `zips` (type: `array`):

Optional. 5-digit ZIP codes, e.g. <code>90210</code>. Leave empty for all ZIPs.

## `status` (type: `string`):

"Clear" (default) returns licenses in good standing — the standard choice for lead generation. "Suspended/flagged" returns only licenses with a suspension-type primary status (bond, workers' comp, judgement...). "Any" returns both.

## `businessTypes` (type: `array`):

Optional. Filter by entity type: <code>Sole Owner</code>, <code>Corporation</code>, <code>Limited Liability</code>, <code>Partnership</code>, <code>JointVenture</code>. Leave empty for all.

## `expiresBefore` (type: `string`):

Optional. Only return licenses expiring before this date (format <code>YYYY-MM-DD</code>). Great for renewal marketing lists.

## `expiresAfter` (type: `string`):

Optional. Only return licenses expiring after this date (format <code>YYYY-MM-DD</code>).

## `nameContains` (type: `string`):

Optional. Case-insensitive substring match against the business name (all name variants).

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

Maximum number of license records to return. You are only charged for records actually returned. The full master list has ~243,000 licenses.

## Actor input object example

```json
{
  "classifications": [
    "B"
  ],
  "counties": [],
  "cities": [],
  "zips": [],
  "status": "clear",
  "businessTypes": [],
  "maxResults": 500
}
```

# Actor output Schema

## `records` (type: `string`):

All extracted license records as JSON.

## `recordsCsv` (type: `string`):

All extracted license records as CSV.

# 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 = {
    "classifications": [
        "B"
    ],
    "maxResults": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("cblu/california-license-records-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 = {
    "classifications": ["B"],
    "maxResults": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("cblu/california-license-records-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 '{
  "classifications": [
    "B"
  ],
  "maxResults": 500
}' |
apify call cblu/california-license-records-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cblu/california-license-records-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/XeqHKSwvlJv9G2DPI/builds/NMGuNLLDu9CJYf5xg/openapi.json
