{
  "openapi": "3.0.1",
  "info": {
    "title": "California CSLB Contractor Scraper",
    "description": "Extract licensed California contractor records from the CSLB public data portal by classification and county. Scrape license number, business name, status, classifications, issue and expiry dates, bond and workers comp, address, county, ZIP and phone for each contractor.",
    "version": "0.1",
    "x-build-id": "RIRW6uERD3RKD3ELW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~california-cslb-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-california-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/scrapers_lat~california-cslb-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-california-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/scrapers_lat~california-cslb-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-california-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",
        "required": [
          "classifications",
          "counties"
        ],
        "properties": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of contractor records to collect across all selected classifications and counties. Optional."
          },
          "withDetails": {
            "title": "Include Bond and Workers' Compensation Details",
            "type": "boolean",
            "description": "When enabled, each record also includes the contractor's bond information (surety company, bond number, effective date) and workers' compensation insurance (insurer, policy number, effective and expiration dates) parsed from the CSLB data export. When disabled, only the core license fields are emitted.",
            "default": true
          },
          "classifications": {
            "title": "License Classifications",
            "uniqueItems": true,
            "type": "array",
            "description": "One or more CSLB license classifications to include in the download (for example C-10 Electrical, C-36 Plumbing, B General Building). At least one classification is required. The CSLB data portal accepts up to 10 classifications per request.",
            "items": {
              "type": "string",
              "enum": [
                "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",
            "uniqueItems": true,
            "type": "array",
            "description": "One or more California counties to include in the download. At least one county is required. The CSLB data portal accepts up to 10 counties per request.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "20",
                "21",
                "22",
                "23",
                "24",
                "25",
                "26",
                "27",
                "28",
                "29",
                "30",
                "31",
                "32",
                "33",
                "34",
                "35",
                "36",
                "37",
                "38",
                "39",
                "40",
                "41",
                "42",
                "43",
                "44",
                "45",
                "46",
                "47",
                "48",
                "49",
                "50",
                "51",
                "52",
                "53",
                "54",
                "55",
                "56",
                "57",
                "58"
              ],
              "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"
              ]
            }
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional proxy. The CSLB public data portal is reachable directly without a proxy; enable a US Apify proxy only if requests start failing.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}