{
  "openapi": "3.0.1",
  "info": {
    "title": "CSLB Contractor License Lookup | Status, Bond & Workers' Comp",
    "description": "California contractor licenses by number, business, person, city, ZIP, or trade. HIS registrations, expiration and lapse windows, and the public statewide list on request. Status, bond, workers' comp, personnel, and case numbers. Unmatched searches are not billed.",
    "version": "0.0",
    "x-build-id": "SfDzECZqkn2DTx1gf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~cslb-contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-cslb-contractor-license-lookup",
        "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/memo23~cslb-contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-memo23-cslb-contractor-license-lookup",
        "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/memo23~cslb-contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-cslb-contractor-license-lookup",
        "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",
            "type": "array",
            "description": "California contractor license numbers, up to 8 digits. A link to the official license page is accepted too. Example: 1087962.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "businessName": {
            "title": "Business name",
            "type": "string",
            "description": "Contractor business name. The first 10 to 15 letters are enough. Example: KB HOME. On its own, this returns the full license record. Combined with a city, county, ZIP, trade, or date window, it filters the statewide list.",
            "default": ""
          },
          "personnelLastName": {
            "title": "Personnel last name",
            "type": "string",
            "description": "Last name of a person on the license, such as an owner or qualifier. Example: BEBBER. Used when no license numbers or HIS registration are set. List filters are skipped for this search.",
            "default": ""
          },
          "personnelFirstName": {
            "title": "Personnel first name",
            "type": "string",
            "description": "Optional first name to narrow a personnel search. Example: ROLAND.",
            "default": ""
          },
          "hisNumber": {
            "title": "HIS registration number",
            "type": "string",
            "description": "HIS registration number. Example: 48070.",
            "default": ""
          },
          "hisLastName": {
            "title": "HIS last name",
            "type": "string",
            "description": "Last name on an HIS registration. Example: GARCIA. Used when no HIS number is set.",
            "default": ""
          },
          "hisFirstName": {
            "title": "HIS first name",
            "type": "string",
            "description": "Optional first name to narrow an HIS name search. Example: JOSE.",
            "default": ""
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City. Example: LOS ANGELES.",
            "default": ""
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "County. Example: San Diego.",
            "default": ""
          },
          "zipCode": {
            "title": "ZIP code",
            "type": "string",
            "description": "5-digit ZIP. Example: 90024.",
            "default": ""
          },
          "classification": {
            "title": "Classification",
            "type": "string",
            "description": "Trade code, such as B or C-10. Hyphens are ignored.",
            "default": ""
          },
          "licenseStatus": {
            "title": "License status",
            "type": "string",
            "description": "Active, Expired, Suspended, Revoked, Cancelled, or Inactive.",
            "default": ""
          },
          "licenseExpiresWithinDays": {
            "title": "License expires within days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep licenses whose expiration date falls within this many days. Example: 30, 60, or 90."
          },
          "workersCompExpiresWithinDays": {
            "title": "Workers' comp expires within days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep licenses whose workers' compensation policy expires within this many days."
          },
          "issuedWithinDays": {
            "title": "Issued within days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep licenses issued within this many days."
          },
          "lapseWithinDays": {
            "title": "Lapse within days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep licenses with a bond cancellation, a workers' compensation cancellation or suspension, or an inactivation in this many days. A license that is currently suspended is included too."
          },
          "exportAll": {
            "title": "Export the full list",
            "type": "boolean",
            "description": "Save the public statewide license list, still capped by Maximum licenses. Leave this off. An empty run looks up license 1087962. Every saved row is billed.",
            "default": false
          },
          "includeComplaintCases": {
            "title": "Include disciplinary cases",
            "type": "boolean",
            "description": "On a license number, business name, or personnel search, add the disciplinary case number, region, and reason when the statewide list has them. City, county, ZIP, and classification results already include those fields.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 300000,
            "type": "integer",
            "description": "How many records to save. Default 25. For the statewide list, raise this and turn on Export the full list. Every saved row is billed. Maximum 300000.",
            "default": 25
          },
          "includePersonnel": {
            "title": "Include personnel",
            "type": "boolean",
            "description": "Add the people currently associated with each license: name, title, association date, and classification. On a statewide-list search this is included for 200 records or fewer.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 23,
            "type": "integer",
            "description": "How many licenses to look up at once. Lower it if runs slow down or fail. Default 8, maximum 23.",
            "default": 8
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies recommended. The default works out of the box.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}