{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Leads - Multi-State, 22 States + Phone",
    "description": "$1 per 1,000 licences; $0.80 per 1,000 on Business and higher plans. Licensed contractors from 22 US state registers in one schema: licence number, trade, status, expiry, owner, phone (19 states), email where published, address. Filter by trade, county, city, ZIP.",
    "version": "0.1",
    "x-build-id": "nUsUVyyXedG6ZrOyw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~contractor-license-leads-email-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-contractor-license-leads-email-scraper",
        "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/scrapersdelight~contractor-license-leads-email-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-contractor-license-leads-email-scraper",
        "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/scrapersdelight~contractor-license-leads-email-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-contractor-license-leads-email-scraper",
        "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 state registers to search (22). Leave the default for all of them. Connecticut, Florida, Virginia publish no phone number.",
            "items": {
              "type": "string",
              "enum": [
                "AL",
                "AZ",
                "AR",
                "CA",
                "CT",
                "FL",
                "IA",
                "MA",
                "MN",
                "MS",
                "NE",
                "NV",
                "NY",
                "OH",
                "OK",
                "OR",
                "TN",
                "TX",
                "VA",
                "WA",
                "WV",
                "WY"
              ],
              "enumTitles": [
                "Alabama (General Contractors board)",
                "Arizona (ROC)",
                "Arkansas (Contractors Licensing Board)",
                "California (CSLB)",
                "Connecticut (DCP - no phone)",
                "Florida (DBPR - no phone)",
                "Iowa (contractor registration)",
                "Massachusetts (Home Improvement Contractors)",
                "Minnesota (DLI)",
                "Mississippi (Board of Contractors)",
                "Nebraska (contractor registration)",
                "Nevada (NSCB)",
                "New York (NYS DOL registry, NYC DOB + DCWP)",
                "Ohio (OCILB commercial)",
                "Oklahoma (CIB roofing)",
                "Oregon (CCB)",
                "Tennessee (Board for Licensing Contractors)",
                "Texas (TDLR)",
                "Virginia (DPOR - email, no phone)",
                "Washington (L&I)",
                "West Virginia (Contractor Licensing Board)",
                "Wyoming (electrical)"
              ]
            },
            "default": [
              "AL",
              "AZ",
              "AR",
              "CA",
              "CT",
              "FL",
              "IA",
              "MA",
              "MN",
              "MS",
              "NE",
              "NV",
              "NY",
              "OH",
              "OK",
              "OR",
              "TN",
              "TX",
              "VA",
              "WA",
              "WV",
              "WY"
            ]
          },
          "trades": {
            "title": "Trades",
            "type": "array",
            "description": "Contractor trades, mapped to each state's own licence types (README table). A state that does not license a trade at state level is skipped for it, and the run says so. Leave empty (and Licence types empty) for every contractor licence type.",
            "items": {
              "type": "string",
              "enum": [
                "electrical",
                "hvac",
                "plumbing",
                "roofing",
                "general",
                "general_engineering",
                "mechanical",
                "pool_spa",
                "solar",
                "sheet_metal",
                "alarm_low_voltage",
                "sign_electrical_specialty",
                "underground_utility",
                "elevator",
                "well_drilling",
                "appliance_installation",
                "specialty_structure",
                "tank_pollutant_storage",
                "fire_protection",
                "insulation",
                "framing_carpentry",
                "concrete_masonry",
                "drywall_plaster",
                "earthwork_paving",
                "fencing",
                "flooring_tile",
                "glazing",
                "demolition",
                "asbestos_hazmat",
                "landscaping_tree",
                "painting",
                "steel_welding_metal",
                "locks_security",
                "water_conditioning",
                "manufactured_housing",
                "handyman",
                "home_improvement",
                "public_works"
              ],
              "enumTitles": [
                "Electrical contractors (19 states)",
                "HVAC / air conditioning & refrigeration (19 states)",
                "Plumbing (17 states)",
                "Roofing (15 states)",
                "General / building / residential contractors (17 states)",
                "General engineering (11 states)",
                "Mechanical / boiler & steam fitting (16 states)",
                "Swimming pool & spa (12 states)",
                "Solar (12 states)",
                "Sheet metal (11 states)",
                "Alarm / low-voltage systems (15 states)",
                "Sign & electrical specialty (17 states)",
                "Underground utility, pipeline & sanitation (14 states)",
                "Elevator (15 states)",
                "Water well drilling & pump installation (14 states)",
                "Appliance installation (3 states)",
                "Structural / specialty construction (FL specialty licences) (1 states)",
                "Pollutant storage, tank lining & tank testing (1 states)",
                "Fire protection (14 states)",
                "Insulation & acoustical (11 states)",
                "Framing, cabinets & finish carpentry (11 states)",
                "Concrete & masonry (12 states)",
                "Drywall, lathing & plastering (12 states)",
                "Earthwork, paving & highway (11 states)",
                "Fencing (11 states)",
                "Flooring & tile (12 states)",
                "Glazing (13 states)",
                "Building moving & demolition (12 states)",
                "Asbestos & hazardous substance removal (10 states)",
                "Landscaping & tree (12 states)",
                "Painting & decorating (12 states)",
                "Structural & reinforcing steel, welding, ornamental metal (12 states)",
                "Locks & security equipment (4 states)",
                "Water conditioning (5 states)",
                "Manufactured housing (9 states)",
                "Minor home improvements / handyman (8 states)",
                "Home improvement / remodeling contractors (12 states)",
                "Registered public-work contractors (any trade) (1 states)"
              ]
            },
            "default": [
              "electrical"
            ]
          },
          "licenseTypes": {
            "title": "Licence types (exact codes, optional)",
            "type": "array",
            "description": "Exact register codes, added to the trades above, as \"STATE:code\" - e.g. \"CA:C-10\" (CSLB class), \"FL:0605\" (DBPR type), \"TX:Electrical Contractor\", \"AZ:CR-37\" (ROC class), \"WA:CC/CD\" (L&I type/specialty), \"MN:BC\", \"VA:RBC\". The README lists every state's codes.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "County names, e.g. \"Los Angeles\", \"Maricopa\", \"King\", \"Hennepin\". A name found in two selected states (Orange is in CA and FL) searches both; write \"Orange, FL\" or \"FL:Orange\" to pick one. Where a register publishes no county, the county's ZIP codes are used. Leave counties, cities and ZIPs empty to search statewide.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City names, e.g. \"San Diego\", \"Phoenix\", \"Spokane\". Add \", CA\" / \", AZ\" (a state code) to limit a city to one state. Rows matching ANY listed county, city or ZIP are returned.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "5-digit ZIP codes, e.g. \"92101\", \"85004\", \"98101\". Each ZIP is searched only in the state it belongs to.",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active licences only",
            "type": "boolean",
            "description": "Keep only licences the register shows as active (or, where it publishes no status column, whose expiry is today or later). Several registers list current licences only - the README says which.",
            "default": true
          },
          "expiringWithinDays": {
            "title": "Expiring within (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only licences whose expiry date falls between today and this many days from today - the renewal-window list. Registers that publish no expiry date return nothing with this on. 0 = off.",
            "default": 0
          },
          "requirePhone": {
            "title": "Only rows with a phone number",
            "type": "boolean",
            "description": "Drop rows the register publishes no phone for. Connecticut, Florida, Virginia publish none, so they are skipped with this on.",
            "default": false
          },
          "fetchDetails": {
            "title": "Open each licence record where it adds data",
            "type": "boolean",
            "description": "Florida, Arizona, Mississippi and Nebraska keep part of the record on a per-licence page (Florida: qualifier + DBA; Arizona: bond, entity type, personnel; Mississippi: expiry, county, classes; Nebraska: PHONE and email). One extra small request per row in those states. Off = list fields only.",
            "default": true
          },
          "enrichWebsiteEmail": {
            "title": "Find website + email (opt-in)",
            "type": "boolean",
            "description": "Most registers publish no email or website. With this on, the actor looks for the business's own website from its name and keeps it ONLY when the site shows the licence number or the register's phone, then reads the email(s) on that site. A verified email is charged as an add-on per row that gets one; rows without one cost nothing extra. Rows whose register already publishes an email keep it and are not searched or charged.",
            "default": false
          },
          "websiteDiscovery": {
            "title": "Website discovery",
            "enum": [
              "domain-guess",
              "both",
              "search"
            ],
            "type": "string",
            "description": "How to look for the website when \"Find website + email\" is on. domain-guess (default): try the .com names the business name spells - fast and cheap. both: guess first, then one web search when the guess finds nothing (finds more, several times slower). search: web search only. Every found site must still show the licence number or register phone.",
            "default": "domain-guess"
          },
          "maxItems": {
            "title": "Max licences",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many licences in total, shared across the states (a state with fewer matches hands its share to the others). You are charged per licence delivered. 0 = no limit.",
            "default": 60
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Not needed: every register answered direct requests when measured (Arizona's file host is reached through Apify's datacenter proxy automatically). If set, it is used only as a fallback after two failed direct attempts on a request."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}