{
  "openapi": "3.0.1",
  "info": {
    "title": "North Carolina Plumbing & HVAC Contractor Leads",
    "description": "Search the official North Carolina plumbing, heating, and fire-sprinkler contractor registry and export public license, business, contact, classification, and query-provenance records.",
    "version": "0.1",
    "x-build-id": "258baA7N88zKmVJ8a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~north-carolina-plumbing-hvac-contractor-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-north-carolina-plumbing-hvac-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/automation-lab~north-carolina-plumbing-hvac-contractor-leads/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-north-carolina-plumbing-hvac-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/automation-lab~north-carolina-plumbing-hvac-contractor-leads/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-north-carolina-plumbing-hvac-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": {
          "companyNames": {
            "title": "Company names",
            "uniqueItems": true,
            "type": "array",
            "description": "Company-name terms to search. The board returns accounts whose company name contains each term. Each term is a separate search.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "cities": {
            "title": "Cities",
            "uniqueItems": true,
            "type": "array",
            "description": "North Carolina mailing-address cities to search, such as Raleigh or Charlotte. Each city is a separate search.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "licenseNumbers": {
            "title": "License numbers",
            "uniqueItems": true,
            "type": "array",
            "description": "Exact board account numbers, such as L.00327 (License), S.08188 (Sub-License) or L.FSM.29012. With a prefix, only that exact account is returned; a License and Sub-License can share the same digits, so L.08188 does not return S.08188. A bare number such as 00327 or 327 returns whichever account type holds that number.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "personNames": {
            "title": "License-holder names",
            "uniqueItems": true,
            "type": "array",
            "description": "Search by a person's name as last name only (Smith) or \"Last, First\" (Smith, John). The registry matches partial names, so Smith can also return Smithers. It searches contact and classification-holder names, so the returned business can differ from the person you searched.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "phoneNumbers": {
            "title": "Phone numbers",
            "uniqueItems": true,
            "type": "array",
            "description": "Full 10-digit US phone numbers in any format, such as (704) 555-0100 or +1 704-555-0100. The registry matches the complete number only; 7-digit numbers are rejected before the run starts.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "classifications": {
            "title": "Active classification filters",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep records whose active classification contains at least one supplied phrase (case-insensitive substring, any phrase matches), such as Plumbing Class I or Heating Group 3. Filtering happens after the detail page is read; filtered-out records are not saved or charged.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "activeOnly": {
            "title": "Only records with active classifications",
            "type": "boolean",
            "description": "Keep only records whose official detail page lists at least one active classification. Records without any are skipped before they are saved or charged. This is the registry's classification list, not a legal good-standing check; the output field hasActiveClassifications shows the same signal when this is off.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many unique matching contractor records across all searches combined. Duplicates and filtered-out records do not count. The run also stops early if it reaches your maximum total charge.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Detail request concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum simultaneous official detail-page requests. Lower this if the registry is under load.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential US proxy is recommended because the official registry rate-limits repeated requests from some networks.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}