{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Lookup & Leads: WA, OR, CT (Official Data)",
    "description": "Verify contractor licenses by number or name, export lists by trade, city or ZIP, and pull new-license and insurance or bond-expiring leads from Washington L&I, Oregon CCB and Connecticut DCP open data. $1.50 per 1,000 records.",
    "version": "1.0",
    "x-build-id": "KjsKPuepOPe2oBTgD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/singgendarhan~us-contractor-license-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-singgendarhan-us-contractor-license-search",
        "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/singgendarhan~us-contractor-license-search/runs": {
      "post": {
        "operationId": "runs-sync-singgendarhan-us-contractor-license-search",
        "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/singgendarhan~us-contractor-license-search/run-sync": {
      "post": {
        "operationId": "run-sync-singgendarhan-us-contractor-license-search",
        "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": [
              "leads",
              "verify",
              "export"
            ],
            "type": "string",
            "description": "leads = new licenses and licenses whose insurance, bond or license expires soon (set the feeds below). verify = check license numbers or business names. export = a list filtered by trade, city, ZIP and status.",
            "default": "leads"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "WA = Washington Department of Labor & Industries (construction, electrical, plumbing and elevator contractors, all statuses, with insurance). OR = Oregon Construction Contractors Board (active licenses only, with insurance and bond). CT = Connecticut Department of Consumer Protection (home improvement, new home, electrical, plumbing, HVAC and other contractor credentials, all statuses). Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "WA",
                "OR",
                "CT"
              ],
              "enumTitles": [
                "Washington (L&I)",
                "Oregon (CCB, active licenses only)",
                "Connecticut (DCP)"
              ]
            },
            "default": [
              "WA",
              "OR",
              "CT"
            ]
          },
          "leadTypes": {
            "title": "Lead feeds (leads mode)",
            "type": "array",
            "description": "new_license = licensed within the last N days (WA, OR, CT). insurance_expiring = liability insurance on file ends within N days (WA, OR). bond_expiring = surety bond on file expires within N days (OR). license_expiring = the license itself expires within N days (WA, OR, CT). A state that does not publish a feed is skipped for it.",
            "items": {
              "type": "string",
              "enum": [
                "new_license",
                "insurance_expiring",
                "bond_expiring",
                "license_expiring"
              ],
              "enumTitles": [
                "New licenses",
                "Insurance expiring",
                "Bond expiring",
                "License expiring"
              ]
            },
            "default": [
              "new_license",
              "insurance_expiring"
            ]
          },
          "licensedWithinDays": {
            "title": "New licenses: licensed within the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "For the new_license feed. 30 = licenses that took effect (WA), were first registered (OR) or were issued (CT) in the last 30 days.",
            "default": 30
          },
          "expiringWithinDays": {
            "title": "Expiring: within the next N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "For the insurance_expiring, bond_expiring and license_expiring feeds, from today. Verdicts also flag anything that ends within 30 days.",
            "default": 30
          },
          "licenseNumbers": {
            "title": "License numbers (verify mode)",
            "type": "array",
            "description": "One per line, up to 5,000. Washington: the 12-character L&I number, e.g. ECOSTSC758NN. Oregon: the CCB number, e.g. 100215. Connecticut: the credential with its prefix, e.g. HIC.0707645 (or CT:707645). Bare digits are treated as Oregon numbers when Oregon is selected. Numbers that are not found are listed in the run summary and are not charged.",
            "items": {
              "type": "string"
            }
          },
          "businessNames": {
            "title": "Business names (verify mode)",
            "type": "array",
            "description": "One per line, up to 500. Matches licenses whose business name (and in CT the DBA) contains the text, not case-sensitive, e.g. \"Cascade Heating\". Each name returns up to \"Max results per state\" records per state.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "License status",
            "enum": [
              "active",
              "inactive",
              "any"
            ],
            "type": "string",
            "description": "active = currently active licenses only. inactive = expired, suspended, revoked and similar (WA and CT; Oregon publishes active licenses only). any = both. Default: active for export, any for verify. Lead feeds always use active licenses."
          },
          "trade": {
            "title": "Trade or license type contains",
            "type": "string",
            "description": "Optional, not case-sensitive. Washington matches the license type and specialties (e.g. roofing, plumbing, electrical, HVAC, painting, landscaping, handyman). Connecticut matches the credential (e.g. home improvement, new home construction, electrical, plumbing, heating). Oregon publishes license classes only (e.g. residential general, commercial specialty), not trades."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Optional. Exact city of the license address, not case-sensitive, e.g. Seattle, Portland, Hartford."
          },
          "zipCodes": {
            "title": "ZIP codes or prefixes",
            "type": "array",
            "description": "Optional, up to 50. A 5-digit ZIP (98101) or a 3- or 4-digit prefix (981 = Seattle area).",
            "items": {
              "type": "string"
            }
          },
          "county": {
            "title": "County (Oregon only)",
            "type": "string",
            "description": "Optional. Oregon county, e.g. Multnomah. Washington and Connecticut do not publish a county, so they are skipped when this is set."
          },
          "businessNameContains": {
            "title": "Business name contains (export mode)",
            "type": "string",
            "description": "Optional filter for export mode, e.g. \"roofing\" or \"electric\"."
          },
          "maxResultsPerState": {
            "title": "Max results per state",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Export: records per state. Leads: records per state for each lead feed. Verify: records per state for each business name (license numbers are always all returned).",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new since my last run",
            "type": "boolean",
            "description": "For scheduled runs: skip licenses this same search already returned in an earlier run (they are not saved or charged). A new insurance or bond expiry date counts as new. Progress is kept in a named key-value store in your account (us-contractor-license-search-seen).",
            "default": false
          },
          "stateKey": {
            "title": "Only-new state name",
            "type": "string",
            "description": "Optional. Name for the only-new progress, e.g. \"seattle-roofers\". Leave empty to derive it from the search, so changing the search starts fresh."
          },
          "includeInsurance": {
            "title": "Add Washington insurance details",
            "type": "boolean",
            "description": "Adds the insurer, policy number, amount, dates and agency from the L&I insurance file to Washington records (one extra request per 100 records).",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}