{
  "openapi": "3.0.1",
  "info": {
    "title": "US Contractor License Leads Scraper (Multi-State)",
    "description": "License-verified contractor leads across every US state board on the ARLS platform in one run — NC electrical, NC plumbing/HVAC, NC general contractors, and LA contractors (with board-published emails). Company, license #, class, status, expiry, address, phone. Full-state sweep or targeted search.",
    "version": "0.0",
    "x-build-id": "lJFClbqbui2Ij0tvI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~us-contractor-license-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-us-contractor-license-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~us-contractor-license-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-us-contractor-license-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~us-contractor-license-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-us-contractor-license-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": {
          "boards": {
            "title": "Boards to run",
            "type": "array",
            "description": "Empty = all boards. Each row is one board.",
            "items": {
              "type": "string",
              "enum": [
                "ncbeec",
                "ncphfsc",
                "nclbgc",
                "lslbc"
              ],
              "enumTitles": [
                "NC — Electrical Contractors (NCBEEC)",
                "NC — Plumbing, Heating & Fire Sprinkler (NCPHFSC)",
                "NC — General Contractors (NCLBGC)",
                "LA — Contractors (LSLBC, with emails)"
              ]
            },
            "default": []
          },
          "cities": {
            "title": "Cities (mailing address)",
            "type": "array",
            "description": "Cities to sweep, matched EXACTLY against each licensee's mailing-address city (e.g. `Charlotte`, `New Orleans`). Applied to every selected board. Empty = each board's bundled full-state place list, biggest cities first.",
            "items": {
              "type": "string"
            }
          },
          "classifications": {
            "title": "License classifications",
            "type": "array",
            "description": "Keep only these classifications. Resolved per board, so a fragment like `residential` matches on whichever boards have it. Accepts a full label or the board's numeric code too. Empty = all classifications on each board.",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active licenses only",
            "type": "boolean",
            "description": "Keep only licenses in good standing — Expired / Terminated / Not Active / Not Valid records are dropped before any detail fetch. Turn off for historical or compliance research.",
            "default": true
          },
          "companyNames": {
            "title": "Company names",
            "type": "array",
            "description": "Company-name searches (each board substring-matches, so `electric` finds every company containing the word). Overrides the city sweep. Applied to every selected board.",
            "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 full numbers (`U.00025`, `CL.13827`, `L.00007`) or bare digits. Tried on every selected board. 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": "For rows without a board-published email (all boards except LA), discover the business website and harvest a contact email. Adds `contactEmail`, `contactWebsite`, `emailEnrichment`. Best-effort — no charge on misses, and skipped entirely when the board already gave an email.",
            "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 (tracked per board) — 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 (total across boards)",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on leads pushed to the dataset, shared across all selected boards (boards run in order until the budget is spent).",
            "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 per board. Keep modest to stay polite to the boards.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}