# CSLB California Contractor License Verification (`lulzasaur/cslb-license-scraper`) Actor

Verify California contractor licenses from the official CSLB database. Look up by license number, business name, or personnel name. Returns license status, classifications (B, C-10, etc.), issue/expire dates, bond info, workers' comp, and address. B2B compliance & lead gen.

- **URL**: https://apify.com/lulzasaur/cslb-license-scraper.md
- **Developed by:** [lulz bot](https://apify.com/lulzasaur) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 results

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

## CSLB California Contractor License Verification

Apify Actor that verifies **California contractor licenses** directly from the official
**Contractors State License Board (CSLB)** "Check a License" database
([cslb.ca.gov](https://www.cslb.ca.gov/onlineservices/checklicenseII/checklicense.aspx)).

Built for general contractors, sub-hiring, property managers, insurers, lenders, and
compliance teams that must confirm a contractor is **licensed, bonded, and able to
contract** before signing a deal or hiring on a project.

### What it does

Look up a California contractor by:

- **License number** (6–8 digits, e.g. `700000`)
- **Business name** (full or partial)
- **Personnel name** (associated officer / owner — last name, optional first name)

For each match it returns a structured record with the full license profile.

### Output

Each dataset item:

| Field | Description |
|-------|-------------|
| `state` | Always `CA` |
| `source` | Always `CSLB` |
| `found` | `true` if the license exists, `false` if not in the database |
| `licenseNumber` | The CSLB license number |
| `businessName` | Licensed business name |
| `address` | Mailing/business address |
| `businessPhone` | Phone number on file |
| `entityType` | e.g. Sole Ownership, Corporation, Partnership, LLC |
| `issueDate` | License issue date |
| `expireDate` | License expiration date |
| `status` | Normalized status: `Active`, `Expired`, `Suspended`, `Revoked`, `Inactive`, ... |
| `statusDescription` | Full CSLB status sentence |
| `classifications` | Array of classifications, e.g. `["B - GENERAL BUILDING CONTRACTOR", "C-10 - ELECTRICAL"]` |
| `bonding` | Contractor's bond: `company`, `bondNumber`, `bondAmount`, `effectiveDate`, `cancellationDate` |
| `workersCompensation` | Workers' comp status / carrier / dates |
| `disciplinaryFlag` | `true` if revoked/suspended or disclosable actions are present |
| `detailUrl` | Link to the CSLB detail page |
| `scrapedAt` | ISO timestamp of the lookup |

#### Example record

```json
{
  "state": "CA",
  "source": "CSLB",
  "found": true,
  "licenseNumber": "700000",
  "businessName": "RELIABLE TREE EXPERTS",
  "address": "3613 DAVIS AVE, MODESTO, CA 95357",
  "businessPhone": "(209) 579-8733",
  "entityType": "Sole Ownership",
  "issueDate": "12/08/1994",
  "expireDate": "12/31/2012",
  "status": "Expired",
  "statusDescription": "This license is expired and not able to contract at this time.",
  "classifications": ["C-61 / D49 - TREE SERVICE"],
  "bonding": {
    "company": "AMERICAN CONTRACTORS INDEMNITY COMPANY",
    "bondNumber": "SC6016130",
    "bondAmount": "$12,500",
    "effectiveDate": "03/02/2009",
    "cancellationDate": "02/02/2013"
  },
  "workersCompensation": "This license is exempt from having workers compensation insurance; ...",
  "disciplinaryFlag": false,
  "detailUrl": "https://www.cslb.ca.gov/onlineservices/checklicenseII/LicenseDetail.aspx?LicNum=700000",
  "scrapedAt": "2026-06-24T18:51:05.000Z"
}
```

### Input

```json
{
  "searchType": "licenseNumber",
  "licenseNumber": "700000",
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

| Input | Type | Notes |
|-------|------|-------|
| `searchType` | string | `licenseNumber` (default), `businessName`, or `personnelName` |
| `licenseNumber` | string | Required for `licenseNumber` searches |
| `businessName` | string | Required for `businessName` searches |
| `lastName` | string | Required for `personnelName` searches |
| `firstName` | string | Optional, narrows a personnel-name search |
| `maxResults` | integer | Cap on licenses resolved per name search (default 25) |
| `proxyConfiguration` | object | Defaults to Apify RESIDENTIAL proxy |

### Use cases

- **Hiring & subcontracting** — confirm a contractor is active and bonded before signing.
- **Insurance & lending** — validate license status and workers' comp for underwriting.
- **Lead generation** — enrich contractor lists with classifications and contact info.
- **Compliance / due diligence** — flag expired, suspended, or revoked licenses.

### Pricing

Pay-per-result: a small fee per license record returned, plus a tiny actor-start fee.

### Notes

Data comes from the public CSLB database and reflects whatever CSLB has on file
("Data current as of …" appears on each detail page). This Actor is an independent
tool and is not affiliated with or endorsed by the CSLB or the State of California.

# Actor input Schema

## `searchType` (type: `string`):

How to look up the license: by license number, by business name, or by personnel (officer/owner) name.

## `licenseNumber` (type: `string`):

CSLB license number (6-8 digits), e.g. 700000. Required when search type is License Number.

## `businessName` (type: `string`):

Contractor business name (or part of it). Required when search type is Business Name.

## `lastName` (type: `string`):

Last name of an associated person (officer/owner). Required when search type is Personnel Name.

## `firstName` (type: `string`):

Optional first name to narrow a personnel-name search.

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

Maximum number of licenses to resolve for name searches (each match is fetched in full).

## `proxyConfiguration` (type: `object`):

Proxy settings. The CSLB site is not captcha-walled, but RESIDENTIAL proxies are recommended for reliability and to avoid rate limiting.

## Actor input object example

```json
{
  "searchType": "licenseNumber",
  "licenseNumber": "700000",
  "maxResults": 25,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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 = {
    "licenseNumber": "1050000",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("lulzasaur/cslb-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 = {
    "licenseNumber": "1050000",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("lulzasaur/cslb-license-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 '{
  "licenseNumber": "1050000",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call lulzasaur/cslb-license-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lulzasaur/cslb-license-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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