{
  "openapi": "3.0.1",
  "info": {
    "title": "Washington Contractor License Search — Official L&I Open Data",
    "description": "Every registered Washington State contractor from the Dept. of Labor & Industries official open-data feed (~161k licenses, ~75k active), refreshed daily. Name, license number, type & status, owner, specialties, dates, address, phone, UBI. Filter by city, type, status, name, specialty, or number.",
    "version": "1.0",
    "x-build-id": "zYpA7rmJ5zRlo1cCv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/keeganlabs~wa-contractor-licenses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-keeganlabs-wa-contractor-licenses",
        "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/keeganlabs~wa-contractor-licenses/runs": {
      "post": {
        "operationId": "runs-sync-keeganlabs-wa-contractor-licenses",
        "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/keeganlabs~wa-contractor-licenses/run-sync": {
      "post": {
        "operationId": "run-sync-keeganlabs-wa-contractor-licenses",
        "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": {
          "city": {
            "title": "City",
            "type": "string",
            "description": "Filter by city (partial match, case-insensitive). Example: Seattle, Spokane, Vancouver, Tacoma."
          },
          "licenseType": {
            "title": "License type code",
            "enum": [
              "CC",
              "EC",
              "PC",
              "LC"
            ],
            "type": "string",
            "description": "L&I contractor license-type code (exact match). CC = Construction Contractor, EC = Electrical Contractor, PC = Plumbing Contractor, LC = Elevator Contractor."
          },
          "status": {
            "title": "License status",
            "type": "string",
            "description": "Filter by license status. Accepts a one-letter status code (A=Active, E=Expired, S=Suspended, R=Re-Licensed, O=Out of Business, I=Inactive) or a status text substring. Defaults to Active unless 'Include all statuses' is on."
          },
          "includeAllStatuses": {
            "title": "Include all statuses (not just Active)",
            "type": "boolean",
            "description": "If true and no explicit status is set, returns licenses of every status (active, expired, suspended, out of business, etc.).",
            "default": false
          },
          "licenseNumber": {
            "title": "Contractor license number",
            "type": "string",
            "description": "Exact contractor license number (UBI-style L&I number), e.g. ECOSTSC758NN. Case-insensitive."
          },
          "nameContains": {
            "title": "Business or principal name contains",
            "type": "string",
            "description": "Free-text substring matched against both the business name and the primary principal (owner/officer) name, case-insensitive."
          },
          "specialtyContains": {
            "title": "Specialty contains",
            "type": "string",
            "description": "Substring matched against the license specialty descriptions (e.g. GENERAL, RESIDENTIAL, PLUMBING, ELECTRICAL, HEAT/AC)."
          },
          "effectiveFrom": {
            "title": "License effective on/after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include licenses whose effective (issue) date is on or after this date (ISO YYYY-MM-DD). Great for 'newly licensed this month' lead pulls."
          },
          "effectiveTo": {
            "title": "License effective on/before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include licenses whose effective (issue) date is on or before this date (ISO YYYY-MM-DD)."
          },
          "maxRecords": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Hard cap on the number of license records to return. The full dataset is ~161k rows (~75k Active).",
            "default": 5000
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional data.wa.gov / Socrata application token to raise API throttling limits. Not required — the API works without one."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}