{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Leads: TX, WA, OR, CT & CO",
    "description": "Export licensed contractors from official state license registers (Texas TDLR, Washington L&I, Oregon CCB, Connecticut DCP, Colorado DORA) in one schema: business, owner, phone, address, trade, status and dates. Find new licensees for B2B leads.",
    "version": "1.0",
    "x-build-id": "Ns3Nvxhsfmll2uqiX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/waags~contractor-license-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-waags-contractor-license-leads",
        "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/waags~contractor-license-leads/runs": {
      "post": {
        "operationId": "runs-sync-waags-contractor-license-leads",
        "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/waags~contractor-license-leads/run-sync": {
      "post": {
        "operationId": "run-sync-waags-contractor-license-leads",
        "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": "License registers to search. Leave empty for all five.",
            "items": {
              "type": "string",
              "enum": [
                "TX",
                "WA",
                "OR",
                "CT",
                "CO"
              ],
              "enumTitles": [
                "Texas (TDLR)",
                "Washington (L&I)",
                "Oregon (CCB)",
                "Connecticut (DCP)",
                "Colorado (DORA, electrical & plumbing)"
              ]
            }
          },
          "trades": {
            "title": "Trades",
            "type": "array",
            "description": "Only licenses whose type or specialty matches one of these trades. Leave empty for all construction trades.",
            "items": {
              "type": "string",
              "enum": [
                "general",
                "electrical",
                "plumbing",
                "hvac",
                "roofing",
                "painting",
                "landscaping",
                "flooring",
                "concrete",
                "pool",
                "fire",
                "elevator",
                "waterWell"
              ],
              "enumTitles": [
                "General / home improvement",
                "Electrical",
                "Plumbing",
                "HVAC / A/C",
                "Roofing & gutters",
                "Painting & drywall",
                "Landscaping & tree",
                "Flooring, tile & cabinets",
                "Concrete & masonry",
                "Pools & spas",
                "Fire protection & security",
                "Elevator",
                "Water well"
              ]
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Only contractors whose business city starts with one of these names, e.g. Houston, Seattle, Portland.",
            "items": {
              "type": "string"
            }
          },
          "zipPrefixes": {
            "title": "ZIP code prefixes",
            "type": "array",
            "description": "Only contractors whose ZIP starts with one of these prefixes, e.g. 787 (Austin) or 98101.",
            "items": {
              "type": "string"
            }
          },
          "scope": {
            "title": "License scope",
            "enum": [
              "contractors",
              "all"
            ],
            "type": "string",
            "description": "\"Contractor businesses\" returns licensed contracting companies. \"All trade licenses\" adds master/journey-level electricians, plumbers and technicians (TX, CT, CO).",
            "default": "contractors"
          },
          "licensedFrom": {
            "title": "Licensed on or after",
            "type": "string",
            "description": "Only licenses first issued on or after this date: newly licensed contractors are the hottest leads (insurance, bonding, software, suppliers). YYYY-MM-DD or relative such as \"30 days\". Washington uses the current license effective date; Texas does not publish issue dates and is skipped when this is set."
          },
          "activeOnly": {
            "title": "Active licenses only",
            "type": "boolean",
            "description": "Exclude expired, suspended and inactive licenses.",
            "default": true
          },
          "requirePhone": {
            "title": "Only licenses with a phone number",
            "type": "boolean",
            "description": "Skip licenses without a phone number (TX, WA and OR publish phones; CT and CO do not and are skipped).",
            "default": false
          },
          "nameContains": {
            "title": "Business or owner name contains",
            "type": "string",
            "description": "Case-insensitive match on the business or person name."
          },
          "maxItemsPerState": {
            "title": "Max results per state",
            "minimum": 1,
            "type": "integer",
            "description": "Cap per state. Defaults to Max results divided by the number of states."
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional free app token for higher rate limits on very large exports. Not needed for normal use."
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of licenses to return. You are charged per result, so this also caps your cost.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}