{
  "openapi": "3.0.1",
  "info": {
    "title": "CA Contractor Licenses - CSLB Register (Bonds + Discipline)",
    "description": "California CSLB contractor license register (243k+ license rows): search by name, city, county, zip, status or license class, look up one license for its full record, and screen suspensions. Carries the surety-bond triple, workers comp coverage and discipline cases.",
    "version": "0.0",
    "x-build-id": "gjACNSaq2Dnb6jEAx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~ca-cslb-contractors/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-ca-cslb-contractors",
        "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/j0401~ca-cslb-contractors/runs": {
      "post": {
        "operationId": "runs-sync-j0401-ca-cslb-contractors",
        "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/j0401~ca-cslb-contractors/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-ca-cslb-contractors",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "",
              "search",
              "profile",
              "aggregate",
              "changes"
            ],
            "type": "string",
            "description": "search = filter the register. profile = one license's full record (needs licenseNumber). aggregate = one row per group. changes = the feed between the last two daily snapshots. Leave blank to auto-route."
          },
          "licenseNumber": {
            "title": "License number",
            "type": "string",
            "description": "Exact CSLB license number, e.g. \"1000002\" or \"724677\". With this set (and no other filter), returns that contractor's full record."
          },
          "businessName": {
            "title": "Business name",
            "type": "string",
            "description": "Business or contractor name, substring, case-insensitive (e.g. \"DOCKERY\" or \"SOUTH COAST\")."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Mailing city, substring, case-insensitive (e.g. \"Los Angeles\")."
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "County name, substring, case-insensitive (e.g. \"Los Angeles\", \"Orange\")."
          },
          "zipCode": {
            "title": "ZIP prefix",
            "type": "string",
            "description": "ZIP code prefix (digits only), e.g. \"900\" for Los Angeles."
          },
          "status": {
            "title": "Primary status",
            "enum": [
              "",
              "CLEAR",
              "Work Comp Susp",
              "Contr Bond Susp",
              "Liab Ins Susp",
              "Judgement Susp",
              "Family Sup Susp",
              "SOS Suspension",
              "Susp - No Qualifier",
              "Out Liab Susp",
              "Discp Bond SUSP",
              "EMP/WK Bnd Susp",
              "BOND Pay Susp",
              "QUAL Bond SUSP",
              "JDG Entity Susp",
              "J V Entity Susp",
              "O/L Entity Susp",
              "BND Pay EN Susp",
              "Cit Entity Susp",
              "Citation Susp",
              "ARB Suspension",
              "ARB Entity Susp"
            ],
            "type": "string",
            "description": "License status. Blank = all. CLEAR is the healthy value (~94.8%); everything else is a suspension code - the most useful pre-hire screening signal."
          },
          "businessType": {
            "title": "Business type",
            "enum": [
              "",
              "Sole Owner",
              "Corporation",
              "Limited Liability",
              "Partnership",
              "JointVenture"
            ],
            "type": "string",
            "description": "Legal form of the contractor. Blank = all."
          },
          "classification": {
            "title": "License classification",
            "type": "string",
            "description": "A CSLB license class token, e.g. \"B\" (General Building), \"C10\" (Electrical), \"C36\" (Sheet Metal). Matches a full class token exactly (no hyphen, not a substring), so \"B\" does not match \"C10\" or \"HB\"."
          },
          "hasDiscipline": {
            "title": "Disciplined licenses only",
            "type": "boolean",
            "description": "When on, returns only licenses carrying a discipline case (DBCaseNo / DiscpCaseRegion). ~1,800 rows.",
            "default": false
          },
          "aggregate": {
            "title": "Aggregate instead of records",
            "type": "boolean",
            "description": "When on, returns one summary record per group with count, instead of individual license rows.",
            "default": false
          },
          "changes": {
            "title": "Return the change feed",
            "type": "boolean",
            "description": "When on, returns the changes between the last two daily snapshots (added / removed / updated licenses, with changeType and changedFields) instead of records.",
            "default": false
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "businessType",
              "primaryStatus",
              "county",
              "wcCoverage",
              "state"
            ],
            "type": "string",
            "description": "businessType -> legal-form mix; primaryStatus -> clear vs suspended; county -> geographic mix; wcCoverage -> workers' comp coverage mix; state -> mailing-state mix.",
            "default": "county"
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of records pushed (0 = a reasonable ceiling of 200).",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}