{
  "openapi": "3.0.1",
  "info": {
    "title": "Delaware Contractor License Lookup & List Scraper (DOR + DPR)",
    "description": "Export every current Delaware contractor business licence (13,000+) with street address, plus active DPR electrical, plumbing and HVACR licences. Filter by trade, residency, city, ZIP or name.",
    "version": "0.0",
    "x-build-id": "gLx3FIsdAyiQ2oyhM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapebench~delaware-contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapebench-delaware-contractor-license-lookup",
        "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/scrapebench~delaware-contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-scrapebench-delaware-contractor-license-lookup",
        "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/scrapebench~delaware-contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-scrapebench-delaware-contractor-license-lookup",
        "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": {
          "source": {
            "title": "Roster",
            "enum": [
              "both",
              "business",
              "trade",
              "registry",
              "all"
            ],
            "type": "string",
            "description": "Which Delaware roster to read. 'business' = contractor business licences from the Division of Revenue (firms, with street address). 'trade' = electrical, plumbing and HVACR licences from the Division of Professional Regulation (individuals, city and ZIP only). 'registry' = the Department of Labor's registry of construction contractors (6,000+ firms, resident and out-of-state, with certificate number, NAICS trade codes, public/private work and street address). 'both' returns business licences first, then trade licences; 'all' adds the registry after them; each up to Maximum results. The registry shares no number with the other rosters, so its firms come as their own rows (dataset: contractor_registry). A filter one roster cannot apply (trade or a non-active status on business licences or the registry, residency on trade licences, NAICS codes on anything but the registry) leaves that roster out rather than being ignored.",
            "default": "both"
          },
          "residency": {
            "title": "Residency (business licences and registry)",
            "enum": [
              "all",
              "resident",
              "non_resident"
            ],
            "type": "string",
            "description": "Resident or non-resident contractor, as the business licence category or the DOL registry's category says. Trade licences carry none, so setting it leaves them out.",
            "default": "all"
          },
          "trade": {
            "title": "Trade (trade licences)",
            "type": "string",
            "description": "A DPR trade: 'electrical', 'plumbing', 'hvacr', 'homeowner' (homeowner electrical permits, left out unless asked for), or an exact licence type such as 'Master Electrician', 'Journeyperson Electrician' or 'Master HVACR Restricted'. Applies to trade licences only; setting it leaves business licences out. An unrecognised value is ignored with a log line; if nothing you gave is recognised, the run returns a free row saying so instead of the whole state."
          },
          "trades": {
            "title": "Trades (batch)",
            "type": "array",
            "description": "Several trades in ONE run, e.g. plumbing and hvacr. Combined with 'Trade' if you fill both.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Licence status (trade licences)",
            "enum": [
              "active",
              "all",
              "expired",
              "inactive",
              "suspended",
              "revoked",
              "closed"
            ],
            "type": "string",
            "description": "Trade-licence status. 'active' (default) keeps current licences; 'all' includes expired, closed and revoked ones. The business roster lists only current licences, so 'active' and 'all' both return all of it and any other status leaves it out; the same holds for the DOL registry, which lists only certified contractors.",
            "default": "active"
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City on the licence, exact match ignoring case, e.g. 'Dover' or 'Wilmington'. Partial city names do not match."
          },
          "cities": {
            "title": "Cities (batch)",
            "type": "array",
            "description": "Several cities in ONE run. Combined with 'City' if you fill both.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zip": {
            "title": "ZIP code",
            "type": "string",
            "description": "ZIP on the licence, 5 digits (a ZIP+4 is accepted and matched on its first 5)."
          },
          "zips": {
            "title": "ZIP codes (batch)",
            "type": "array",
            "description": "Several ZIPs in ONE run. Combined with 'ZIP code' if you fill both.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "name": {
            "title": "Name contains",
            "type": "string",
            "description": "Text the name contains (case-insensitive): the legal business name or any trade name (DBA) on business licences, or 'LAST,FIRST' on trade licences, e.g. 'ELECTRIC' or 'SMITH'. On the DOL registry it is the registry's own name search (name contains)."
          },
          "names": {
            "title": "Names (batch)",
            "type": "array",
            "description": "Several name fragments in ONE run; a licence matching any of them is returned once. The run log says how many returned licences each one matched.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (registry)",
            "type": "array",
            "description": "Keep registry contractors registered for any of these 6-digit NAICS codes, e.g. 238220 (plumbing, heating and air-conditioning), 238160 (roofing), 236118 (residential remodelers). Only the DOL registry carries NAICS codes, so setting this leaves the licence rosters out.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on licences returned for the whole run (a spend control). Both licence rosters together are 20,000+ current licences and the DOL registry 6,000+ contractors, so 100000 returns everything that matches. The run log states how many matched when the cap cuts it short.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. data.delaware.gov answers direct requests; enable a proxy only if runs come back with a 'blocked' notice.",
            "default": {
              "useApifyProxy": false
            }
          },
          "includeContacts": {
            "title": "Include contact details",
            "type": "boolean",
            "description": "Where the board publishes no phone for a business, add one (with its website and street address when found), looked up by business name. Charged as a separate 'Contact details found' event only on a row that gets a phone; a row without one costs only the row price. Turn off for the licence list alone.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}