{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Feed: New & Suspended Licenses (WA, OR)",
    "description": "Newly licensed and newly suspended contractors in Washington (L&I) and Oregon (CCB), from the states' official open data. Filter by trade, city, ZIP, licence type. Schedule it and get only events you have not seen. No API key. Principal names never output.",
    "version": "0.0",
    "x-build-id": "bX5yYsg4yGg6daRM8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/asunoki~contractor-license-events-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-asunoki-contractor-license-events-feed",
        "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/asunoki~contractor-license-events-feed/runs": {
      "post": {
        "operationId": "runs-sync-asunoki-contractor-license-events-feed",
        "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/asunoki~contractor-license-events-feed/run-sync": {
      "post": {
        "operationId": "run-sync-asunoki-contractor-license-events-feed",
        "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": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "Leave empty for both.",
            "items": {
              "type": "string",
              "enum": [
                "WA",
                "OR"
              ],
              "enumTitles": [
                "Washington (L&I: construction, electrical, plumbing, elevator contractors)",
                "Oregon (CCB: residential and commercial contractors, home inspectors, lead-paint renovators)"
              ]
            }
          },
          "events": {
            "title": "Events",
            "type": "array",
            "description": "Leave empty for both. Oregon publishes active licences only, so suspensions are available for Washington only.",
            "items": {
              "type": "string",
              "enum": [
                "new-license",
                "suspended"
              ],
              "enumTitles": [
                "New licence (WA: licence effective date; OR: original registration date)",
                "Licence suspended (WA only; ~1,000 a month)"
              ]
            }
          },
          "keywords": {
            "title": "Trade keywords (any)",
            "type": "array",
            "description": "Only events whose business name, licence type or specialty contains at least one of these (case ignored), e.g. roof, electric, plumb, hvac, solar, landscap, paint, concrete.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop events whose business name, licence type or specialty contains any of these.",
            "items": {
              "type": "string"
            }
          },
          "licenseTypeCodes": {
            "title": "Licence type codes",
            "type": "array",
            "description": "WA: CC (construction), EC (electrical), PC (plumbing), LC (elevator). OR: RGC, RSC, RLC, RHIC, CGC1, CGC2, CSC1, CSC2, LBPR, RHISC, ... Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City of the business address, exact name (case ignored), e.g. Seattle, Spokane, Portland, Bend.",
            "items": {
              "type": "string"
            }
          },
          "zipPrefixes": {
            "title": "ZIP prefixes",
            "type": "array",
            "description": "3 to 5 digits of the business ZIP code, e.g. 980 (Seattle area) or 97209.",
            "items": {
              "type": "string"
            }
          },
          "registeredEntitiesOnly": {
            "title": "Registered business entities only",
            "type": "boolean",
            "description": "Keep only corporations, LLCs, partnerships and similar (WA business type; OR: a legal-form word such as LLC or INC in the name). Drops sole proprietors.",
            "default": false
          },
          "includeBusinessContact": {
            "title": "Include business street address and phone",
            "type": "boolean",
            "description": "Only for registered business entities; never for sole proprietors or names without a legal form. Off by default: some small LLCs register a home address or a mobile phone.",
            "default": false
          },
          "days": {
            "title": "Days to look back (Pacific dates)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Event dates read on every run: today and the days before it. For a daily schedule use 3, for a weekly schedule 8, so nothing falls between runs.",
            "default": 7
          },
          "onlyNew": {
            "title": "Only events not output before (for schedules)",
            "type": "boolean",
            "description": "Remembered per filter set in a named key-value store. Turn off to get the whole window every time.",
            "default": true
          },
          "maxItems": {
            "title": "Max events per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "You are charged per event stored, so this caps the cost of a run. Events cut by the limit stay new for the next run.",
            "default": 500
          },
          "stateStoreName": {
            "title": "State store name (advanced)",
            "type": "string",
            "description": "Leave empty to use the default."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}