{
  "openapi": "3.0.1",
  "info": {
    "title": "Colorado Contractor Leads & Business Records",
    "description": "Find Colorado electrical and plumbing contractors with license status, dates, locations, verification links, and matched business records. Free-plan runs return at most 5 records.",
    "version": "1.0",
    "x-build-id": "FWwphQePuaiFJBQOz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/muhammadafzal~colorado-contractor-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-muhammadafzal-colorado-contractor-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/muhammadafzal~colorado-contractor-leads/runs": {
      "post": {
        "operationId": "runs-sync-muhammadafzal-colorado-contractor-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/muhammadafzal~colorado-contractor-leads/run-sync": {
      "post": {
        "operationId": "run-sync-muhammadafzal-colorado-contractor-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": {
          "trades": {
            "title": "Contractor Trades",
            "type": "array",
            "description": "Use this when selecting contractor categories. Choose electrical contractors, plumbing contractors, or both. Default: both state-licensed contractor types. This does not include municipal general-contractor licenses.",
            "items": {
              "type": "string",
              "enum": [
                "ELECTRICAL_CONTRACTOR",
                "PLUMBING_CONTRACTOR"
              ],
              "enumTitles": [
                "Electrical Contractor",
                "Plumbing Contractor"
              ]
            },
            "default": [
              "ELECTRICAL_CONTRACTOR",
              "PLUMBING_CONTRACTOR"
            ]
          },
          "licenseStatus": {
            "title": "License Status",
            "enum": [
              "ACTIVE",
              "ALL"
            ],
            "type": "string",
            "description": "Use ACTIVE for current lead lists or ALL for historical research. Default: ACTIVE. Status comes directly from the Colorado DORA public dataset.",
            "default": "ACTIVE"
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Use this when targeting Colorado cities. Enter exact city names such as Denver, Aurora, or Colorado Springs. Leave empty for statewide results; accepts up to 50 cities.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "zipCodes": {
            "title": "ZIP Codes",
            "type": "array",
            "description": "Use this for ZIP-level territory lists. Enter exact postal codes such as 80202; accepts up to 100. Leave empty to avoid ZIP filtering.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{5}(?:-[0-9]{4})?$"
            },
            "default": []
          },
          "companyNames": {
            "title": "Company Name Search",
            "type": "array",
            "description": "Use this when looking up known contractors by legal or trade name. Partial, case-insensitive matching is supported, for example Summit Electric. Leave empty for category/location discovery; accepts up to 50 names.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "licenseNumbers": {
            "title": "License Number Lookup",
            "type": "array",
            "description": "Use this to verify exact Colorado DORA license numbers, for example 102804. Leave empty for discovery searches; accepts up to 100 numbers.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "issuedAfter": {
            "title": "Issued On or After",
            "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Use this to find newer contractor licenses. Enter YYYY-MM-DD, for example 2025-01-01. Leave blank for no minimum issue date.",
            "default": ""
          },
          "expiresBefore": {
            "title": "Expires On or Before",
            "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Use this for renewal outreach or compliance checks. Enter YYYY-MM-DD, for example 2027-12-31. Leave blank for no maximum expiration date.",
            "default": ""
          },
          "verifyBusinessRecords": {
            "title": "Verify Business Records",
            "type": "boolean",
            "description": "Use this to match licensed company names against the Colorado Secretary of State business-entity dataset. Default: enabled. Adds entity standing, formation date, principal location, and registered-agent name; unmatched records remain explicit.",
            "default": true
          },
          "businessStanding": {
            "title": "Business Verification Filter",
            "enum": [
              "ANY",
              "MATCHED_ONLY",
              "GOOD_STANDING"
            ],
            "type": "string",
            "description": "Use ANY to keep all license records, MATCHED_ONLY to require a Secretary of State match, or GOOD_STANDING to require a matched entity currently marked Good Standing. This filter applies after license retrieval.",
            "default": "ANY"
          },
          "sortBy": {
            "title": "Sort Results",
            "enum": [
              "NEWEST_LICENSE",
              "EXPIRING_SOON",
              "BUSINESS_NAME"
            ],
            "type": "string",
            "description": "Use NEWEST_LICENSE for prospecting, EXPIRING_SOON for renewal workflows, or BUSINESS_NAME for directory exports. Default: newest licenses first.",
            "default": "NEWEST_LICENSE"
          },
          "maxResults": {
            "title": "Maximum Results (5 for free users)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Use this to cap delivered records and PPE spend. Range: 1–10,000; default 25 and prefill 10. Free-plan runs are capped at 5 records; paid-plan runs honor the requested value. Each output record costs $0.001 plus one $0.00005 run-start event.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}