# 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, 33.3% 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 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

## 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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "CSLB California Contractor License Verification",
        "description": "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.",
        "version": "1.0",
        "x-build-id": "ffglOeUivbR0YfPKc"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lulzasaur~cslb-license-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lulzasaur-cslb-license-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/lulzasaur~cslb-license-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lulzasaur-cslb-license-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/lulzasaur~cslb-license-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lulzasaur-cslb-license-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",
                "required": [
                    "searchType"
                ],
                "properties": {
                    "searchType": {
                        "title": "Search type",
                        "enum": [
                            "licenseNumber",
                            "businessName",
                            "personnelName"
                        ],
                        "type": "string",
                        "description": "How to look up the license: by license number, by business name, or by personnel (officer/owner) name.",
                        "default": "licenseNumber"
                    },
                    "licenseNumber": {
                        "title": "License number",
                        "type": "string",
                        "description": "CSLB license number (6-8 digits), e.g. 700000. Required when search type is License Number."
                    },
                    "businessName": {
                        "title": "Business name",
                        "type": "string",
                        "description": "Contractor business name (or part of it). Required when search type is Business Name."
                    },
                    "lastName": {
                        "title": "Personnel last name",
                        "type": "string",
                        "description": "Last name of an associated person (officer/owner). Required when search type is Personnel Name."
                    },
                    "firstName": {
                        "title": "Personnel first name",
                        "type": "string",
                        "description": "Optional first name to narrow a personnel-name search."
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of licenses to resolve for name searches (each match is fetched in full).",
                        "default": 25
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. The CSLB site is not captcha-walled, but RESIDENTIAL proxies are recommended for reliability and to avoid rate limiting.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
