{
  "openapi": "3.0.1",
  "info": {
    "title": "Louisiana Contractor Leads Scraper (LSLBC) — with Emails",
    "description": "Scrape license-verified contractor leads from Louisiana's LSLBC registry — company, license number, class, status, expiry, address, phone, and the contractor's own email published on the board record. Commercial, residential, home-improvement & mold. Full-state sweep or targeted search.",
    "version": "0.0",
    "x-build-id": "lBbljyxpqBFoWTxUw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~louisiana-contractor-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-louisiana-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~louisiana-contractor-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-louisiana-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~louisiana-contractor-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-louisiana-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": "Louisiana cities to sweep, matched EXACTLY against each licensee's mailing-address city (e.g. `New Orleans`, `Baton Rouge`). Empty = the bundled full-state place list, biggest cities first.",
            "items": {
              "type": "string"
            }
          },
          "classifications": {
            "title": "License classifications",
            "type": "array",
            "description": "Keep only these license types. Empty = all four. Values may also be typed as a fragment (`residential`) or the board's numeric code (`23`).",
            "items": {
              "type": "string",
              "enum": [
                "Commercial License Certificate",
                "Residential License Certificate",
                "Home Improvement Registration",
                "Mold Remediation License Certificate"
              ]
            },
            "default": []
          },
          "activeOnly": {
            "title": "Active licenses only",
            "type": "boolean",
            "description": "Keep only licenses in good standing — Expired / 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 (the board substring-matches, so `electric` 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 `U.00025` or bare digits (`25`). 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."
          },
          "includePublicMatters": {
            "title": "Include disciplinary records",
            "type": "boolean",
            "description": "Also fetch each licensee's public disciplinary matters (adds one request per lead). Adds the `publicMatters` array to every row.",
            "default": false
          },
          "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 ~500 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}