{
  "openapi": "3.0.1",
  "info": {
    "title": "US Contractor License Lead Feed (New Licensees + Alerts)",
    "description": "Official contractor license data from WA, TX, CA, AZ and OR in one clean schema. Filter by trade, city, ZIP, county, status and issue date. New-licensee feed, suspended/expired alerts, optional verified website. Pay per row.",
    "version": "0.1",
    "x-build-id": "IIceY69hJ0XnHk8pn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/latentlark~contractor-license-lead-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-latentlark-contractor-license-lead-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/latentlark~contractor-license-lead-feed/runs": {
      "post": {
        "operationId": "runs-sync-latentlark-contractor-license-lead-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/latentlark~contractor-license-lead-feed/run-sync": {
      "post": {
        "operationId": "run-sync-latentlark-contractor-license-lead-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": "Official state boards to read. WA (L&I), TX (TDLR), CA (CSLB), AZ (ROC), OR (CCB). Each state is fetched independently: if one board is down, the others still deliver.",
            "items": {
              "type": "string",
              "enum": [
                "WA",
                "TX",
                "CA",
                "AZ",
                "OR"
              ],
              "enumTitles": [
                "Washington (L&I)",
                "Texas (TDLR)",
                "California (CSLB)",
                "Arizona (ROC)",
                "Oregon (CCB)"
              ]
            },
            "default": [
              "WA"
            ]
          },
          "trades": {
            "title": "Trades",
            "type": "array",
            "description": "Optional. Plain trades like plumbing, electrical, hvac, roofing, solar, pool, painting, landscaping, general, or a board code like C-36 (CA) or CR-42 (AZ). Supported trade words: general, plumbing, electrical, hvac, roofing, solar, pool, painting, landscaping, flooring, concrete, masonry, tile, drywall, insulation, carpentry, fencing, glass, fire-protection, low-voltage, security, sign, elevator, well-drilling, demolition, excavation, tree, siding, gutters, garage-doors, handyman, appliance, sheet-metal, asbestos. Empty = all trades (California needs at least one trade).",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Optional. Business city as listed by the board, e.g. Seattle, Austin, Phoenix. Exact city name, case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Optional. 5-digit business ZIP codes.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Optional. County names without the word County, e.g. King, Travis, Maricopa. For WA and AZ the county comes from the ZIP code (US Census ZIP-to-county file).",
            "items": {
              "type": "string"
            }
          },
          "licenseStatus": {
            "title": "License status",
            "type": "array",
            "description": "Which license statuses to return. Default: ACTIVE only. Pick ANY to include every status. Status-change alerts are always reported whatever you pick here.",
            "items": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "SUSPENDED",
                "EXPIRED",
                "REVOKED",
                "INACTIVE",
                "OTHER",
                "ANY"
              ]
            },
            "default": [
              "ACTIVE"
            ]
          },
          "issuedAfter": {
            "title": "Issued on or after",
            "type": "string",
            "description": "Optional. YYYY-MM-DD, or a relative window like 30 days or 6 months (= licensed in the last 30 days / 6 months). Texas publishes no issue date, so Texas is skipped (with an explanation row) when this is set."
          },
          "issuedBefore": {
            "title": "Issued on or before",
            "type": "string",
            "description": "Optional. YYYY-MM-DD or a relative value like 1 year."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "all",
              "newSinceLastRun",
              "statusChanges",
              "newAndStatusChanges"
            ],
            "type": "string",
            "description": "All matching licenses, or a monitoring feed. Monitoring modes compare with the snapshot saved by your previous run with the same filters and return only what changed. The first monitoring run saves the baseline.",
            "default": "all"
          },
          "maxResults": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on charged rows for the run. Split evenly across states unless you set Max rows per state.",
            "default": 100
          },
          "maxResultsPerState": {
            "title": "Max rows per state (optional)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional cap per state. Empty = Max rows divided by the number of states."
          },
          "enrichWebsites": {
            "title": "Find verified websites (+$0.004 each found)",
            "type": "boolean",
            "description": "Off by default. Looks up each business's own website with a web search and keeps it only when the homepage shows the license phone number or the exact business name. Never guessed. Skipped for licenses held in a person's own name. Adds a few seconds per row.",
            "default": false
          },
          "maxWebsiteLookups": {
            "title": "Max website lookups",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Caps website lookups per run. Rows beyond the cap are delivered without a website.",
            "default": 50
          },
          "emitAllOnFirstRun": {
            "title": "First monitoring run returns current matches",
            "type": "boolean",
            "description": "In monitoring modes, the first run (no snapshot yet) returns the currently matching licenses (up to Max rows) as the baseline. Turn off to only save the baseline silently (free).",
            "default": true
          },
          "includeRemovedAlerts": {
            "title": "Alert when a license drops off the board's current list",
            "type": "boolean",
            "description": "TX, CA, AZ and OR publish current licenses only. When a license from your last snapshot is no longer listed (expired, cancelled, suspended or revoked), emit a removedFromSource alert.",
            "default": true
          },
          "snapshotName": {
            "title": "Snapshot name (optional)",
            "type": "string",
            "description": "Optional. By default the snapshot is keyed by a hash of your filters, so each saved task keeps its own history. Set a name to share or reset a snapshot on purpose."
          },
          "includeStateSummaryRows": {
            "title": "Add a free summary row per state",
            "type": "boolean",
            "description": "Adds one free stateStatus row per state. Errors, skipped states and states with 0 results always get a row.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}