{
  "openapi": "3.0.1",
  "info": {
    "title": "CSLB Scraper | Contractor Licenses, Bonds and Leads",
    "description": "CSLB scraper for California contractor licenses: search by trade, county, city, business name, license number or person. Get status, trades, phone, address, bonds, workers' comp, liability insurance and owners. 20 licenses in 14 seconds, 41 fields each. Lead lists and license checks, no login.",
    "version": "1.0",
    "x-build-id": "FoSceJ99ZsqUdFaXp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/silentflow~cslb-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-silentflow-cslb-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/silentflow~cslb-scraper/runs": {
      "post": {
        "operationId": "runs-sync-silentflow-cslb-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/silentflow~cslb-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-silentflow-cslb-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",
        "properties": {
          "classifications": {
            "title": "🛠️ Trades",
            "type": "array",
            "description": "The CSLB license classifications to list, for example <code>C-10</code> Electrical, <code>C-36</code> Plumbing or <code>B</code> General Building. You can also type a code (<code>C10</code>) or a trade (<code>roofing</code>, <code>plumber</code>). Combine with counties or cities below. On its own, a trade lists every active license in California that holds it: C-10 alone is about 28,000 licenses.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "A",
                "B",
                "B-2",
                "C-2",
                "C-4",
                "C-5",
                "C-6",
                "C-7",
                "C-8",
                "C-9",
                "C-10",
                "C-11",
                "C-12",
                "C-13",
                "C-15",
                "C-16",
                "C-17",
                "C-20",
                "C-21",
                "C-22",
                "C-23",
                "C-27",
                "C-28",
                "C-29",
                "C-31",
                "C-32",
                "C-33",
                "C-34",
                "C-35",
                "C-36",
                "C-38",
                "C-39",
                "C-42",
                "C-43",
                "C-45",
                "C-46",
                "C-47",
                "C-49",
                "C-50",
                "C-51",
                "C-53",
                "C-54",
                "C-55",
                "C-57",
                "C-60",
                "C-61",
                "C-61/D-3",
                "C-61/D-4",
                "C-61/D-6",
                "C-61/D-9",
                "C-61/D-10",
                "C-61/D-12",
                "C-61/D-16",
                "C-61/D-21",
                "C-61/D-24",
                "C-61/D-28",
                "C-61/D-29",
                "C-61/D-30",
                "C-61/D-31",
                "C-61/D-34",
                "C-61/D-35",
                "C-61/D-38",
                "C-61/D-39",
                "C-61/D-40",
                "C-61/D-41",
                "C-61/D-42",
                "C-61/D-49",
                "C-61/D-50",
                "C-61/D-52",
                "C-61/D-53",
                "C-61/D-56",
                "C-61/D-59",
                "C-61/D-62",
                "C-61/D-63",
                "C-61/D-64",
                "C-61/D-65",
                "ASB",
                "HAZ"
              ],
              "enumTitles": [
                "A - General Engineering Contractor",
                "B - General Building Contractor",
                "B-2 - Residential Remodeling Contractor",
                "C-2 - Insulation and Acoustical Contractor",
                "C-4 - Boiler, Hot Water Heating and Steam Fitting Contractor",
                "C-5 - Framing and Rough Carpentry Contractor",
                "C-6 - Cabinet, Millwork and Finish Carpentry Contractor",
                "C-7 - Low Voltage Systems Contractor",
                "C-8 - Concrete Contractor",
                "C-9 - Drywall Contractor",
                "C-10 - Electrical Contractor",
                "C-11 - Elevator Contractor",
                "C-12 - Earthwork and Paving Contractors",
                "C-13 - Fencing Contractor",
                "C-15 - Flooring and Floor Covering Contractors",
                "C-16 - Fire Protection Contractor",
                "C-17 - Glazing Contractor",
                "C-20 - Warm-Air Heating, Ventilating and Air-Conditioning Contractor",
                "C-21 - Building Moving/Demolition Contractor",
                "C-22 - Asbestos Abatement Contractor",
                "C-23 - Ornamental Metal Contractor",
                "C-27 - Landscaping Contractor",
                "C-28 - Lock and Security Equipment Contractor",
                "C-29 - Masonry Contractor",
                "C-31 - Construction Zone Traffic Control Contractor",
                "C-32 - Parking and Highway Improvement Contractor",
                "C-33 - Painting and Decorating Contractor",
                "C-34 - Pipeline Contractor",
                "C-35 - Lathing and Plastering Contractor",
                "C-36 - Plumbing Contractor",
                "C-38 - Refrigeration Contractor",
                "C-39 - Roofing Contractor",
                "C-42 - Sanitation System Contractor",
                "C-43 - Sheet Metal Contractor",
                "C-45 - Sign Contractor",
                "C-46 - Solar Contractor",
                "C-47 - General Manufactured Housing Contractor",
                "C-49 - Tree and Palm Contractor",
                "C-50 - Reinforcing Steel Contractor",
                "C-51 - Structural Steel Contractor",
                "C-53 - Swimming Pool Contractor",
                "C-54 - Ceramic and Mosaic Tile Contractor",
                "C-55 - Water Conditioning Contractor",
                "C-57 - Well Drilling Contractor",
                "C-60 - Welding Contractor",
                "C-61 - Limited Specialty Classification",
                "C-61/D-3 - Awnings Contractor",
                "C-61/D-4 - Central Vacuum Systems Contractor",
                "C-61/D-6 - Concrete-Related Services Contractor",
                "C-61/D-9 - Drilling, Blasting and Oil Field Work Contractor",
                "C-61/D-10 - Elevated Floors Contractor",
                "C-61/D-12 - Synthetic Products Contractor",
                "C-61/D-16 - Hardware, Locks and Safes Contractor",
                "C-61/D-21 - Machinery and Pumps Contractor",
                "C-61/D-24 - Metal Products Contractor",
                "C-61/D-28 - Doors, Gates and Activating Devices Contractor",
                "C-61/D-29 - Paperhanging Contractor",
                "C-61/D-30 - Pile Driving and Pressure Foundation Jacking Contractor",
                "C-61/D-31 - Pole Installation and Maintenance Contractor",
                "C-61/D-34 - Prefabricated Equipment Contractor",
                "C-61/D-35 - Pool and Spa Maintenance Contractor",
                "C-61/D-38 - Sand and Water Blasting Contractor",
                "C-61/D-39 - Scaffolding Contractor",
                "C-61/D-40 - Service Station Equipment and Maintenance Contractor",
                "C-61/D-41 - Siding and Decking Contractor",
                "C-61/D-42 - Non-Electrical Sign Installation",
                "C-61/D-49 - Tree Service Contractor",
                "C-61/D-50 - Suspended Ceilings Contractor",
                "C-61/D-52 - Window Coverings Contractor",
                "C-61/D-53 - Wood Tanks Contractor",
                "C-61/D-56 - Trenching Only Contractor",
                "C-61/D-59 - Hydroseed Spraying Contractor",
                "C-61/D-62 - Air and Water Balancing Contractor",
                "C-61/D-63 - Construction Clean-up Contractor",
                "C-61/D-64 - Non-specialized Contractor",
                "C-61/D-65 - Weatherization and Energy Conservation Contractor",
                "ASB - Asbestos Certification",
                "HAZ - Hazardous Substance Removal Certification"
              ]
            }
          },
          "counties": {
            "title": "🗺️ Counties",
            "type": "array",
            "description": "California counties to cover. Every active license of the chosen trades with an address of record in these counties is listed: San Diego County has about 2,100 active C-10 electricians. Short forms work too (<code>LA</code>, <code>SF</code>, <code>OC</code>).",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "Alameda",
                "Alpine",
                "Amador",
                "Butte",
                "Calaveras",
                "Colusa",
                "Contra Costa",
                "Del Norte",
                "El Dorado",
                "Fresno",
                "Glenn",
                "Humboldt",
                "Imperial",
                "Inyo",
                "Kern",
                "Kings",
                "Lake",
                "Lassen",
                "Los Angeles",
                "Madera",
                "Marin",
                "Mariposa",
                "Mendocino",
                "Merced",
                "Modoc",
                "Mono",
                "Monterey",
                "Napa",
                "Nevada",
                "Orange",
                "Placer",
                "Plumas",
                "Riverside",
                "Sacramento",
                "San Benito",
                "San Bernardino",
                "San Diego",
                "San Francisco",
                "San Joaquin",
                "San Luis Obispo",
                "San Mateo",
                "Santa Barbara",
                "Santa Clara",
                "Santa Cruz",
                "Shasta",
                "Sierra",
                "Siskiyou",
                "Solano",
                "Sonoma",
                "Stanislaus",
                "Sutter",
                "Tehama",
                "Trinity",
                "Tulare",
                "Tuolumne",
                "Ventura",
                "Yolo",
                "Yuba"
              ],
              "enumTitles": [
                "Alameda",
                "Alpine",
                "Amador",
                "Butte",
                "Calaveras",
                "Colusa",
                "Contra Costa",
                "Del Norte",
                "El Dorado",
                "Fresno",
                "Glenn",
                "Humboldt",
                "Imperial",
                "Inyo",
                "Kern",
                "Kings",
                "Lake",
                "Lassen",
                "Los Angeles",
                "Madera",
                "Marin",
                "Mariposa",
                "Mendocino",
                "Merced",
                "Modoc",
                "Mono",
                "Monterey",
                "Napa",
                "Nevada",
                "Orange",
                "Placer",
                "Plumas",
                "Riverside",
                "Sacramento",
                "San Benito",
                "San Bernardino",
                "San Diego",
                "San Francisco",
                "San Joaquin",
                "San Luis Obispo",
                "San Mateo",
                "Santa Barbara",
                "Santa Clara",
                "Santa Cruz",
                "Shasta",
                "Sierra",
                "Siskiyou",
                "Solano",
                "Sonoma",
                "Stanislaus",
                "Sutter",
                "Tehama",
                "Trinity",
                "Tulare",
                "Tuolumne",
                "Ventura",
                "Yolo",
                "Yuba"
              ]
            }
          },
          "cities": {
            "title": "🏙️ Cities or ZIP codes",
            "type": "array",
            "description": "Narrow the list to a city (<code>San Diego</code>) or a 5-digit ZIP code (<code>92101</code>) instead of a whole county. Needs at least one trade above. A city covers the licenses whose address of record is in it: 594 active C-10 electricians in the city of San Diego, 19 in ZIP 92101.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🏢 Business names",
            "type": "array",
            "description": "Business or DBA names, matched from the start of the name: <code>pacific construction</code> returns PACIFIC CONSTRUCTION, PACIFIC CONSTRUCTION SERVICES INC and the like. Expired and cancelled licenses are included unless you tick <b>Active licenses only</b>.",
            "items": {
              "type": "string"
            }
          },
          "licenseNumbers": {
            "title": "🪪 License numbers or links",
            "type": "array",
            "description": "CSLB license numbers (<code>1079882</code>) or links to a CSLB license page (<code>https://www.cslb.ca.gov/OnlineServices/CheckLicenseII/LicenseDetail.aspx?LicNum=1079882</code>). One row per license, whatever its status. A number CSLB does not know gives no row.",
            "items": {
              "type": "string"
            }
          },
          "personnelNames": {
            "title": "👤 People on a license",
            "type": "array",
            "description": "Owners, officers or qualifiers, written <code>Last name, First name</code> (<code>Gainor, Dean</code>) or the last name alone. Returns every license, current or past, that the matching people are listed on.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🔢 Max licenses",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many licenses, across every trade, place, name and number. Set it to what you need: the cost grows with it.",
            "default": 100
          },
          "includeDetails": {
            "title": "📋 Full license record",
            "type": "boolean",
            "description": "Read each license's CSLB page and personnel list: bond amounts, liability insurance, workers' comp class codes, owners and officers with their titles, the qualifier, complaint disclosure and status notes. Turn it off for fast bulk lists by trade and county: the 24 columns of the CSLB data portal, thousands of licenses in seconds.",
            "default": true
          },
          "activeOnly": {
            "title": "✅ Active licenses only",
            "type": "boolean",
            "description": "Skip expired, inactive, cancelled, suspended and revoked licenses. Lists by trade and county hold active licenses only already.",
            "default": 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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}