{
  "openapi": "3.0.1",
  "info": {
    "title": "US Contractor Licenses – Multi-State Leads",
    "description": "Licensed contractors from official state licensing open data (WA, OR, TX, CO, CT, IL, NY) in one format: business name, license, trade, status, expiry, address and phone where published. Filter by trade, city, ZIP or newly licensed; only-new mode for alerts.",
    "version": "1.0",
    "x-build-id": "qIwC1bBwkjDFhe1Ja"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/orventasystems~contractor-licenses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-orventasystems-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/orventasystems~contractor-licenses/runs": {
      "post": {
        "operationId": "runs-sync-orventasystems-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/orventasystems~contractor-licenses/run-sync": {
      "post": {
        "operationId": "run-sync-orventasystems-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": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "Which states' official contractor-license records to search.",
            "items": {
              "type": "string",
              "enum": [
                "WA",
                "OR",
                "TX",
                "CO",
                "CT",
                "IL",
                "NY"
              ],
              "enumTitles": [
                "Washington – all construction, electrical, plumbing & elevator contractors (L&I)",
                "Oregon – all construction contractors (CCB)",
                "Texas – A/C, electrical, sign, appliance & elevator contractors (TDLR)",
                "Colorado – electrical & plumbing contractors (DORA)",
                "Connecticut – home improvement, new home, electrical, HVAC, plumbing & other contractors",
                "Illinois – roofing contractors & alarm contractor agencies (IDFPR)",
                "New York – Contractor Registry for public work (NYS DOL)"
              ]
            },
            "default": [
              "CT"
            ]
          },
          "categories": {
            "title": "Trades",
            "type": "array",
            "description": "Only these trade categories. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "general",
                "electrical",
                "plumbing",
                "hvac",
                "roofing",
                "home_improvement",
                "specialty",
                "fire_protection",
                "elevator",
                "demolition",
                "asbestos_lead",
                "pools",
                "landscaping",
                "security_alarm",
                "public_works",
                "other"
              ],
              "enumTitles": [
                "General / building contractor",
                "Electrical",
                "Plumbing",
                "HVAC / mechanical",
                "Roofing",
                "Home improvement / remodeling",
                "Specialty trade",
                "Fire protection / sprinklers",
                "Elevator",
                "Demolition",
                "Asbestos / lead / environmental",
                "Pools & spas",
                "Landscaping / irrigation",
                "Security / alarm",
                "Public works (NY registry)",
                "Other"
              ]
            },
            "default": []
          },
          "newlyLicensedWithinDays": {
            "title": "Newly licensed within the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only contractors whose license was FIRST issued in the last N days – great for reaching brand-new businesses. Works for WA, OR, CO, CT, IL and NY (Texas doesn't publish issue dates; use 'Only new licenses' with a schedule for Texas)."
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Only contractors located in these cities (business/mailing address), e.g. Seattle, Hartford.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes (or prefixes)",
            "type": "array",
            "description": "Only these ZIP codes. Prefixes work too, e.g. 981 for the Seattle area.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only licenses whose business name, license type or specialty contains one of these, e.g. solar, roofing, LLC.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active licenses only",
            "type": "boolean",
            "description": "Skip expired, suspended or revoked licenses (where the state publishes status).",
            "default": true
          },
          "onlyNew": {
            "title": "Only new licenses (since last run)",
            "type": "boolean",
            "description": "Remember licenses already returned by earlier runs with the same filters and output only new ones. Schedule it weekly to catch every newly licensed contractor – in every state.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Stop after this many licenses are saved (across all states).",
            "default": 1000
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional free token from any Socrata open-data portal. Only useful for very large pulls if a portal rate-limits. Not required."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}