{
  "openapi": "3.0.1",
  "info": {
    "title": "California Contractor License Lookup (CSLB): Owners & Bonds",
    "description": "Look up and export California CSLB contractor licenses from CSLB's official data files: ~245,000 licenses with owner/officer/RMO names, classifications, bond, workers' comp, phone & address. Search by name, owner or license #; filter by trade, county, city, ZIP, expiring or new.",
    "version": "1.0",
    "x-build-id": "98akvLTL36eWkpKHz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/spriggs-data~california-contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-spriggs-data-california-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/spriggs-data~california-contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-spriggs-data-california-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/spriggs-data~california-contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-spriggs-data-california-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": {
          "names": {
            "title": "Contractor / business / person names",
            "type": "array",
            "description": "Business, DBA, owner, officer or qualifier (RMO/RME) names. Every word must appear in the same name (case-insensitive; LLC/Inc/Co ignored): 'smith roofing' finds 'SMITH & SONS ROOFING INC', 'christopher moran' finds every license where he is an owner, officer or qualifier. Leave empty to list contractors by the filters below.",
            "items": {
              "type": "string"
            }
          },
          "licenseNumbers": {
            "title": "License numbers",
            "type": "array",
            "description": "CSLB license numbers to verify, e.g. '1000002'.",
            "items": {
              "type": "string"
            }
          },
          "trades": {
            "title": "Trades",
            "type": "array",
            "description": "Only contractors holding a CSLB classification in these trades (e.g. roofing = C-39, solar = C-46, electrical = C-10, plumbing = C-36, HVAC = C-20, general = A/B).",
            "items": {
              "type": "string",
              "enum": [
                "general",
                "home_improvement",
                "electrical",
                "plumbing",
                "hvac",
                "roofing",
                "elevator",
                "fire_protection",
                "glass_windows_siding",
                "concrete_masonry",
                "carpentry_finish",
                "landscaping",
                "excavation_demolition",
                "solar",
                "pool_spa",
                "sign",
                "lead_mold_asbestos",
                "alarm_security",
                "home_builder"
              ],
              "enumTitles": [
                "General contractor / builder",
                "Home improvement / remodeling",
                "Electrical",
                "Plumbing",
                "HVAC / A/C / heating / boiler",
                "Roofing & gutters",
                "Elevator / conveyor",
                "Fire protection / sprinklers",
                "Glass, windows, doors & siding",
                "Concrete, masonry, tile & paving",
                "Carpentry, drywall, flooring & painting",
                "Landscaping, trees & irrigation",
                "Excavation, demolition & well drilling",
                "Solar",
                "Pools & spas",
                "Signs",
                "Lead, mold & asbestos",
                "Alarm & security systems",
                "Home builders (Montgomery County MD)"
              ]
            }
          },
          "licenseTypeContains": {
            "title": "Classification codes (optional)",
            "type": "array",
            "description": "CSLB classification codes or names, e.g. 'C-10', 'C39', 'B-2', 'Solar'. Matches any license holding one of them.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Business city (exact name, case-insensitive), e.g. 'Sacramento', 'Fresno'.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "California county of the business address, e.g. 'Los Angeles', 'San Diego', 'Orange'.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Business ZIP (5 digits, or a prefix like '921').",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "License status",
            "enum": [
              "active",
              "any"
            ],
            "type": "string",
            "description": "Active only, or every status (useful for due-diligence checks).",
            "default": "active"
          },
          "expiringWithinDays": {
            "title": "Expiring within N days",
            "minimum": 1,
            "maximum": 730,
            "type": "integer",
            "description": "Only licenses whose expiration date is in the next N days: renewal / insurance / bonding leads."
          },
          "issuedAfter": {
            "title": "Issued on or after (newly licensed)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD. Only licenses first issued on or after this date: new-business leads."
          },
          "maxItems": {
            "title": "Max results (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on records saved (and charged) per run.",
            "default": 100
          },
          "includePersonnel": {
            "title": "Add owners, officers & qualifiers",
            "type": "boolean",
            "description": "Adds <code>personnel</code> (current sole owner, CEO/president, officers, RMO/RME qualifiers with their classifications and start dates) and <code>primaryContactName</code> / <code>primaryContactTitle</code> from CSLB's free Personnel file.",
            "default": true
          },
          "includeRaw": {
            "title": "Include raw source record",
            "type": "boolean",
            "description": "Adds the untouched original row under 'raw'.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}