{
  "openapi": "3.0.1",
  "info": {
    "title": "Mississippi Contractor License Lookup & Leads Scraper (MSBOC)",
    "description": "Export every Mississippi State Board of Contractors licence — statewide or by county, classification, city or ZIP — with phone, street address, classifications, expiry date and officers.",
    "version": "0.0",
    "x-build-id": "htMIRvOLMxXcljUec"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapebench~mississippi-contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapebench-mississippi-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~mississippi-contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-scrapebench-mississippi-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~mississippi-contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-scrapebench-mississippi-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": {
          "status": {
            "title": "Licence status",
            "enum": [
              "active",
              "inactive",
              "expired",
              "revoked",
              "suspended",
              "unlicensed"
            ],
            "type": "string",
            "description": "Which licences to export. 'Active' is every currently licensed contractor (13,186 on 2026-10-07). 'Expired' is the lapsed list (24,033), useful for win-back or compliance checks.",
            "default": "active"
          },
          "licenseType": {
            "title": "Licence type",
            "enum": [
              "any",
              "commercial",
              "residential"
            ],
            "type": "string",
            "description": "Commercial (Board of Contractors commercial licences) or Residential (residential builders, remodelers and trades). 'Any' returns both.",
            "default": "any"
          },
          "classification": {
            "title": "Classification",
            "type": "string",
            "description": "An MSBOC classification by code or name, e.g. 'E' (Electrical Work), 'S123' (Residential Roofing), 'Building Construction', 'Residential Builder'. An exact class name picks that class; otherwise every class with a word starting with what you typed is searched ('roof' finds both Residential ROOFING and Commercial ROOFING,SHEETMETAL AND SIDING). Leave empty for every classification. A value that matches no class is dropped (logged), never searched as 'all'."
          },
          "classifications": {
            "title": "Classifications (batch)",
            "type": "array",
            "description": "Several classifications in ONE run. Combined with 'Classification' if you fill both. A licence returned by two searches is returned (and billed) once.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "Mississippi county, e.g. 'Hinds', 'DeSoto County', 'harrison'. MSBOC assigns the county from the ZIP of the licensee's address, so out-of-state firms are not under any county. Leave empty for the whole state."
          },
          "counties": {
            "title": "Counties (batch)",
            "type": "array",
            "description": "Several counties in ONE run, e.g. Hinds, Madison and Rankin. Combined with 'County' if you fill both.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City of the licensee's address. MSBOC matches the start of the city name ('JACK' matches JACKSON)."
          },
          "cities": {
            "title": "Cities (batch)",
            "type": "array",
            "description": "Several cities in ONE run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zipCode": {
            "title": "ZIP code",
            "type": "string",
            "description": "A 5-digit ZIP code of the licensee's address."
          },
          "zipCodes": {
            "title": "ZIP codes (batch)",
            "type": "array",
            "description": "Several 5-digit ZIP codes in ONE run. Anything that is not 5 digits is dropped (logged).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "businessName": {
            "title": "Business name contains",
            "type": "string",
            "description": "Part of the company name, e.g. 'ELECTRIC' or 'Smith'. MSBOC matches it anywhere in the name."
          },
          "businessNames": {
            "title": "Business names (batch)",
            "type": "array",
            "description": "Several company-name searches in ONE run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Include classifications, dates and officers",
            "type": "boolean",
            "description": "Fetch each licence's MSBOC detail page to add its classifications, qualifying names, officers, first-issue and expiry dates, fax, minority flag and (for Mississippi addresses) county. Turn off for a faster export of name, licence number, address and phone only. Same price either way.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on licences returned PER search (each county x classification x city x ZIP x name combination), so adding a county never truncates the ones after it. The whole active roster is about 13,200; set 100000 to take everything a search matches.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. MSBOC answers direct requests; enable a proxy only if runs come back with a 'blocked' notice.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}