{
  "openapi": "3.0.1",
  "info": {
    "title": "North Carolina Plumbing & HVAC Contractor Leads Scraper",
    "description": "Scrape license-verified plumbing, HVAC & fire-sprinkler contractor leads from North Carolina's state licensing board — company, license number, active classifications, expiry, address, phone, classification holders, and technician-employer links. Full-state sweep or targeted search.",
    "version": "0.0",
    "x-build-id": "HVaAuE5qphgCFXA2b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~north-carolina-plumbing-hvac-contractor-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-north-carolina-plumbing-hvac-contractor-leads-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/memo23~north-carolina-plumbing-hvac-contractor-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-north-carolina-plumbing-hvac-contractor-leads-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/memo23~north-carolina-plumbing-hvac-contractor-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-north-carolina-plumbing-hvac-contractor-leads-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": {
          "cities": {
            "title": "Cities (mailing address)",
            "type": "array",
            "description": "NC cities to sweep, matched EXACTLY against each licensee's mailing-address city (e.g. `Charlotte`, `Winston Salem`). Empty = the bundled full-state place list, biggest cities first.",
            "items": {
              "type": "string"
            }
          },
          "classifications": {
            "title": "License classifications",
            "type": "array",
            "description": "Keep only these classifications (searched board-side, then re-checked against each license's Active Classifications). Empty = all 24. Values may also be typed as a fragment (`plumbing class i`) or the board's numeric code (`16`).",
            "items": {
              "type": "string",
              "enum": [
                "Plumbing Class I Contractor",
                "Plumbing Class II Contractor",
                "Restricted Limited Plumbing Contractor",
                "Plumbing Class I Technician",
                "Plumbing Class II Technician",
                "Heating Group 1 - Class I Contractor",
                "Heating Group 1 - Class II Contractor",
                "Heating Group 2 Contractor",
                "Heating Group 3 - Class I Contractor",
                "Heating Group 3 - Class II Contractor",
                "Heating Group 1 Class I Technician",
                "Heating Group 1 Class II Technician",
                "Heating Group 2 Technician",
                "Heating Group 3 Class I Technician",
                "Heating Group 3 Class II Technician",
                "Fuel Piping Contractor",
                "Fuel Piping Class I Technician",
                "Fuel Piping Class II Technician",
                "Fire Sprinkler Installation Contractor",
                "Fire Sprinkler Inspection Contractor",
                "Fire Sprinkler Inspection Technician",
                "Fire Sprinkler Maintenance Technician",
                "Residential Fire Sprinkler Installation Contractor",
                "Residential Fire Sprinkler Design Contractor"
              ]
            },
            "default": []
          },
          "activeOnly": {
            "title": "Active licenses only",
            "type": "boolean",
            "description": "Keep only licenses with at least one Active Classification on file (this board publishes no status field). Turn off for historical or compliance research.",
            "default": true
          },
          "companyNames": {
            "title": "Company names",
            "type": "array",
            "description": "Company-name searches (the board substring-matches, so `plumbing` finds every company containing the word). Overrides the city sweep.",
            "items": {
              "type": "string"
            }
          },
          "lastName": {
            "title": "Licensee last name",
            "type": "string",
            "description": "Search by the license holder's last name. Overrides the city sweep."
          },
          "firstName": {
            "title": "Licensee first name",
            "type": "string",
            "description": "Optional, only used together with the last name."
          },
          "licenseNumbers": {
            "title": "License numbers",
            "type": "array",
            "description": "Direct license lookups — accepts `L.00007`, `S.01622`, or bare digits. Overrides every other mode.",
            "items": {
              "type": "string"
            }
          },
          "phoneNumber": {
            "title": "Phone number",
            "type": "string",
            "description": "Search by the phone number on record. Overrides the city sweep."
          },
          "enrichEmails": {
            "title": "Find contact emails (opt-in)",
            "type": "boolean",
            "description": "Discover each business's website and harvest a contact email from it. Adds `contactEmail`, `contactWebsite`, and the detailed `emailEnrichment` object. Best-effort — no charge on misses.",
            "default": false
          },
          "qualifyByPayment": {
            "title": "Detect payment processors",
            "type": "boolean",
            "description": "Piggybacks on email enrichment (only runs when that's on): detects Stripe/Square/e-commerce signals on the business site. Adds `takesPayments`, `paymentProcessors`, `stripeLiveKey`, `paymentConfidence`. Free.",
            "default": false
          },
          "monitoringMode": {
            "title": "Only new licenses since last run",
            "type": "boolean",
            "description": "Skip licenses already delivered to you on previous runs — ideal on a schedule for catching newly licensed contractors. The first run seeds the baseline and returns everything.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Reset monitoring baseline",
            "type": "boolean",
            "description": "One-shot: forget every previously delivered license at run start, so this run returns everything again.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum leads",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on leads pushed to the dataset.",
            "default": 500
          },
          "maxConcurrency": {
            "title": "Detail concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Parallel per-licensee detail fetches.",
            "default": 10
          },
          "searchConcurrency": {
            "title": "Search concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Parallel roster searches. Each returns up to ~600 rows; keep modest to stay polite to the board.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}