# NC Licensing Board for General Contractors Scraper (`haketa/nc-licensing-board-for-general-contractors-scraper`) Actor

Scrape NC Licensing Board (NCLBGC) general contractor licenses. Search by license number, company, qualifier, city or classification. Returns status, limitations, qualifiers, classifications and expiration data.

- **URL**: https://apify.com/haketa/nc-licensing-board-for-general-contractors-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## NC Licensing Board for General Contractors Scraper

Scrape the **North Carolina Licensing Board for General Contractors (NCLBGC)** public portal at [portal.nclbgc.org](https://portal.nclbgc.org/Public/Search). Retrieve contractor license status, classification types, project limitation levels, qualifier details, expiration dates and disciplinary actions for any licensed general contractor in North Carolina.

> **45,000+ active licenses** · 30+ classification types · Limited / Intermediate / Unlimited levels · Qualifier data · n8n / Zapier / Make ready

---

### Table of Contents

1. [What It Scrapes](#what-it-scrapes)
2. [Input Parameters](#input-parameters)
3. [Output Schema](#output-schema)
4. [Example Input & Output](#example-input--output)
5. [Use Cases](#use-cases)
6. [Automation Platform Integration](#automation-platform-integration)
7. [Output Formats](#output-formats)
8. [Classification Types Reference](#classification-types-reference)
9. [Limitation Levels Reference](#limitation-levels-reference)
10. [Technical Architecture](#technical-architecture)
11. [Cost & Performance](#cost--performance)
12. [FAQ](#faq)

---

### What It Scrapes

The actor extracts the following fields from the NCLBGC public license portal for each contractor record:

#### License Record Fields

| Field | Description |
|-------|-------------|
| `licenseNumber` | NCLBGC license number |
| `licenseStatus` | `Active`, `Inactive`, `Expired`, or `Revoked` |
| `companyName` | Registered business / company name |
| `licenseType` | General, Residential, Specialty, etc. |
| `limitation` | Project value cap: `Limited` ($500K), `Intermediate` ($1M), or `Unlimited` |
| `classifications` | All classification codes held by this license (array) |
| `primaryQualifier` | Name of the primary qualifier on the license |
| `qualifierNumber` | Qualifier ID number |
| `qualifiers` | Full qualifier list with name, qualifier number and classification (array) |
| `phone` | Business phone number as listed on NCLBGC record |
| `streetAddress` | Business street address |
| `city` | Business city |
| `state` | Business state (typically `NC`) |
| `zip` | Business ZIP code |
| `expirationDate` | License expiration date (`YYYY-MM-DD`) |
| `issueDate` | License original issue date (`YYYY-MM-DD`) |
| `disciplinaryActions` | Array of disciplinary action records if any |
| `profileUrl` | Direct URL to the contractor's NCLBGC detail page |
| `scrapedAt` | ISO 8601 timestamp of when the record was scraped |

---

### Input Parameters

```json
{
  "licenseNumbers": ["76235"],
  "companyNames": ["Smith Construction"],
  "qualifierFirstNames": ["John"],
  "qualifierLastNames": ["Smith"],
  "cities": ["Raleigh", "Charlotte"],
  "zipCodes": ["27601"],
  "classificationType": "Building",
  "includeLikeSoundingNames": false,
  "maxResultsPerSearch": 100,
  "scrapeDetailPage": true,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
````

#### Parameter Reference

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `licenseNumbers` | `string[]` | `[]` | NCLBGC license numbers for direct lookup. Fastest method. |
| `companyNames` | `string[]` | `[]` | Business names to search. Partial matching supported. |
| `qualifierFirstNames` | `string[]` | `[]` | First name(s) of the qualifier. Pair with Last Names for precision. |
| `qualifierLastNames` | `string[]` | `[]` | Last name(s) of the qualifier. |
| `cities` | `string[]` | `[]` | NC city names for area-wide searches. |
| `zipCodes` | `string[]` | `[]` | ZIP codes for hyper-local searches. |
| `classificationType` | `string` | `"ALL"` | Filter by classification. See Classification Types Reference below. |
| `includeLikeSoundingNames` | `boolean` | `false` | Expand name searches to phonetically similar names. |
| `maxResultsPerSearch` | `integer` | `100` | Max records per query. `0` = unlimited. |
| `scrapeDetailPage` | `boolean` | `true` | Navigate each detail page for complete data (qualifiers, issue date, disciplinary actions). |
| `maxConcurrency` | `integer` | `3` | Parallel browser tabs. Recommended: 2–5. |
| `proxyConfiguration` | `object` | Apify residential | Proxy settings. |

**Search modes can be freely combined.** Supplying both `licenseNumbers` and `cities` runs one search job per entry across all modes in a single actor run.

***

### Output Schema

```json
{
  "licenseNumber": "76235",
  "licenseStatus": "Active",
  "companyName": "Smith Construction Company LLC",
  "licenseType": "General",
  "limitation": "Unlimited",
  "classifications": ["Building", "Residential"],
  "primaryQualifier": "John A. Smith",
  "qualifierNumber": "Q-12345",
  "qualifiers": [
    {
      "name": "John A. Smith",
      "qualifierNumber": "Q-12345",
      "classification": "Building"
    }
  ],
  "phone": "(919) 555-0100",
  "streetAddress": "1234 Main Street Suite 200",
  "city": "Raleigh",
  "state": "NC",
  "zip": "27601",
  "expirationDate": "2025-12-31",
  "issueDate": "2008-03-15",
  "disciplinaryActions": null,
  "profileUrl": "https://portal.nclbgc.org/Public/LicenseDetail/76235",
  "scrapedAt": "2026-04-15T10:30:00.000Z"
}
```

***

### Example Input & Output

#### Example 1 — Direct license number lookup

```json
{
  "licenseNumbers": ["76235", "45678"],
  "scrapeDetailPage": true
}
```

#### Example 2 — All active building contractors in Charlotte

```json
{
  "cities": ["Charlotte"],
  "classificationType": "Building",
  "maxResultsPerSearch": 200,
  "scrapeDetailPage": true
}
```

#### Example 3 — Bulk contractor verification list

```json
{
  "licenseNumbers": ["10001", "10002", "10003", "10004", "10005"],
  "scrapeDetailPage": true,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

#### Example 4 — Qualifier name search (find all licenses held by a person)

```json
{
  "qualifierFirstNames": ["John"],
  "qualifierLastNames": ["Smith"],
  "includeLikeSoundingNames": true,
  "scrapeDetailPage": true
}
```

#### Example 5 — Roofing contractors in a specific ZIP code

```json
{
  "zipCodes": ["28202"],
  "classificationType": "S (Roofing)",
  "maxResultsPerSearch": 50,
  "scrapeDetailPage": false
}
```

***

### Use Cases

#### Contractor Verification & Compliance

Instantly verify that a general contractor holds an active NCLBGC license before signing any agreement. In North Carolina, a general contractor license is required for any construction project valued at **$30,000 or more**. Confirm the license classification matches the project scope and that the limitation level covers the project value.

#### Lead Generation & Sales Intelligence

Build targeted lists of licensed contractors by trade classification, city or ZIP code. Identify companies by limitation tier (Unlimited contractors typically handle larger projects). Enrich existing CRM records with phone numbers, addresses and qualifier contacts.

#### Market Research & Competitive Analysis

Map contractor density across North Carolina municipalities and trade types. Understand market saturation in specific classifications (Building, Residential, Roofing, etc.). Track license issuance trends and renewal patterns.

#### Real Estate & Development Due Diligence

Verify subcontractors and general contractors used in renovation, development or construction projects. Cross-reference license numbers found in permit records with NCLBGC data.

#### Risk & Background Screening

Screen vendors and subcontractors for disciplinary actions, expired licenses, and inactive status before onboarding. Identify contractors who have had consent orders or disciplinary proceedings.

#### Legal & Insurance Research

Attorneys and insurers can pull license history, qualifier details, disciplinary records and limitation levels for litigation support, underwriting decisions or claims investigation.

#### Workforce & Qualifier Intelligence

Track individual qualifiers across multiple licenses. Understand which qualifiers support multiple companies. Identify qualifiers who have recently moved between organizations.

***

### Automation Platform Integration

This actor is fully compatible with leading no-code and low-code automation platforms.

#### n8n

Use the **Apify node** in n8n to run this actor on a schedule and route results to Google Sheets, Airtable, a CRM, Slack or a database.

```json
{
  "resource": "actor",
  "operation": "run",
  "actorId": "YOUR_USERNAME/nc-licensing-board-general-contractors-scraper",
  "input": {
    "licenseNumbers": ["{{ $json.licenseNumber }}"],
    "scrapeDetailPage": true
  }
}
```

#### Zapier

Connect via the **Apify Zapier integration**. Trigger a run when a new lead enters your CRM, look up the license number automatically, and update the record with status, limitation and qualifier data.

#### Make (Integromat)

Use the **Apify HTTP module** or the official Make–Apify integration to schedule daily or weekly refreshes of a contractor monitoring list.

#### Webhook / REST API

Start runs programmatically via the Apify API:

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/YOUR_USERNAME~nc-licensing-board-general-contractors-scraper/runs" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "licenseNumbers": ["76235"],
    "scrapeDetailPage": true
  }'
```

***

### Output Formats

Apify delivers results in multiple formats with no additional configuration:

| Format | Notes |
|--------|-------|
| **JSON** | Full nested objects including `qualifiers[]`, `classifications[]` and `disciplinaryActions[]` arrays |
| **CSV** | Arrays serialized as pipe-delimited strings; ideal for Excel / Google Sheets |
| **Excel (XLSX)** | Direct download for spreadsheet workflows |
| **XML** | For legacy enterprise system integrations |
| **JSONL** | Newline-delimited JSON; ideal for streaming data pipelines |
| **RSS** | Monitor status changes via RSS reader |

Access these from **Apify Console → Storage → Dataset → Export** or via the REST API at `/datasets/{id}/items?format={format}`.

***

### Classification Types Reference

The NCLBGC issues licenses in 30+ classification types grouped by trade:

#### General Classifications

| Code | Description | Typical Projects |
|------|-------------|-----------------|
| `Building` | General building contractor | Commercial, industrial, institutional construction |
| `Residential` | Residential construction | Homes, townhouses, condominiums |
| `Highway` | Highway & infrastructure | Roads, bridges, infrastructure |
| `Public Utilities` | Public utility projects | Water, sewer, gas, communications |
| `Unclassified` | Unclassified general work | Miscellaneous |

#### Specialty Classifications (S)

| Code | Description |
|------|-------------|
| `S (Roofing)` | Roofing installation and repair |
| `S (Concrete Construction)` | Concrete work |
| `S (Masonry Construction)` | Masonry, brick and block work |
| `S (Interior Construction)` | Interior finish work |
| `S (Swimming Pools)` | Pool construction |
| `S (Metal Erection)` | Structural and ornamental metal |
| `S (Insulation)` | Insulation installation |
| `S (Asbestos)` | Asbestos abatement |
| `S (Marine Construction)` | Docks, piers, marine structures |
| `S (Wind Turbine)` | Wind energy construction |
| `S (Sign/Billboard)` | Signage and billboards |
| `S (Sidewalk Curb & Gutter)` | Concrete flatwork |
| `S (Railroad Construction)` | Railroad infrastructure |
| `S (Boring & Tunneling)` | Underground boring |

#### Highway Sub-Classifications (H)

| Code | Description |
|------|-------------|
| `H (Grading & Excavating)` | Earthmoving and site preparation |

#### Public Utility Sub-Classifications (PU)

| Code | Description |
|------|-------------|
| `PU (Water Lines)` | Potable water distribution |
| `PU (Sewer Lines)` | Sanitary sewer systems |
| `PU (Sewage Disposal)` | Sewage treatment |
| `PU (Water Purification)` | Water treatment plants |
| `PU (Communications)` | Telecommunications infrastructure |
| `PU (Fuel Distribution)` | Gas and fuel pipelines |
| `PU(Electrical-Ahead of P.O.D.)` | Electrical utility work |

#### Accredited Programs

| Code | Description |
|------|-------------|
| `Accredited Builder` | NCHBA Accredited Builder program |
| `Accredited Master Builder` | NCHBA Accredited Master Builder program |

Full classification details: [nclbgc.org](https://www.nclbgc.org)

***

### Limitation Levels Reference

North Carolina general contractor licenses carry a **financial limitation** that caps the total project value the contractor is authorized to undertake:

| Limitation | Max Project Value | Typical Use |
|------------|-------------------|-------------|
| **Limited** | $500,000 | Smaller residential and light commercial projects |
| **Intermediate** | $1,000,000 | Mid-size commercial and residential |
| **Unlimited** | No cap | Large commercial, institutional, public works |

The limitation level is determined by the contractor's financial statement during licensing and must be renewed annually.

> **Important:** A contractor bidding on a project that exceeds their limitation level is in violation of NC law. Always verify the limitation matches the project scope.

***

### Technical Architecture

#### Target Platform

The NCLBGC contractor search portal runs on **ASP.NET MVC** at `portal.nclbgc.org`. This is a traditional server-rendered web application — search results are returned as full HTML pages containing a data table. There is no public REST API or JSON endpoint.

#### Scraping Strategy

1. **PlaywrightCrawler** (Crawlee) opens a headless Chromium browser and navigates to the search form at `/Public/Search`.
2. The actor fills in the appropriate form fields and submits the search.
3. The server returns a rendered HTML page with a results `<table>`. The actor parses each `<tr>` row by its column header positions.
4. For each result, the actor navigates to `/Public/LicenseDetail/{id}` to collect complete data including all qualifiers, issue date, and disciplinary actions.
5. Normalised records are pushed to the Apify Dataset.

#### Form Submission Approach

The NCLBGC portal uses standard HTTP POST form submission. The actor fills fields by name attribute (`CompanyName`, `LicenseNumber`, `ClassificationType`, etc.) and submits via button click. Session cookies are maintained automatically by Playwright's browser context.

#### Bot Protection Handling

- **Fingerprint injection**: Crawlee randomises browser fingerprints (User-Agent, Accept-Language, viewport, WebGL, Canvas) per session.
- **Apify Residential Proxies**: Each request routes through a different residential IP.
- **Session rotation**: Bad sessions are automatically retired and replaced.
- **Randomised timing**: Human-like delays (0.5–2 seconds) between interactions.
- **Retry logic**: Failed requests are retried up to 3 times with exponential back-off.

#### Cost Efficiency

- The NCLBGC portal is lightweight ASP.NET — pages load quickly compared to JavaScript-heavy SPAs.
- `scrapeDetailPage: false` skips detail navigation for fast bulk status checks.
- `maxConcurrency` of 3–5 balances throughput against proxy cost and memory.

***

### Cost & Performance

| Scenario | Records | Detail Pages | Est. Duration | Est. CUs |
|----------|---------|--------------|---------------|----------|
| Single license lookup | 1 | Yes | ~20 sec | 0.01 |
| 50 licenses (bulk verify) | 50 | Yes | ~10 min | 0.6 |
| City-wide search (Charlotte Building) | 200+ | No | ~10 min | 0.8 |
| Full classification scrape (S Roofing statewide) | 500+ | Yes | ~45 min | 4.0 |

*Estimates with `maxConcurrency: 3` and Apify residential proxies.*

***

### FAQ

**Q: Does this actor require an NCLBGC account or login?**
A: No. It uses the publicly accessible license search at `portal.nclbgc.org/Public/Search`. No credentials are required.

**Q: Is the data real-time?**
A: Yes. Each run fetches live data directly from the NCLBGC portal. License statuses, expiration dates and qualifier information reflect the current state of the board's database.

**Q: What does `limitation: "Unlimited"` mean?**
A: An Unlimited license has no cap on the total project value the contractor can undertake. `Limited` caps at $500,000 and `Intermediate` caps at $1,000,000 per project.

**Q: What is a "qualifier"?**
A: A qualifier is the individual who passed the required NCLBGC licensing exams on behalf of the company. The qualifier must remain actively employed by the licensee for the license to stay valid. If a qualifier leaves, the license may become inactive until a replacement is approved.

**Q: Can I search for all licenses held by one qualifier?**
A: Yes. Use `qualifierFirstNames` and `qualifierLastNames` inputs. The portal returns all licenses associated with that qualifier. Enable `includeLikeSoundingNames` if you are unsure of the exact spelling.

**Q: What proxy type is recommended?**
A: **Apify residential proxies** are recommended for production runs. The NCLBGC portal may apply rate limiting for unusual traffic patterns from datacenter IPs.

**Q: Can I run this on a schedule to monitor license status changes?**
A: Yes. Use the **Apify Scheduler** to run daily or weekly with a fixed list of `licenseNumbers`. Combine with **Apify webhooks** to receive alerts when a contractor's status or expiration date changes.

**Q: What happens if a contractor has multiple classifications?**
A: The list page may show only the primary classification. Enabling `scrapeDetailPage: true` navigates to the full detail page where all classifications are listed and returned as an array in the `classifications` field.

***

### Legal Notice

This actor scrapes the **publicly accessible** NCLBGC contractor search portal. All data is public information provided by the North Carolina Licensing Board for General Contractors. Use the data in compliance with applicable laws and the [Apify Terms of Service](https://apify.com/terms-of-use). Do not use the data for spam, harassment, or any purpose prohibited by North Carolina law.

# Actor input Schema

## `licenseNumbers` (type: `array`):

One or more NCLBGC license numbers to look up directly (e.g. '76235'). Fastest and most precise search method — returns an exact match.

## `companyNames` (type: `array`):

Business or company names to search. Partial matches are supported. Each entry triggers a separate search and may return multiple results.

## `qualifierFirstNames` (type: `array`):

First name(s) of the qualifier (the individual who passed the licensing exams on behalf of the license). Use together with Qualifier Last Names for best results.

## `qualifierLastNames` (type: `array`):

Last name(s) of the qualifier. Can be used alone or paired with First Names. Pairing first + last names produces a more precise search.

## `cities` (type: `array`):

North Carolina city names to search by location (e.g. 'Raleigh', 'Charlotte', 'Durham'). Can be combined with classification type for targeted trade searches.

## `zipCodes` (type: `array`):

ZIP codes to search by location (e.g. '27601'). Useful for hyper-local contractor searches in a specific area.

## `classificationType` (type: `string`):

Filter results by license classification type. 'ALL' returns all classifications. Select a specific classification to narrow results to a particular trade or project type.

## `includeLikeSoundingNames` (type: `boolean`):

When enabled, the NCLBGC portal expands name searches to include phonetically similar names (e.g. 'Smith' also returns 'Smyth'). Useful when the exact spelling is uncertain.

## `maxResultsPerSearch` (type: `integer`):

Maximum number of contractor records to collect per individual search query. Set to 0 for unlimited. For broad city or classification searches this can be very large.

## `scrapeDetailPage` (type: `boolean`):

When enabled, the scraper navigates to each contractor's detail page to collect complete information: all classifications, limitation level, qualifier details, expiration date, and any disciplinary actions. Increases run time but returns richer data.

## `proxyConfiguration` (type: `object`):

Proxy settings for requests to the NCLBGC portal. Apify residential proxies are recommended for production bulk runs to avoid rate limiting.

## `maxConcurrency` (type: `integer`):

Maximum number of parallel browser tabs. Higher values speed up bulk runs but consume more memory. Recommended: 2–5.

## Actor input object example

```json
{
  "licenseNumbers": [],
  "companyNames": [],
  "qualifierFirstNames": [],
  "qualifierLastNames": [],
  "cities": [],
  "zipCodes": [],
  "classificationType": "ALL",
  "includeLikeSoundingNames": false,
  "maxResultsPerSearch": 100,
  "scrapeDetailPage": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 3
}
```

# Actor output Schema

## `licenseNumber` (type: `string`):

NCLBGC license number

## `licenseStatus` (type: `string`):

Active, Inactive, Expired, or Revoked

## `companyName` (type: `string`):

Registered business / company name

## `licenseType` (type: `string`):

General, Residential, Specialty, etc.

## `limitation` (type: `string`):

Project value limit: Limited ($500K), Intermediate ($1M), Unlimited

## `classifications` (type: `string`):

Array of classification codes held by this license

## `qualifiers` (type: `string`):

Array of qualifier objects with name, number and classifications

## `primaryQualifier` (type: `string`):

Name of the primary qualifier on the license

## `qualifierNumber` (type: `string`):

Qualifier ID number of the primary qualifier

## `phone` (type: `string`):

Business phone number as listed on NCLBGC record

## `streetAddress` (type: `string`):

Business street address

## `city` (type: `string`):

Business city

## `state` (type: `string`):

Business state (typically NC)

## `zip` (type: `string`):

Business ZIP code

## `expirationDate` (type: `string`):

License expiration date (YYYY-MM-DD)

## `issueDate` (type: `string`):

License original issue date (YYYY-MM-DD)

## `disciplinaryActions` (type: `string`):

Array of disciplinary action records if any

## `profileUrl` (type: `string`):

Direct URL to the contractor's NCLBGC detail page

## `scrapedAt` (type: `string`):

ISO 8601 timestamp of when the record was scraped

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "licenseNumbers": [],
    "companyNames": [],
    "qualifierFirstNames": [],
    "qualifierLastNames": [],
    "cities": [],
    "zipCodes": [],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/nc-licensing-board-for-general-contractors-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "licenseNumbers": [],
    "companyNames": [],
    "qualifierFirstNames": [],
    "qualifierLastNames": [],
    "cities": [],
    "zipCodes": [],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/nc-licensing-board-for-general-contractors-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "licenseNumbers": [],
  "companyNames": [],
  "qualifierFirstNames": [],
  "qualifierLastNames": [],
  "cities": [],
  "zipCodes": [],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call haketa/nc-licensing-board-for-general-contractors-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=haketa/nc-licensing-board-for-general-contractors-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NC Licensing Board for General Contractors Scraper",
        "description": "Scrape NC Licensing Board (NCLBGC) general contractor licenses. Search by license number, company, qualifier, city or classification. Returns status, limitations, qualifiers, classifications and expiration data.",
        "version": "0.0",
        "x-build-id": "hjjEWqP0ZDu9I3wSU"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/haketa~nc-licensing-board-for-general-contractors-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-haketa-nc-licensing-board-for-general-contractors-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/haketa~nc-licensing-board-for-general-contractors-scraper/runs": {
            "post": {
                "operationId": "runs-sync-haketa-nc-licensing-board-for-general-contractors-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/haketa~nc-licensing-board-for-general-contractors-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-haketa-nc-licensing-board-for-general-contractors-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": {
                    "licenseNumbers": {
                        "title": "License Numbers",
                        "type": "array",
                        "description": "One or more NCLBGC license numbers to look up directly (e.g. '76235'). Fastest and most precise search method — returns an exact match.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "companyNames": {
                        "title": "Company / Business Names",
                        "type": "array",
                        "description": "Business or company names to search. Partial matches are supported. Each entry triggers a separate search and may return multiple results.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "qualifierFirstNames": {
                        "title": "Qualifier First Names",
                        "type": "array",
                        "description": "First name(s) of the qualifier (the individual who passed the licensing exams on behalf of the license). Use together with Qualifier Last Names for best results.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "qualifierLastNames": {
                        "title": "Qualifier Last Names",
                        "type": "array",
                        "description": "Last name(s) of the qualifier. Can be used alone or paired with First Names. Pairing first + last names produces a more precise search.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "cities": {
                        "title": "Cities",
                        "type": "array",
                        "description": "North Carolina city names to search by location (e.g. 'Raleigh', 'Charlotte', 'Durham'). Can be combined with classification type for targeted trade searches.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "zipCodes": {
                        "title": "ZIP Codes",
                        "type": "array",
                        "description": "ZIP codes to search by location (e.g. '27601'). Useful for hyper-local contractor searches in a specific area.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "classificationType": {
                        "title": "Classification Type",
                        "enum": [
                            "ALL",
                            "Building",
                            "Residential",
                            "Highway",
                            "Public Utilities",
                            "H (Grading & Excavating)",
                            "PU (Communications)",
                            "PU (Fuel Distribution)",
                            "PU (Sewage Disposal)",
                            "PU (Sewer Lines)",
                            "PU (Water Lines)",
                            "PU(Electrical-Ahead of P.O.D.)",
                            "PU(Water Lines & Sewer Lines)",
                            "PU(Water Pur. & Sewage Disp.)",
                            "PU(Water Purification)",
                            "S (Asbestos)",
                            "S (Boring & Tunneling)",
                            "S (Concrete Construction)",
                            "S (Insulation)",
                            "S (Interior Construction)",
                            "S (Marine Construction)",
                            "S (Masonry Construction)",
                            "S (Metal Erection)",
                            "S (Railroad Construction)",
                            "S (Roofing)",
                            "S (Sidewalk Curb & Gutter)",
                            "S (Sign/Billboard)",
                            "S (Swimming Pools)",
                            "S (Wind Turbine)",
                            "Accredited Builder",
                            "Accredited Master Builder",
                            "Unclassified"
                        ],
                        "type": "string",
                        "description": "Filter results by license classification type. 'ALL' returns all classifications. Select a specific classification to narrow results to a particular trade or project type.",
                        "default": "ALL"
                    },
                    "includeLikeSoundingNames": {
                        "title": "Include Like-Sounding Names",
                        "type": "boolean",
                        "description": "When enabled, the NCLBGC portal expands name searches to include phonetically similar names (e.g. 'Smith' also returns 'Smyth'). Useful when the exact spelling is uncertain.",
                        "default": false
                    },
                    "maxResultsPerSearch": {
                        "title": "Max Results per Search Query",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of contractor records to collect per individual search query. Set to 0 for unlimited. For broad city or classification searches this can be very large.",
                        "default": 100
                    },
                    "scrapeDetailPage": {
                        "title": "Scrape Full Detail Page",
                        "type": "boolean",
                        "description": "When enabled, the scraper navigates to each contractor's detail page to collect complete information: all classifications, limitation level, qualifier details, expiration date, and any disciplinary actions. Increases run time but returns richer data.",
                        "default": true
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for requests to the NCLBGC portal. Apify residential proxies are recommended for production bulk runs to avoid rate limiting."
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrent Browsers",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum number of parallel browser tabs. Higher values speed up bulk runs but consume more memory. Recommended: 2–5.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
