# CSLB California Contractor License Search – New License Leads (`gazidev/california-contractor-leads`) Actor

California contractor licences from the official CSLB Data Portal lists: business name, type, address, county, phone, classifications, issue and expiry dates, optional bond and workers' comp. New-licence leads by issue date, county and ZIP filters. $1 per 1,000 licences.

- **URL**: https://apify.com/gazidev/california-contractor-leads.md
- **Developed by:** [Cemal Atakli](https://apify.com/gazidev) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 licence 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

## CSLB California Contractor License Search – New License Leads

Get **California contractor licences** straight from the official **CSLB (Contractors State License Board) Data Portal** list files: business name, business type, address, city, county, ZIP, phone, every classification on the licence, issue date, expiry date and status. Optional **bond and workers' comp** details. Filter by classification, county, city, ZIP, business type and **issue date** to get **new contractor licence leads** ("licensed in the last 30 days"), renewal leads ("expires in the next 60 days") or a clean statewide contractor directory.

**$1 per 1,000 licences** returned. Rows you filter out are free.

### What it does

1. For each classification you pick (A, B, B-2, C-2 … C-61/D-65, ASB, HAZ: 78 lists), it downloads CSLB's own **"List of Contractors by Classification"** file. This is the same download a person gets by clicking *Download* on the CSLB Data Portal page. No browser, no login, no captcha.
2. It reads the spreadsheet, removes duplicates (a licence with A, B and C-10 is returned once), applies your filters and sorts the result (newest licences first by default).
3. Each row gets ISO dates, an E.164 phone, readable classification names, the licence age in days and a link to the official **CSLB Instant License Check** page for that number.

### Use cases

- **New-licence leads:** newly licensed roofers, solar installers, HVAC or plumbing contractors in your counties every week. They need insurance, bonds, software, materials, equipment financing, payroll, websites and accountants.
- **Contractor directory / market sizing:** how many active C-46 solar or C-20 HVAC contractors there are in San Diego County, and who they are.
- **Renewal and compliance leads:** licences that expire within N days; bond surety and workers' comp insurer (with *Include bond information*).
- **Licence verification in bulk:** paste licence numbers; each one comes back with its record, or a free `found: false` row with the official lookup link.
- **Schedules:** turn on *Only licences not returned before* and run it daily or weekly to get only new licences.

### Input

| Field | Default | Notes |
|---|---|---|
| `classifications` | `["C-12"]` | CSLB classes, e.g. `B`, `C-10`, `C-36`, `C-61/D-49`. `ALL` = all 78 lists (statewide). |
| `issuedWithinDays` / `issuedAfter` | – | New-licence leads: issue date within N days, or on/after a date. |
| `counties`, `cities`, `zipCodes` | – | Location filters. ZIPs match by prefix (`92`, `94103`). |
| `businessTypes` | – | Corporation, Sole Owner, Limited Liability, Partnership, JointVenture. |
| `nameContains` | – | Text in the business name. |
| `onlyWithPhone` | `false` | Skip rows without a 10-digit phone. |
| `expiringWithinDays` | – | Licences expiring between today and today + N days. |
| `licenseNumbers` | – | Verify / look up only these numbers. |
| `includeBondInfo` | `false` | Adds surety company, bond number and dates, workers' comp type, insurer, policy number and dates. |
| `sortBy` | newest first | Or oldest first, expiring soonest, licence number. |
| `maxItems` | 10 | Rows to return (and pay for). `0` = no limit. |
| `onlyNew` + `stateKey` | `false` | Remember returned licences and skip them next time. |
| `useCache` | `true` | Reuses a list downloaded in the last 20 hours (named store `cslb-contractor-lists`). |

Example: new plumbing and HVAC contractors in Los Angeles and Orange County, last 30 days, with phone:

```json
{
  "classifications": ["C-36", "C-20"],
  "counties": ["Los Angeles", "Orange"],
  "issuedWithinDays": 30,
  "onlyWithPhone": true,
  "maxItems": 0
}
```

### Output (one row per licence)

```json
{
  "licenseNumber": "1164895",
  "businessName": "WEST COAST EARTHWORKS INC",
  "businessType": "Corporation",
  "address": "1652 CREST HILL WAY",
  "city": "GILROY",
  "state": "CA",
  "zip": "95020",
  "county": "Santa Clara",
  "phone": "(650) 785 6463",
  "phoneE164": "+16507856463",
  "classifications": ["C-12"],
  "classificationNames": ["Earthwork and Paving"],
  "matchedClassification": "C-12",
  "status": "CLEAR",
  "issueDate": "2026-11-20",
  "expirationDate": "2028-11-30",
  "licenseAgeDays": 2,
  "lastUpdated": "2026-11-20",
  "cslbLookupUrl": "https://www.cslb.ca.gov/OnlineServices/CheckLicenseII/LicenseDetail.aspx?LicNum=1164895",
  "source": "California CSLB Data Portal",
  "sourceUrl": "https://www.cslb.ca.gov/onlineservices/dataportal/ListByClassification",
  "fetchedAt": "2026-11-22T12:05:51+00:00"
}
```

With `includeBondInfo` the row also has `bondSuretyCompany`, `bondNumber`, `bondEffectiveDate`, `bondCancellationDate`, `workersCompCoverageType` (e.g. "Exempt"), `workersCompInsuranceCompany`, `workersCompPolicyNumber` and the policy dates. The run summary (rows read, matches per class, filtered, errors) is saved as `OUTPUT` in the key-value store.

### Pricing

| Actor | Price per 1,000 licences | Source stated |
|---|---|---|
| **This Actor** | **$1.00** (+ $0.00005 per run start) | CSLB Data Portal bulk lists |
| pink_comic/cslb-contractor-license-search | $4.00 + $0.002 per start | – |
| scrapebench/california-contractor-license-lookup | $4.00 | – |
| scrapebench/california-contractor-directory | $2.00 | – |
| stackrelay/cslb-california-scraper | $19.00 | – |

Competitor prices as listed in the Apify Store on 22 Nov 2026. Only returned licences are charged; filtered rows, `found: false` rows and error rows are free. If your maximum charge per run is reached, the run stops cleanly and says so in `OUTPUT`.

### Our other contractor and licence Actors

- **[Contractor License Search (WA, OR, TX, NY)](https://apify.com/gazidev/contractor-license-search)**: the same kind of data for Washington L\&I, Oregon CCB, Texas TDLR and New York. This listing adds **California**, the largest contractor market, which that Actor does not cover, plus bond / workers' comp details and county filters from CSLB's own files.
- **[FMCSA Carrier Leads](https://apify.com/gazidev/fmcsa-carrier-leads)**: newly registered US trucking companies.
- **[Florida New Business Leads](https://apify.com/gazidev/florida-new-business-leads)**: new Florida companies from Sunbiz.

### Limits (please read)

- **Active licences only.** CSLB's classification lists contain licences in good standing (status `CLEAR`). Expired, suspended or revoked licences, complaints and disciplinary actions are not in these files. For those, open the `cslbLookupUrl` link (we do not scrape the Instant License Check page).
- **No e-mail addresses.** CSLB does not publish them (Business & Professions Code §27). The phone is the business phone CSLB discloses.
- **Sole owners** are listed under the owner's own name (e.g. "RATCLIFFE DAVID NICHOLAS"). Use it in line with US/California marketing rules (TCPA, Do-Not-Call).
- **Statewide (`ALL`)** means 78 downloads, spaced 2 seconds apart; the B list alone has ~104k licences and takes ~40 s. Expect several minutes. Set `maxItems` (the Actor then keeps only the top N in memory) or give the run 1–2 GB.
- CSLB updates the lists daily. CSLB's statewide Master List file was unavailable when this Actor was built, so statewide = all classification lists.
- If CSLB changes the Data Portal form, the run fails with a clear message instead of returning wrong data.

### Data source and licence

Data: [CSLB Data Portal](https://www.cslb.ca.gov/onlineservices/dataportal/) ("publicly disclosable contractor's license information"; "There is no charge for this service"). ca.gov Conditions of Use: information on the site is "considered in the public domain. It may be distributed or copied as permitted by law." This Actor is not affiliated with or endorsed by CSLB. Requests use an identifying User-Agent, one at a time, 2 s apart.

### FAQ

**How new is the data?** Each run downloads the current list (or reuses one downloaded in the last 20 hours). Licences issued two days before the run appeared in our tests.

**Can I search by business name?** Yes, with `nameContains`, inside the classifications you pick. Choose `ALL` if you do not know the class.

**Does it get the licence's personnel (RMO/officers)?** No. The bulk lists do not include personnel.

**Why is a licence in several classes returned once?** Rows are de-duplicated by licence number. `classifications` lists every class on the licence; `matchedClassification` is the list it was found in.

### Use with AI agents (Apify MCP)

Add the Actor to Claude, Cursor or any MCP client through the [Apify MCP server](https://mcp.apify.com) (`gazidev/california-contractor-leads`). Ask, for example: "List new C-46 solar contractors licensed in San Diego County in the last 30 days with phone numbers." The agent fills `classifications`, `counties`, `issuedWithinDays` and `onlyWithPhone` and gets structured JSON back.

# Actor input Schema

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

Licence classifications to download from the CSLB Data Portal (one official list file each). A licence with several classes is returned once. `ALL` downloads all 78 lists (statewide, several minutes, needs 1-2 GB memory without a max-items cap).

## `issuedWithinDays` (type: `integer`):

Only licences whose CSLB issue date is within the last N days, e.g. 30. 0 = no limit.

## `issuedAfter` (type: `string`):

Alternative to the field above. Overrides it when set.

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

California counties to keep, e.g. Los Angeles, San Diego ("County" is optional). Empty = statewide.

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

Cities to keep (exact name, case-insensitive).

## `zipCodes` (type: `array`):

Keep licences whose ZIP starts with any of these, e.g. 92 or 94103.

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

Empty = all.

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

Case-insensitive text filter on the business name.

## `onlyWithPhone` (type: `boolean`):

Skip rows without a valid 10-digit phone (free).

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

Renewal leads: only licences expiring between today and today + N days. 0 = off.

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

Return only these licence numbers. Numbers not found in the chosen lists get a free `found: false` row with the official lookup link. Pick ALL classifications if you do not know the class.

## `statuses` (type: `array`):

Optional status filter on CSLB's Status column (the lists contain active licences, normally `CLEAR`).

## `includeBondInfo` (type: `boolean`):

CSLB's 'bond information' option: surety company, bond number and dates, workers' comp coverage type, insurer, policy number and dates.

## `sortBy` (type: `string`):

Order of the output. With a max-items cap you get the top N in this order.

## `maxItems` (type: `integer`):

Maximum licences to return (and pay for). 0 = no limit.

## `onlyNew` (type: `boolean`):

Remembers returned licence numbers in a named key-value store, so a scheduled run gives only new ones.

## `stateKey` (type: `string`):

Use different keys for different saved searches.

## `useCache` (type: `boolean`):

Keeps each CSLB file for 20 hours in a named key-value store (cslb-contractor-lists) so repeated runs do not download it again. CSLB updates the lists daily.

## Actor input object example

```json
{
  "classifications": [
    "C-12"
  ],
  "onlyWithPhone": false,
  "includeBondInfo": false,
  "sortBy": "issueDateDesc",
  "maxItems": 10,
  "onlyNew": false,
  "stateKey": "default",
  "useCache": true
}
```

# Actor output Schema

## `licenses` (type: `string`):

No description

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

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "classifications": [
        "C-12"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("gazidev/california-contractor-leads").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "classifications": ["C-12"],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("gazidev/california-contractor-leads").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "classifications": [
    "C-12"
  ],
  "maxItems": 10
}' |
apify call gazidev/california-contractor-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gazidev/california-contractor-leads"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HOZhloIBGtIcPRJim/builds/Akdwl4MLDeuGNAcG7/openapi.json
