{
  "openapi": "3.0.1",
  "info": {
    "title": "California Contractor License Lookup - CSLB List & Leads",
    "description": "California contractor license lookup and list from the official CSLB master file: bulk license verification or 120,000+ licensed businesses with class, issue date, phone, bond, workers' comp.",
    "version": "0.2",
    "x-build-id": "MTzbfhcKIZd7VK7MU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/loomwise~california-contractor-licenses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-loomwise-california-contractor-licenses",
        "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/loomwise~california-contractor-licenses/runs": {
      "post": {
        "operationId": "runs-sync-loomwise-california-contractor-licenses",
        "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/loomwise~california-contractor-licenses/run-sync": {
      "post": {
        "operationId": "run-sync-loomwise-california-contractor-licenses",
        "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": {
          "licenseNumbers": {
            "title": "License numbers to look up / verify (optional)",
            "type": "array",
            "description": "Bulk CSLB license lookup and verification: paste one or more California contractor license numbers (e.g. 1163533). Each matching business license is returned with its current status, classifications, expiration date, bond and workers' comp, whatever its status. Numbers not found are listed in RUN_SUMMARY. Leave empty to search the full list with the filters below.",
            "items": {
              "type": "string"
            }
          },
          "classifications": {
            "title": "License classifications",
            "type": "array",
            "description": "CSLB classes, e.g. A (general engineering), B (general building), B-2, C-10 (electrical), C-20 (HVAC), C-36 (plumbing), C-39 (roofing), C-46 (solar), C-33 (painting), C-27 (landscaping). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "e.g. Los Angeles, San Diego, Orange, Riverside.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Exact city names, e.g. Sacramento.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP code prefixes",
            "type": "array",
            "description": "ZIP code prefixes.",
            "items": {
              "type": "string"
            }
          },
          "issuedWithinDays": {
            "title": "Licensed within last N days",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Only licenses issued in the last N days (newly licensed contractors). 0 = any issue date (the full active list).",
            "default": 0
          },
          "issuedFrom": {
            "title": "Issued from (YYYY-MM-DD)",
            "type": "string",
            "description": "Issued from (YYYY-MM-DD)."
          },
          "issuedTo": {
            "title": "Issued to (YYYY-MM-DD)",
            "type": "string",
            "description": "Issued to (YYYY-MM-DD)."
          },
          "workersCompExpiringWithinDays": {
            "title": "Workers' comp policy expiring within N days",
            "minimum": 0,
            "maximum": 730,
            "type": "integer",
            "description": "For insurance agents: only contractors whose workers' comp policy expires in the next N days. 0 = no filter.",
            "default": 0
          },
          "entityTypes": {
            "title": "Entity types",
            "type": "array",
            "description": "corporation, llc, partnership, joint venture. Leave empty for all business entities.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Business name contains",
            "type": "array",
            "description": "Business name contains.",
            "items": {
              "type": "string"
            }
          },
          "clearStatusOnly": {
            "title": "Active (CLEAR) licenses only",
            "type": "boolean",
            "description": "Turn off to include suspended and expired-but-renewable licenses. Ignored when you look up specific license numbers (all statuses are returned).",
            "default": true
          },
          "includeContactDetails": {
            "title": "Include business address and phone",
            "type": "boolean",
            "description": "Include business address and phone.",
            "default": true
          },
          "includeInsuranceAndBond": {
            "title": "Include workers' comp and bond details",
            "type": "boolean",
            "description": "Include workers' comp and bond details.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 300000,
            "type": "integer",
            "description": "You pay per result, so this caps the cost.",
            "default": 1000
          },
          "downloadTimeoutSecs": {
            "title": "Live download time limit (seconds)",
            "minimum": 30,
            "maximum": 3000,
            "type": "integer",
            "description": "Maximum time for a live refresh of the CSLB master file. By default the Actor serves the last good saved copy in a few seconds and only spends up to 15 seconds on a live refresh for the newest license numbers, so a run finishes well under the Store's 5-minute test (and under shorter run timeouts). If the live refresh is cut short, licenses not yet downloaded are filled in from the saved copy. Raise this above 120 (for example to 900) and raise the run timeout if you want the Actor to wait for a full live file.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}