{
  "data": {
    "id": "VCcndTW7GlfsHQbGV",
    "actId": "j1sWA3CfWr5xsbY9V",
    "userId": "zq8lKbpLzTjGDayPC",
    "startedAt": "2026-11-18T06:44:21.273Z",
    "finishedAt": "2026-11-18T06:44:23.419Z",
    "status": "SUCCEEDED",
    "meta": {
      "origin": "CLI"
    },
    "stats": {
      "durationMillis": 2027,
      "runTimeSecs": 2.027,
      "computeUnits": 0.0022522222222222223,
      "imageSizeBytes": 319194112
    },
    "options": {
      "useCache": true,
      "betaPackages": false,
      "memoryMbytes": 4096,
      "diskMbytes": 8192
    },
    "createdByOrganizationMemberUserId": "GK9YjZRyQZVzOdoH5",
    "exitCode": 0,
    "inputSchema": "{\n  \"title\": \"Washington L&I Contractor License Scraper Input\",\n  \"description\": \"Search Washington State Department of Labor & Industries (L&I) 'Verify a Contractor, Tradesperson or Business' registry by name, license/registration number, UBI, or workers' comp account ID.\",\n  \"type\": \"object\",\n  \"schemaVersion\": 1,\n  \"properties\": {\n    \"mode\": {\n      \"title\": \"Mode\",\n      \"type\": \"string\",\n      \"description\": \"How to search the L&I registry.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"byName\",\n        \"byLicenseId\",\n        \"byUbi\",\n        \"byAccountId\"\n      ],\n      \"enumTitles\": [\n        \"Search by name (business or individual)\",\n        \"Search by license / registration / certificate number\",\n        \"Search by UBI (Unified Business Identifier) number\",\n        \"Search by workers' comp account ID\"\n      ],\n      \"default\": \"byName\",\n      \"prefill\": \"byName\"\n    },\n    \"name\": {\n      \"title\": \"Name (mode=byName)\",\n      \"type\": \"string\",\n      \"description\": \"Business name or last name of an individual (e.g. `smith`, `abc construction`). Partial matches are supported, minimum 2 characters.\",\n      \"editor\": \"textfield\",\n      \"default\": \"smith\",\n      \"prefill\": \"smith\"\n    },\n    \"licenseId\": {\n      \"title\": \"License / registration / certificate number (mode=byLicenseId)\",\n      \"type\": \"string\",\n      \"description\": \"The contractor license, electrician/plumber certificate, or registration number (e.g. `ABCAR**824BB`, asterisks included where L&I's own record has them). Partial prefixes are supported.\",\n      \"editor\": \"textfield\",\n      \"prefill\": \"ABCAR**824BB\"\n    },\n    \"ubi\": {\n      \"title\": \"UBI number (mode=byUbi)\",\n      \"type\": \"string\",\n      \"description\": \"Washington Unified Business Identifier — exactly 9 digits (e.g. `604164913`).\",\n      \"editor\": \"textfield\",\n      \"prefill\": \"604164913\"\n    },\n    \"accountId\": {\n      \"title\": \"Workers' comp account ID (mode=byAccountId)\",\n      \"type\": \"string\",\n      \"description\": \"L&I workers' compensation account ID, e.g. `88160900` (digits only). Formatted legacy values such as `881,609-00` are accepted and normalized.\",\n      \"editor\": \"textfield\",\n      \"prefill\": \"88160900\"\n    },\n    \"city\": {\n      \"title\": \"Filter by city\",\n      \"type\": \"string\",\n      \"description\": \"Only emit results located in this Washington city (case-insensitive exact match, e.g. `Seattle`). Applied server-side alongside `mode`. Leave blank for all cities.\",\n      \"editor\": \"textfield\",\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"zipCode\": {\n      \"title\": \"Filter by zip code\",\n      \"type\": \"string\",\n      \"description\": \"Only emit results in this 5-digit Washington zip code (e.g. `98121`). Applied server-side alongside `mode`. Ignored if `city` is also set. Leave blank for all zip codes.\",\n      \"editor\": \"textfield\",\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"licenseCategory\": {\n      \"title\": \"Filter by license category\",\n      \"type\": \"string\",\n      \"description\": \"Only emit records whose contractor/trade type matches this category. Leave unset for all categories.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"\",\n        \"Construction Contractor\",\n        \"Electrical Contractor\",\n        \"Electrical Administrator\",\n        \"Electrical Trainee\",\n        \"Electrician\",\n        \"Master Electrician\",\n        \"Modified Trainee\",\n        \"Asbestos Contractor\",\n        \"Asbestos Supervisor\",\n        \"Asbestos Worker\",\n        \"Plumbing Contractor\",\n        \"Medical Gas\",\n        \"Plumber\",\n        \"Plumber Trainee\",\n        \"Modified Plumber Trainee\",\n        \"Elevator Primary Contact\",\n        \"Elevator Contractor\",\n        \"Elevator Mechanic\",\n        \"Elevator Mechanic Temporary\",\n        \"Manufactured Home Installer\"\n      ],\n      \"enumTitles\": [\n        \"All categories\",\n        \"Construction Contractor\",\n        \"Electrical Contractor\",\n        \"Electrical Administrator\",\n        \"Electrical Trainee\",\n        \"Electrician\",\n        \"Master Electrician\",\n        \"Modified Trainee (Electrical)\",\n        \"Asbestos Contractor\",\n        \"Asbestos Supervisor\",\n        \"Asbestos Worker\",\n        \"Plumbing Contractor\",\n        \"Medical Gas\",\n        \"Plumber\",\n        \"Plumber Trainee\",\n        \"Modified Plumber Trainee\",\n        \"Elevator Primary Contact\",\n        \"Elevator Contractor\",\n        \"Elevator Mechanic\",\n        \"Elevator Mechanic Temporary\",\n        \"Manufactured Home Installer\"\n      ],\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"statusFilter\": {\n      \"title\": \"Filter by license status\",\n      \"type\": \"string\",\n      \"description\": \"Only emit records with this top-level license status. Leave unset for all statuses.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"\",\n        \"active\",\n        \"inactive\",\n        \"expired\",\n        \"suspended\",\n        \"out of business\",\n        \"re-licensed\",\n        \"superseded\",\n        \"retest\"\n      ],\n      \"enumTitles\": [\n        \"All statuses\",\n        \"Active\",\n        \"Inactive\",\n        \"Expired\",\n        \"Suspended\",\n        \"Out of Business\",\n        \"Re-Licensed\",\n        \"Superseded\",\n        \"Retest\"\n      ],\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"violationsOnly\": {\n      \"title\": \"Only show licenses with violations\",\n      \"type\": \"boolean\",\n      \"description\": \"Only emit records that have a safety violation and/or contractor violation flagged (`hasSafetyViolation` or `hasContractorViolation`). Useful for compliance monitoring and vendor due diligence.\",\n      \"editor\": \"checkbox\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"sortBy\": {\n      \"title\": \"Sort by\",\n      \"type\": \"string\",\n      \"description\": \"Order of results: L&I's own relevance ranking, or business name.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"relevance\",\n        \"name\"\n      ],\n      \"enumTitles\": [\n        \"Best match (L&I relevance)\",\n        \"Business name\"\n      ],\n      \"default\": \"relevance\",\n      \"prefill\": \"relevance\"\n    },\n    \"sortOrder\": {\n      \"title\": \"Sort direction\",\n      \"type\": \"string\",\n      \"description\": \"Ascending or descending, applied to the selected Sort by field.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"desc\",\n        \"asc\"\n      ],\n      \"enumTitles\": [\n        \"Descending (Z-A / highest relevance first)\",\n        \"Ascending (A-Z)\"\n      ],\n      \"default\": \"desc\",\n      \"prefill\": \"desc\"\n    },\n    \"fetchDetails\": {\n      \"title\": \"Fetch full license details\",\n      \"type\": \"boolean\",\n      \"description\": \"Enrich each result with the full detail record: address, bonds, insurance, business owners, violations, associated licenses, and DOSH inspections. Adds one extra request per record, so it is capped by Max items.\",\n      \"editor\": \"checkbox\",\n      \"default\": true,\n      \"prefill\": true\n    },\n    \"maxItems\": {\n      \"title\": \"Max items\",\n      \"type\": \"integer\",\n      \"description\": \"Hard cap on emitted license records (1-500). Results are fetched 100 at a time.\",\n      \"minimum\": 1,\n      \"maximum\": 500,\n      \"default\": 10,\n      \"prefill\": 10\n    }\n  },\n  \"required\": [\n    \"mode\"\n  ]\n}",
    "readme": "# Washington L&I Contractor & Tradesperson License Scraper\n\nScrape **Washington State Department of Labor & Industries (L&I)** contractor, electrician, plumber, elevator, and asbestos-worker license records from the official \"Verify a Contractor, Tradesperson or Business\" public registry. Search by business/individual name, license or registration number, UBI (Unified Business Identifier), or workers' comp account ID. Optionally enrich every result with the full license detail record — address, surety bonds, liability insurance, business owners, associated licenses, and safety/contractor violations. No login, no API key, no proxy required.\n\n## What this actor does\n\n- **Four search modes:** by name, by license/registration/certificate number, by UBI number, by workers' comp account ID\n- **20 license categories covered:** general/specialty construction contractors, electrical (contractor, administrator, electrician, master electrician, trainee), plumbing (contractor, plumber, plumber trainee, medical gas), asbestos (contractor, supervisor, worker), elevator (contractor, mechanic, primary contact), and manufactured home installers\n- **Pagination:** fetches 100 results per request and keeps paging until `maxItems` or the result set is exhausted (up to 500 emitted records per run)\n- **Filters:** license category, license status, city, zip code, and violations-only — category, active status, city and zip are applied by L&I server-side as well as re-checked client-side\n- **Sort:** L&I relevance or business name, ascending or descending\n- **Optional detail enrichment:** attach full business detail — surety bonds, liability insurance, business owners/officers, associated licenses, workers'-comp accounts, safety and license violations, DOSH inspections\n- **Backward compatible:** input keys from older saved tasks (`query`, `maxResults`, `includeDetails`, …) are mapped in code, so existing tasks keep running\n- **Empty fields are omitted** — every record only contains data L&I actually returned for that license\n\n## Data source\n\nThis actor reads Washington State L&I's own public \"Verify a Contractor, Tradesperson or Business\" lookup tool — the same results the official website's search page shows. No login, API key, or proxy is required.\n\n## Output per license record\n\n- `licenseId` — the L&I license, registration, or certificate number\n- `ubi` — Washington Unified Business Identifier, when on file\n- `businessName` — business or individual licensee name\n- `contractorType` / `licenseType` — e.g. `Electrician`, `Asbestos Worker`, `General/Specialty Contractor`\n- `contractorGroup` — top-level category (e.g. `Electrical`, `Plumber`, `Asbestos`)\n- `asbestosGroup` — asbestos-program sub-classification, when the license is asbestos-related\n- `status` — `Active`, `Inactive`, `Expired`, `Suspended`, `Out of Business`, `Re-Licensed`, `Superseded`, or `Retest`\n- `statusDescription` — the raw L&I status text (e.g. `EXPIRED`, `ACTIVE`, `SUPERCEDED`) — detail mode only\n- `employerDisplayStatus` — L&I's workers'-comp employer-account display status, when on file\n- `city`, `state`, `zipCode`, `county`, `address1`, `address2`, `phoneNumber` — detail mode only for address/phone\n- `businessType` — e.g. `Limited Liability Company`, `Individual`, `Corporation`\n- `parentCompany` — parent/umbrella business, when on file\n- `effectiveDate`, `expirationDate`, `suspendDate` — ISO `YYYY-MM-DD`\n- `specialtyCode1`, `specialtyName1`, `specialtyText1` and `specialtyCode2`/`specialtyName2`/`specialtyText2` — construction contractor specialty classification\n- `contractorTypeDescription` — plain-language description of the license type\n- `licenseTypeCode` — L&I's internal short code for the license type (e.g. `CC`) — detail mode only\n- `relationType` — the licensee's relation type on the record (e.g. `Business`, `Individual`) — detail mode only\n- `hasSafetyViolation`, `hasContractorViolation` — boolean flags\n- `hasInactiveWorkersCompAccounts` — boolean\n- `associatedLicenses[]` — other licenses/registrations tied to the same business or person\n- `businessOwners[]` — owners/officers/partners, with role and start/end dates\n- `bonds[]` — surety bond company, account number, amount, effective/expiration dates\n- `insurances[]` — liability insurance firm, account ID, amount, effective/expiration dates\n- `savingsAccounts[]` — savings account assignment in lieu of bond, when on file\n- `violations[]`, `summons[]`, `warrants[]`, `debarments[]`, `strikes[]` — enforcement history, when on file\n- `lapses[]` — license lapse/reinstatement history\n- `courses[]`, `affidavits[]`, `codes[]` — continuing education and compliance records, when on file\n- `doshInspections[]` — Washington DOSH workplace safety inspection history, when on file\n- `workersCompAccounts[]` — workers'-comp account(s) on file: `accountId`, `legalName`, `dbaName`, `isCurrent`, `balanceCode`, `balanceMessage`, `estimatedWorkers`, `representative`, and `riskClasses[]` (class code, description, rate, effective date)\n- `hasActiveWorkersCompAccount` — `true` when at least one linked workers'-comp account is current\n- `governingPersons[]` — business governing persons on file\n- `employerBusinessDetails` — workers'-comp employer business record (legal name, business ID, address), when on file\n- `contractorTrackingUrl`, `contractorRegistrationUrl` — related L&I portal links\n- `sourceUrl` — canonical L&I Verify detail page URL for the license (includes the UBI for business licenses so L&I shows the full workers'-comp record)\n- `recordType: \"license\"`, `scrapedAt`\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | string | `byName` | `byName` / `byLicenseId` / `byUbi` / `byAccountId` |\n| `name` | string | `smith` | Business name or individual last name (mode=byName); min 2 characters |\n| `licenseId` | string | – | License/registration/certificate number, exact or prefix (mode=byLicenseId) |\n| `ubi` | string | – | 9-digit Washington UBI number (mode=byUbi) |\n| `accountId` | string | – | Workers' comp account ID, e.g. `88160900` (mode=byAccountId); formatted values like `881,609-00` are normalized |\n| `city` | string | – | Restrict results to a single Washington city (case-insensitive, applied server-side by L&I and re-checked client-side) |\n| `zipCode` | string | – | Restrict results to a single 5-digit Washington zip code (applied server-side by L&I and re-checked client-side; ignored if `city` is also set) |\n| `licenseCategory` | string | – | Restrict results to one of 20 license categories (applied server-side by L&I) |\n| `statusFilter` | string | – | `active` / `inactive` / `expired` / `suspended` / `out of business` / `re-licensed` / `superseded` / `retest` |\n| `violationsOnly` | boolean | `false` | Only emit records with a safety and/or contractor violation flagged |\n| `sortBy` | string | `relevance` | `relevance` (L&I best match) / `name` (business name) |\n| `sortOrder` | string | `desc` | `desc` / `asc`, applied to `sortBy` |\n| `fetchDetails` | boolean | `true` | Enrich each result with the full detail record (bonds, insurance, owners, violations, workers'-comp accounts, etc.) |\n| `maxItems` | integer | `10` | Hard cap on emitted license records (1–500) |\n\n### Example: search by business name with detail enrichment\n\n```json\n{\n  \"mode\": \"byName\",\n  \"name\": \"smith\",\n  \"fetchDetails\": true,\n  \"maxItems\": 20\n}\n```\n\n### Example: look up an exact license number\n\n```json\n{\n  \"mode\": \"byLicenseId\",\n  \"licenseId\": \"ABCAR**824BB\",\n  \"fetchDetails\": true\n}\n```\n\n### Example: search by UBI number, active licenses only\n\n```json\n{\n  \"mode\": \"byUbi\",\n  \"ubi\": \"604164913\",\n  \"statusFilter\": \"active\"\n}\n```\n\n### Example: browse all licensed electricians without detail hydration (faster)\n\n```json\n{\n  \"mode\": \"byName\",\n  \"name\": \"construction\",\n  \"licenseCategory\": \"Electrician\",\n  \"fetchDetails\": false,\n  \"maxItems\": 100\n}\n```\n\n### Example: search by name restricted to one city\n\n```json\n{\n  \"mode\": \"byName\",\n  \"name\": \"construction\",\n  \"city\": \"Spokane\",\n  \"maxItems\": 25\n}\n```\n\n### Example: compliance check for licenses with flagged violations\n\n```json\n{\n  \"mode\": \"byName\",\n  \"name\": \"construction\",\n  \"violationsOnly\": true,\n  \"maxItems\": 25\n}\n```\n\n## Use cases\n\n- **Due diligence** — verify a contractor's license, bond, and insurance status before hiring\n- **Compliance monitoring** — track license status and violation history for vendors and subcontractors\n- **Lead generation** — build lists of licensed contractors/tradespeople by category or region\n- **Insurance & surety underwriting** — cross-check bond and insurance coverage on file with L&I\n- **Legal & background research** — pull violation, debarment, and lapse history tied to a business or UBI\n\n## Limitations\n\n- **500 records per run** (`maxItems` ceiling). L&I's search API returns at most 100 rows per page and has no cursor/export endpoint, so very broad queries are split by licence category, location or name prefix.\n- **Scan ceiling:** to satisfy client-side filters (non-active statuses, violations-only), the actor scans up to 5,000 search matches per run. If a filter matches only records beyond that point, the run reports `scanned N of M matches` in its status message instead of pretending it saw everything.\n- **Server-side filter scope:** category, active status, city and zip code are applied by L&I; other statuses and `violationsOnly` are checked over the scanned rows.\n- **Violation-only search rows** (a violation with no licence number) are not part of this licence dataset; they carry no licence record to enrich. Search by the business name or UBI to reach the related licence instead.\n- **Detail enrichment is one request per record.** For large runs without bonds/insurance/workers'-comp data, set `fetchDetails` to `false`.\n\n## FAQ\n\n**Do my existing saved tasks keep working?**\nYes. Older input keys such as `query`/`searchQuery`, `maxResults`, `includeDetails`, `licenseNumber`, `ubiNumber`, `accountNumber` and `category` are mapped to the current fields in code. The legacy `statusFilter: \"archived\"` value is still honoured too.\n\n**How many results can one run return?**\nUp to 500 (`maxItems`). The actor pages 100 rows at a time and stops at `maxItems`, when L&I has no more matches, or at the 5,000-row scan ceiling. The run's status message states how many matches were scanned.\n\n**What is the data source?**\nThis actor uses Washington State Department of Labor & Industries' own public \"Verify a Contractor, Tradesperson or Business\" lookup tool at `secure.lni.wa.gov/verify`. It is a genuine public REST API with no authentication requirement — the same data the L&I website itself displays.\n\n**Is this affiliated with Washington State L&I?**\nNo. This is an independent, third-party actor that reads L&I's public verification data. It is not affiliated with or endorsed by the Washington State Department of Labor & Industries.\n\n**Why does `fetchDetails` matter?**\nSearch results alone give you the license number, business name, category, and basic status. Turning on `fetchDetails` (the default) fetches the full record for each result — address, bonds, insurance, business owners, and violation history — at the cost of one extra request per record. Turn it off for faster, lighter-weight bulk name/category browsing.\n\n**Why are some fields missing on certain licenses?**\nL&I only returns the fields it has on file for a given license. Bonds, insurance, and violation history are commonly empty for license types that don't require them (e.g. individual trade certifications like Electrician or Asbestos Worker don't carry bond/insurance records the way business contractor licenses do). Empty fields are always omitted rather than shown as blank or null.\n\n**What's the difference between \"Construction Contractor\" and the electrical/plumbing/asbestos/elevator categories?**\n\"Construction Contractor\" is L&I's general contractor and specialty-trade contractor registration (bonded businesses). Electrical, plumbing, asbestos, and elevator categories are separate certification/licensing programs for individual tradespeople and specialty contractors in those disciplines, each with their own bonding/insurance rules.\n\n**How fresh is the data?**\nEvery run queries the live L&I API directly — there is no caching layer, so results reflect L&I's registry at the moment the actor runs.\n\n**Can I narrow results to a specific city or zip code?**\nYes. Set `city` (e.g. `Seattle`) or `zipCode` (e.g. `98121`) alongside any search `mode` — L&I's own registry applies the location filter server-side on top of your name/license/UBI/account search, the same as the location dropdown on the official Verify tool's results page. If both are set, `city` takes priority.\n\n**Can I search by partial name?**\nYes. `name` (mode=byName) and `licenseId` (mode=byLicenseId) both support partial/prefix matching, mirroring L&I's own search behavior — the same as typing into the site's search box.\n\n**Does this include Washington's professional licenses (real estate, cosmetology, etc.)?**\nNo — those are handled by a different Washington State agency (the Department of Licensing, DOL) with a separate lookup tool. This actor is scoped to L&I's contractor, tradesperson, and workers'-comp registry only.\n",
    "actorDefinition": {
      "actorSpecification": 1,
      "name": "washington-l-and-i-contractor-and-tradesperson",
      "title": "Washington L&I Contractor & Tradesperson License Scraper",
      "description": "Search Washington L&I contractor, electrician, plumber, and asbestos-worker licenses by name, license number, UBI, or workers' comp account ID. Optional detail enrichment with bonds, insurance, workers' comp accounts, and violations. No login required.",
      "version": "1.0",
      "buildTag": "latest",
      "dockerfile": "../Dockerfile",
      "readme": "# Washington L&I Contractor & Tradesperson License Scraper\n\nScrape **Washington State Department of Labor & Industries (L&I)** contractor, electrician, plumber, elevator, and asbestos-worker license records from the official \"Verify a Contractor, Tradesperson or Business\" public registry. Search by business/individual name, license or registration number, UBI (Unified Business Identifier), or workers' comp account ID. Optionally enrich every result with the full license detail record — address, surety bonds, liability insurance, business owners, associated licenses, and safety/contractor violations. No login, no API key, no proxy required.\n\n## What this actor does\n\n- **Four search modes:** by name, by license/registration/certificate number, by UBI number, by workers' comp account ID\n- **20 license categories covered:** general/specialty construction contractors, electrical (contractor, administrator, electrician, master electrician, trainee), plumbing (contractor, plumber, plumber trainee, medical gas), asbestos (contractor, supervisor, worker), elevator (contractor, mechanic, primary contact), and manufactured home installers\n- **Pagination:** fetches 100 results per request and keeps paging until `maxItems` or the result set is exhausted (up to 500 emitted records per run)\n- **Filters:** license category, license status, city, zip code, and violations-only — category, active status, city and zip are applied by L&I server-side as well as re-checked client-side\n- **Sort:** L&I relevance or business name, ascending or descending\n- **Optional detail enrichment:** attach full business detail — surety bonds, liability insurance, business owners/officers, associated licenses, workers'-comp accounts, safety and license violations, DOSH inspections\n- **Backward compatible:** input keys from older saved tasks (`query`, `maxResults`, `includeDetails`, …) are mapped in code, so existing tasks keep running\n- **Empty fields are omitted** — every record only contains data L&I actually returned for that license\n\n## Data source\n\nThis actor reads Washington State L&I's own public \"Verify a Contractor, Tradesperson or Business\" lookup tool — the same results the official website's search page shows. No login, API key, or proxy is required.\n\n## Output per license record\n\n- `licenseId` — the L&I license, registration, or certificate number\n- `ubi` — Washington Unified Business Identifier, when on file\n- `businessName` — business or individual licensee name\n- `contractorType` / `licenseType` — e.g. `Electrician`, `Asbestos Worker`, `General/Specialty Contractor`\n- `contractorGroup` — top-level category (e.g. `Electrical`, `Plumber`, `Asbestos`)\n- `asbestosGroup` — asbestos-program sub-classification, when the license is asbestos-related\n- `status` — `Active`, `Inactive`, `Expired`, `Suspended`, `Out of Business`, `Re-Licensed`, `Superseded`, or `Retest`\n- `statusDescription` — the raw L&I status text (e.g. `EXPIRED`, `ACTIVE`, `SUPERCEDED`) — detail mode only\n- `employerDisplayStatus` — L&I's workers'-comp employer-account display status, when on file\n- `city`, `state`, `zipCode`, `county`, `address1`, `address2`, `phoneNumber` — detail mode only for address/phone\n- `businessType` — e.g. `Limited Liability Company`, `Individual`, `Corporation`\n- `parentCompany` — parent/umbrella business, when on file\n- `effectiveDate`, `expirationDate`, `suspendDate` — ISO `YYYY-MM-DD`\n- `specialtyCode1`, `specialtyName1`, `specialtyText1` and `specialtyCode2`/`specialtyName2`/`specialtyText2` — construction contractor specialty classification\n- `contractorTypeDescription` — plain-language description of the license type\n- `licenseTypeCode` — L&I's internal short code for the license type (e.g. `CC`) — detail mode only\n- `relationType` — the licensee's relation type on the record (e.g. `Business`, `Individual`) — detail mode only\n- `hasSafetyViolation`, `hasContractorViolation` — boolean flags\n- `hasInactiveWorkersCompAccounts` — boolean\n- `associatedLicenses[]` — other licenses/registrations tied to the same business or person\n- `businessOwners[]` — owners/officers/partners, with role and start/end dates\n- `bonds[]` — surety bond company, account number, amount, effective/expiration dates\n- `insurances[]` — liability insurance firm, account ID, amount, effective/expiration dates\n- `savingsAccounts[]` — savings account assignment in lieu of bond, when on file\n- `violations[]`, `summons[]`, `warrants[]`, `debarments[]`, `strikes[]` — enforcement history, when on file\n- `lapses[]` — license lapse/reinstatement history\n- `courses[]`, `affidavits[]`, `codes[]` — continuing education and compliance records, when on file\n- `doshInspections[]` — Washington DOSH workplace safety inspection history, when on file\n- `workersCompAccounts[]` — workers'-comp account(s) on file: `accountId`, `legalName`, `dbaName`, `isCurrent`, `balanceCode`, `balanceMessage`, `estimatedWorkers`, `representative`, and `riskClasses[]` (class code, description, rate, effective date)\n- `hasActiveWorkersCompAccount` — `true` when at least one linked workers'-comp account is current\n- `governingPersons[]` — business governing persons on file\n- `employerBusinessDetails` — workers'-comp employer business record (legal name, business ID, address), when on file\n- `contractorTrackingUrl`, `contractorRegistrationUrl` — related L&I portal links\n- `sourceUrl` — canonical L&I Verify detail page URL for the license (includes the UBI for business licenses so L&I shows the full workers'-comp record)\n- `recordType: \"license\"`, `scrapedAt`\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | string | `byName` | `byName` / `byLicenseId` / `byUbi` / `byAccountId` |\n| `name` | string | `smith` | Business name or individual last name (mode=byName); min 2 characters |\n| `licenseId` | string | – | License/registration/certificate number, exact or prefix (mode=byLicenseId) |\n| `ubi` | string | – | 9-digit Washington UBI number (mode=byUbi) |\n| `accountId` | string | – | Workers' comp account ID, e.g. `88160900` (mode=byAccountId); formatted values like `881,609-00` are normalized |\n| `city` | string | – | Restrict results to a single Washington city (case-insensitive, applied server-side by L&I and re-checked client-side) |\n| `zipCode` | string | – | Restrict results to a single 5-digit Washington zip code (applied server-side by L&I and re-checked client-side; ignored if `city` is also set) |\n| `licenseCategory` | string | – | Restrict results to one of 20 license categories (applied server-side by L&I) |\n| `statusFilter` | string | – | `active` / `inactive` / `expired` / `suspended` / `out of business` / `re-licensed` / `superseded` / `retest` |\n| `violationsOnly` | boolean | `false` | Only emit records with a safety and/or contractor violation flagged |\n| `sortBy` | string | `relevance` | `relevance` (L&I best match) / `name` (business name) |\n| `sortOrder` | string | `desc` | `desc` / `asc`, applied to `sortBy` |\n| `fetchDetails` | boolean | `true` | Enrich each result with the full detail record (bonds, insurance, owners, violations, workers'-comp accounts, etc.) |\n| `maxItems` | integer | `10` | Hard cap on emitted license records (1–500) |\n\n### Example: search by business name with detail enrichment\n\n```json\n{\n  \"mode\": \"byName\",\n  \"name\": \"smith\",\n  \"fetchDetails\": true,\n  \"maxItems\": 20\n}\n```\n\n### Example: look up an exact license number\n\n```json\n{\n  \"mode\": \"byLicenseId\",\n  \"licenseId\": \"ABCAR**824BB\",\n  \"fetchDetails\": true\n}\n```\n\n### Example: search by UBI number, active licenses only\n\n```json\n{\n  \"mode\": \"byUbi\",\n  \"ubi\": \"604164913\",\n  \"statusFilter\": \"active\"\n}\n```\n\n### Example: browse all licensed electricians without detail hydration (faster)\n\n```json\n{\n  \"mode\": \"byName\",\n  \"name\": \"construction\",\n  \"licenseCategory\": \"Electrician\",\n  \"fetchDetails\": false,\n  \"maxItems\": 100\n}\n```\n\n### Example: search by name restricted to one city\n\n```json\n{\n  \"mode\": \"byName\",\n  \"name\": \"construction\",\n  \"city\": \"Spokane\",\n  \"maxItems\": 25\n}\n```\n\n### Example: compliance check for licenses with flagged violations\n\n```json\n{\n  \"mode\": \"byName\",\n  \"name\": \"construction\",\n  \"violationsOnly\": true,\n  \"maxItems\": 25\n}\n```\n\n## Use cases\n\n- **Due diligence** — verify a contractor's license, bond, and insurance status before hiring\n- **Compliance monitoring** — track license status and violation history for vendors and subcontractors\n- **Lead generation** — build lists of licensed contractors/tradespeople by category or region\n- **Insurance & surety underwriting** — cross-check bond and insurance coverage on file with L&I\n- **Legal & background research** — pull violation, debarment, and lapse history tied to a business or UBI\n\n## Limitations\n\n- **500 records per run** (`maxItems` ceiling). L&I's search API returns at most 100 rows per page and has no cursor/export endpoint, so very broad queries are split by licence category, location or name prefix.\n- **Scan ceiling:** to satisfy client-side filters (non-active statuses, violations-only), the actor scans up to 5,000 search matches per run. If a filter matches only records beyond that point, the run reports `scanned N of M matches` in its status message instead of pretending it saw everything.\n- **Server-side filter scope:** category, active status, city and zip code are applied by L&I; other statuses and `violationsOnly` are checked over the scanned rows.\n- **Violation-only search rows** (a violation with no licence number) are not part of this licence dataset; they carry no licence record to enrich. Search by the business name or UBI to reach the related licence instead.\n- **Detail enrichment is one request per record.** For large runs without bonds/insurance/workers'-comp data, set `fetchDetails` to `false`.\n\n## FAQ\n\n**Do my existing saved tasks keep working?**\nYes. Older input keys such as `query`/`searchQuery`, `maxResults`, `includeDetails`, `licenseNumber`, `ubiNumber`, `accountNumber` and `category` are mapped to the current fields in code. The legacy `statusFilter: \"archived\"` value is still honoured too.\n\n**How many results can one run return?**\nUp to 500 (`maxItems`). The actor pages 100 rows at a time and stops at `maxItems`, when L&I has no more matches, or at the 5,000-row scan ceiling. The run's status message states how many matches were scanned.\n\n**What is the data source?**\nThis actor uses Washington State Department of Labor & Industries' own public \"Verify a Contractor, Tradesperson or Business\" lookup tool at `secure.lni.wa.gov/verify`. It is a genuine public REST API with no authentication requirement — the same data the L&I website itself displays.\n\n**Is this affiliated with Washington State L&I?**\nNo. This is an independent, third-party actor that reads L&I's public verification data. It is not affiliated with or endorsed by the Washington State Department of Labor & Industries.\n\n**Why does `fetchDetails` matter?**\nSearch results alone give you the license number, business name, category, and basic status. Turning on `fetchDetails` (the default) fetches the full record for each result — address, bonds, insurance, business owners, and violation history — at the cost of one extra request per record. Turn it off for faster, lighter-weight bulk name/category browsing.\n\n**Why are some fields missing on certain licenses?**\nL&I only returns the fields it has on file for a given license. Bonds, insurance, and violation history are commonly empty for license types that don't require them (e.g. individual trade certifications like Electrician or Asbestos Worker don't carry bond/insurance records the way business contractor licenses do). Empty fields are always omitted rather than shown as blank or null.\n\n**What's the difference between \"Construction Contractor\" and the electrical/plumbing/asbestos/elevator categories?**\n\"Construction Contractor\" is L&I's general contractor and specialty-trade contractor registration (bonded businesses). Electrical, plumbing, asbestos, and elevator categories are separate certification/licensing programs for individual tradespeople and specialty contractors in those disciplines, each with their own bonding/insurance rules.\n\n**How fresh is the data?**\nEvery run queries the live L&I API directly — there is no caching layer, so results reflect L&I's registry at the moment the actor runs.\n\n**Can I narrow results to a specific city or zip code?**\nYes. Set `city` (e.g. `Seattle`) or `zipCode` (e.g. `98121`) alongside any search `mode` — L&I's own registry applies the location filter server-side on top of your name/license/UBI/account search, the same as the location dropdown on the official Verify tool's results page. If both are set, `city` takes priority.\n\n**Can I search by partial name?**\nYes. `name` (mode=byName) and `licenseId` (mode=byLicenseId) both support partial/prefix matching, mirroring L&I's own search behavior — the same as typing into the site's search box.\n\n**Does this include Washington's professional licenses (real estate, cosmetology, etc.)?**\nNo — those are handled by a different Washington State agency (the Department of Licensing, DOL) with a separate lookup tool. This actor is scoped to L&I's contractor, tradesperson, and workers'-comp registry only.\n",
      "input": {
        "title": "Washington L&I Contractor License Scraper Input",
        "description": "Search Washington State Department of Labor & Industries (L&I) 'Verify a Contractor, Tradesperson or Business' registry by name, license/registration number, UBI, or workers' comp account ID.",
        "type": "object",
        "schemaVersion": 1,
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "How to search the L&I registry.",
            "editor": "select",
            "enum": [
              "byName",
              "byLicenseId",
              "byUbi",
              "byAccountId"
            ],
            "enumTitles": [
              "Search by name (business or individual)",
              "Search by license / registration / certificate number",
              "Search by UBI (Unified Business Identifier) number",
              "Search by workers' comp account ID"
            ],
            "default": "byName",
            "prefill": "byName"
          },
          "name": {
            "title": "Name (mode=byName)",
            "type": "string",
            "description": "Business name or last name of an individual (e.g. `smith`, `abc construction`). Partial matches are supported, minimum 2 characters.",
            "editor": "textfield",
            "default": "smith",
            "prefill": "smith"
          },
          "licenseId": {
            "title": "License / registration / certificate number (mode=byLicenseId)",
            "type": "string",
            "description": "The contractor license, electrician/plumber certificate, or registration number (e.g. `ABCAR**824BB`, asterisks included where L&I's own record has them). Partial prefixes are supported.",
            "editor": "textfield",
            "prefill": "ABCAR**824BB"
          },
          "ubi": {
            "title": "UBI number (mode=byUbi)",
            "type": "string",
            "description": "Washington Unified Business Identifier — exactly 9 digits (e.g. `604164913`).",
            "editor": "textfield",
            "prefill": "604164913"
          },
          "accountId": {
            "title": "Workers' comp account ID (mode=byAccountId)",
            "type": "string",
            "description": "L&I workers' compensation account ID, e.g. `88160900` (digits only). Formatted legacy values such as `881,609-00` are accepted and normalized.",
            "editor": "textfield",
            "prefill": "88160900"
          },
          "city": {
            "title": "Filter by city",
            "type": "string",
            "description": "Only emit results located in this Washington city (case-insensitive exact match, e.g. `Seattle`). Applied server-side alongside `mode`. Leave blank for all cities.",
            "editor": "textfield",
            "default": "",
            "prefill": ""
          },
          "zipCode": {
            "title": "Filter by zip code",
            "type": "string",
            "description": "Only emit results in this 5-digit Washington zip code (e.g. `98121`). Applied server-side alongside `mode`. Ignored if `city` is also set. Leave blank for all zip codes.",
            "editor": "textfield",
            "default": "",
            "prefill": ""
          },
          "licenseCategory": {
            "title": "Filter by license category",
            "type": "string",
            "description": "Only emit records whose contractor/trade type matches this category. Leave unset for all categories.",
            "editor": "select",
            "enum": [
              "",
              "Construction Contractor",
              "Electrical Contractor",
              "Electrical Administrator",
              "Electrical Trainee",
              "Electrician",
              "Master Electrician",
              "Modified Trainee",
              "Asbestos Contractor",
              "Asbestos Supervisor",
              "Asbestos Worker",
              "Plumbing Contractor",
              "Medical Gas",
              "Plumber",
              "Plumber Trainee",
              "Modified Plumber Trainee",
              "Elevator Primary Contact",
              "Elevator Contractor",
              "Elevator Mechanic",
              "Elevator Mechanic Temporary",
              "Manufactured Home Installer"
            ],
            "enumTitles": [
              "All categories",
              "Construction Contractor",
              "Electrical Contractor",
              "Electrical Administrator",
              "Electrical Trainee",
              "Electrician",
              "Master Electrician",
              "Modified Trainee (Electrical)",
              "Asbestos Contractor",
              "Asbestos Supervisor",
              "Asbestos Worker",
              "Plumbing Contractor",
              "Medical Gas",
              "Plumber",
              "Plumber Trainee",
              "Modified Plumber Trainee",
              "Elevator Primary Contact",
              "Elevator Contractor",
              "Elevator Mechanic",
              "Elevator Mechanic Temporary",
              "Manufactured Home Installer"
            ],
            "default": "",
            "prefill": ""
          },
          "statusFilter": {
            "title": "Filter by license status",
            "type": "string",
            "description": "Only emit records with this top-level license status. Leave unset for all statuses.",
            "editor": "select",
            "enum": [
              "",
              "active",
              "inactive",
              "expired",
              "suspended",
              "out of business",
              "re-licensed",
              "superseded",
              "retest"
            ],
            "enumTitles": [
              "All statuses",
              "Active",
              "Inactive",
              "Expired",
              "Suspended",
              "Out of Business",
              "Re-Licensed",
              "Superseded",
              "Retest"
            ],
            "default": "",
            "prefill": ""
          },
          "violationsOnly": {
            "title": "Only show licenses with violations",
            "type": "boolean",
            "description": "Only emit records that have a safety violation and/or contractor violation flagged (`hasSafetyViolation` or `hasContractorViolation`). Useful for compliance monitoring and vendor due diligence.",
            "editor": "checkbox",
            "default": false,
            "prefill": false
          },
          "sortBy": {
            "title": "Sort by",
            "type": "string",
            "description": "Order of results: L&I's own relevance ranking, or business name.",
            "editor": "select",
            "enum": [
              "relevance",
              "name"
            ],
            "enumTitles": [
              "Best match (L&I relevance)",
              "Business name"
            ],
            "default": "relevance",
            "prefill": "relevance"
          },
          "sortOrder": {
            "title": "Sort direction",
            "type": "string",
            "description": "Ascending or descending, applied to the selected Sort by field.",
            "editor": "select",
            "enum": [
              "desc",
              "asc"
            ],
            "enumTitles": [
              "Descending (Z-A / highest relevance first)",
              "Ascending (A-Z)"
            ],
            "default": "desc",
            "prefill": "desc"
          },
          "fetchDetails": {
            "title": "Fetch full license details",
            "type": "boolean",
            "description": "Enrich each result with the full detail record: address, bonds, insurance, business owners, violations, associated licenses, and DOSH inspections. Adds one extra request per record, so it is capped by Max items.",
            "editor": "checkbox",
            "default": true,
            "prefill": true
          },
          "maxItems": {
            "title": "Max items",
            "type": "integer",
            "description": "Hard cap on emitted license records (1-500). Results are fetched 100 at a time.",
            "minimum": 1,
            "maximum": 500,
            "default": 10,
            "prefill": 10
          }
        },
        "required": [
          "mode"
        ]
      },
      "output": {
        "actorOutputSchemaVersion": 1,
        "title": "Washington L&I Contractor & Tradesperson License Scraper Output",
        "description": "Washington State L&I contractor, electrician, plumber, elevator, and asbestos-worker license records — business/licensee details, status, bonds, insurance, violations, and associated licenses.",
        "properties": {
          "licenses": {
            "type": "string",
            "title": "Washington L&I licenses",
            "description": "Dataset containing all scraped Washington L&I license records.",
            "template": "{{links.apiDefaultDatasetUrl}}/items"
          }
        }
      },
      "storages": {
        "dataset": {
          "actorSpecification": 1,
          "views": {
            "overview": {
              "title": "Licenses",
              "transformation": {
                "fields": [
                  "businessName",
                  "licenseId",
                  "contractorType",
                  "status",
                  "city",
                  "state",
                  "expirationDate",
                  "sourceUrl"
                ]
              },
              "display": {
                "component": "table",
                "properties": {}
              }
            }
          }
        }
      },
      "environmentVariables": {}
    },
    "buildNumber": "1.0.2",
    "imageDigest": "24fd8fb04dd55419218335c844ca5bca34de99fd27eafa4362525babac1d673f",
    "actVersion": {
      "sourceType": "SOURCE_FILES",
      "buildTag": "latest",
      "versionNumber": "1.0"
    },
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0.0022522222222222223
    }
  }
}