# Maryland Contractor License Lookup & Export (MHIC) (`scrapebench/maryland-contractor-license-lookup`) Actor

Look up any Maryland MHIC home improvement licence by registration number or name, or export every active licence statewide (21,622 on 2026-10-12) with street address and expiry.

- **URL**: https://apify.com/scrapebench/maryland-contractor-license-lookup.md
- **Developed by:** [ScrapeBench](https://apify.com/scrapebench) (community)
- **Categories:** Lead generation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.004 / license record

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Maryland Contractor License Lookup & Export (MHIC)

### Pain points

- MHIC's public query shows 50 licences per page and answers one city, ZIP, name or number at a time, so listing Maryland's 21,622 active licences means stepping through more than 430 result pages.
- The query has no download: building a list means copying each page by hand.
- Trade names longer than the results column are cut off and finish inside the address cell, so a copied list mixes company names into street addresses.

### What we solve

- Export the whole state, or one city or ZIP, in one run; filter by name or drop out-of-state licensees, each with a batch list.
- Every row comes back with the trade name rejoined and the street address separated from it.
- Verify licences in bulk: a list of registration numbers or business/person names returns each matching active licence with its expiry date.

### Summary

Maryland home improvement contractor licences from the Maryland Home Improvement Commission (MHIC) public query, two ways. Export mode reads every active licence in the state — 21,622 on 2026-10-12 — or just the cities and ZIP codes you name, and filters by name or Maryland-only addresses. Lookup mode takes MHIC registration numbers or business/person names and returns each matching active licence. Every row has the licensee, trade name, business street address, city, state, ZIP, category, registration number and expiry. Pay per licence returned.

### Who it's for

- Sales teams selling materials, equipment, insurance or software to Maryland home improvement contractors
- Lead-generation agencies building contractor lists by city or ZIP
- Remodelers, roofers and suppliers looking for licensed subcontractors near a job
- Compliance, insurance and lending teams checking that an MHIC licence is active

### How to use

Set the input, run the actor, and collect results from the run's dataset (export to JSON/CSV/Excel, or pull via the Apify API). Example input:

```json
{
  "city": "Baltimore",
  "maxResults": 2000
}
```

See **Inputs** below for every available field.

### What you get

One row per record:

| Field | Description |
|---|---|
| `license_number` | MHIC registration number (Reg. #) |
| `license_suffix` | Registration suffix (-01, -02 ...) when MHIC shows one |
| `person_name` | The licensed individual |
| `business_name` | Trade name, rejoined when MHIC's column cut it |
| `address` | Business street address |
| `city` | Business city |
| `address_state` | Business state (out-of-state firms hold MHIC licences) |
| `zip_code` | Business ZIP |
| `expiration_date` | Licence expiry date |
| `license_category` | MHIC category, e.g. CONTRACTOR/SALESMAN |
| `business_reference` | The unlabelled 05-NNNNNN number MHIC prints with the address |
| `status` | Always Active (MHIC lists active licences only) |
| `source_url` | MHIC's public query page |

Sample:

```json
{
  "license_number": "161740",
  "license_suffix": null,
  "person_name": "TSGAKRSTOS A DAFLA",
  "business_name": "A TEAM LLC",
  "address": "710 GEORGE ST",
  "city": "BALTIMORE",
  "address_state": "MD",
  "zip_code": "21201",
  "expiration_date": "2027-05-07",
  "license_category": "CONTRACTOR/SALESMAN",
  "business_reference": "05-163491",
  "status": "Active",
  "phone": null,
  "matched_by": "license_number",
  "license_type": "Home Improvement License",
  "state": "MD",
  "source_url": "https://www.dllr.state.md.us/cgi-bin/ElectronicLicensing/OP_Search/OP_search.cgi?calling_app=HIC::HIC_business_location"
}
```

### Inputs

| Field | Required | Type | Default | Description |
|---|---|---|---|---|
| `query` | no | string | — | An MHIC registration number ('161740'), a business name or part of one ('Titan'), or a person's name ('Peter Krug' — the person index is searched by last name, then every word you typed must appear). Leave empty to run an export instead. |
| `queries` | no | array | `[]` | Several lookups in ONE run, one per line. Combined with the field above if you fill both. |
| `city` | no | string | — | Business-address city, exact match ignoring case and punctuation, e.g. 'Silver Spring'. MHIC lists licensees by business address, not by where they work. |
| `cities` | no | array | `[]` | Several cities in ONE export. |
| `zipCode` | no | string | — | 5-digit business ZIP, e.g. '21201'. |
| `zipCodes` | no | array | `[]` | Several ZIP codes in ONE export. |
| `nameFilter` | no | string | — | Case-insensitive text in the trade name or the licensee's name, e.g. 'roofing'. |
| `nameFilters` | no | array | `[]` | Several name fragments in ONE export; a licence matching any of them is returned once. |
| `marylandAddressesOnly` | no | boolean | `false` | Out-of-state contractors can hold an MHIC licence. Tick to drop licences whose business address is outside Maryland. |
| `maxResults` | no | integer | `500` | EXPORT: cap on licences for the WHOLE run — your spend control (set 100000 to take every active licence). LOOKUP: cap per name or number (default 50). |
| `proxyConfiguration` | no | object | `{"useApifyProxy": false}` | Not needed: Maryland's licence query answers Apify's own IPs. Leave it off unless a run reports it was blocked. |

### Pricing (Pay Per Event)

You pay per result (`dataset-item`) — **no charge for empty runs**. Example: **1552 Baltimore home improvement contractors** at *$0.004/result* ≈ **$6.21**.

The default export (500 licences) costs $2.00; the whole state (21,622 active licences on 2026-10-12) costs $86.49 at maxResults 100000. Apify platform usage is billed separately.

### Use cases

- Territory prospecting: export every licensed home improvement contractor in Baltimore, Silver Spring and Rockville with street address for direct mail.
- Statewide list build: take all active licences once, then re-run monthly and compare registration numbers to catch new licensees.
- Renewal outreach: sort the export by expiry date to reach contractors whose licence runs out this quarter.
- Vendor compliance: run your contractors' MHIC numbers as a lookup batch and flag any that no longer come back active.

### Why this actor

- Street address on 21,621 of the 21,622 active licences and ZIP and expiry on all of them, in one statewide run of about 15 minutes (measured on Apify 2026-10-12).
- Read live from MHIC's own public query on every run, not from a stored copy.
- Filter by city, ZIP, name or Maryland-only addresses; a value it cannot use is reported in a free notice row, never silently widened to the whole state.
- Pay per licence returned; outage, cut-short and bad-input notices are free.

### Limitations & updates

Active licences only, because MHIC's public query lists only those. No phone and no email: MHIC publishes neither. City and ZIP are the business address MHIC holds, not where the contractor works. MHIC's query paginates 50 at a time and is rate-limited, so the whole state takes about 15 minutes; a ZIP export takes seconds. If MHIC's rate limit refuses the run for several minutes, the searches it could not finish come back as free notice rows. The address cell is free text: a handful of entries put part of a trade name or a note on the street line, and 1 licence has no street at all. The query shows a reCAPTCHA widget that it does not enforce today; if MHIC starts enforcing it, runs return a free notice row instead of data until the actor is updated.

### FAQ

**Where does the data come from?**

From the Maryland Home Improvement Commission's public licence query, run by the Maryland Department of Labor (dllr.state.md.us). Every run reads it live.

**How many licences are there?**

21,622 active licences on 2026-10-12, across 1,225 business cities. Largest: Baltimore 1,552, Silver Spring 1,006, Rockville 555, Gaithersburg 540, Frederick 524. 41 carry the Authorized Solar Contractor category; the rest are CONTRACTOR/SALESMAN.

**Is there a phone number or email?**

No. MHIC's public query publishes no phone number and no email, so the phone column is always empty. You get the licensee, trade name and full business street address.

**Lookup or export — which do I use?**

Lookup when you have registration numbers or names: fill 'License number or name' (or the batch list). A name searches both MHIC's business-name index and its personal-name index. Export when you want a list: leave that field empty and set a city, ZIP or name filter, or nothing for the whole state.

**Does it include out-of-state contractors?**

Yes: 2,229 of the 21,622 active licences (10.3%) have a business address outside Maryland, most often Virginia (933), Pennsylvania (516), Delaware (256) and DC (146). Tick 'Maryland business addresses only' to drop them.

**Why are only active licences returned?**

MHIC's public query lists active licences only; licensees on inactive status are left out by MHIC itself. A licence that no longer appears in a lookup is not active.

**What is business_reference?**

MHIC prints a number such as 05-163491 in front of the street address on 75% of rows and does not label it. It is passed through as found so you can group licensees who share one; it is not the registration number (that is license_number).

**How am I charged?**

$0.004 per licence returned. The default export returns 500 licences ($2.00); Baltimore's 1,552 cost $6.21; the whole state is $86.49. Notice rows are free.

### Which actor to choose

Part of the contractor-data suite — pick the one that fits your goal:

- **Delaware Contractor License Lookup & Export (DOR + DPR)** — You need Delaware contractors — a statewide export with street addresses.
- **DC Contractor License Lookup & Export (DLCP)** — You need contractors licensed in the District of Columbia, including home improvement.
- **Iowa Contractor License Lookup & Export (DIAL)** — You need Iowa contractors — the active DIAL roster with phone and email, by trade and county.
- **Arizona Contractor License Lookup & Export (ROC)** — You need Arizona contractors — every active ROC licence with phone, by class and city.
- **Mississippi Contractor License Lookup & Export (MSBOC)** — You need Mississippi contractors — the active MSBOC roster with phone, street address and classifications, by county or class.
- **Ohio Contractor License Lookup & Export (OCILB)** — You need Ohio electrical, HVAC, plumbing, hydronics or refrigeration contractors — the full OCILB roster, by trade and county.
- **Nebraska Contractor Registration Lookup & Export (NDOL)** — You need Nebraska contractors — every current NDOL registration, by service and county, with phone on request.
- **West Virginia Contractor License Lookup & Export (WVCLB)** — You need West Virginia contractors — every current WVCLB licence with phone and mailing address, by county or classification.
- **Colorado Electrical & Plumbing License Lookup & Export (DORA)** — You need Colorado electrical or plumbing licences — contractors, masters and journeymen statewide, with status and public disciplinary actions.
- **New Jersey Contractor License Lookup & Export (DCA)** — You need New Jersey contractors — active DCA home improvement, electrical, master plumber and HVACR licences statewide or by city, with street address and owner for home improvement firms.

### Guides & use cases

Written up on **[scrapebench.dev](https://scrapebench.dev)** — the bench that runs and verifies this actor against the live source every night:

- **How-to:** [How to run Maryland Contractor License Lookup & Export (MHIC)](https://scrapebench.dev/guides/how-to-maryland-contractor-license-lookup/)
- **Use case:** [Export Annapolis, Maryland Home Improvement Contractors](https://scrapebench.dev/use-cases/annapolis-home-improvement-contractors/)
- **Use case:** [Verify Maryland MHIC Contractor Licenses](https://scrapebench.dev/use-cases/maryland-mhic-license-verification/)

More actors, coverage and nightly verification results: **[scrapebench.dev](https://scrapebench.dev)**

### Works with AI assistants (MCP)

Callable as an MCP tool, so Claude, Cursor, VS Code Copilot and other MCP clients can run it directly. Grab the config from the [MCP tab](https://apify.com/scrapebench/maryland-contractor-license-lookup/api/mcp) on this page — Apify hosts the server and keeps that snippet current, and OAuth signs you in on first connect, so no API token goes in your config file.

Then just ask:

> "List the active Maryland home improvement contractors with a business address in ZIP 21201, with trade name, street address and licence expiry."

That input returned 33 licences on 2026-10-12. With no filters and no name it exports the whole state (21,622 licences), so set a city or ZIP before running it from an agent. Runs started this way bill exactly like any other run.

# Changelog

This Actor's version history is a separate document: https://apify.com/scrapebench/maryland-contractor-license-lookup/changelog.md

# Actor input Schema

## `query` (type: `string`):

An MHIC registration number ('161740'), a business name or part of one ('Titan'), or a person's name ('Peter Krug' — the person index is searched by last name, then every word you typed must appear). Leave empty to run an export instead.

## `queries` (type: `array`):

Several lookups in ONE run, one per line. Combined with the field above if you fill both.

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

Business-address city, exact match ignoring case and punctuation, e.g. 'Silver Spring'. MHIC lists licensees by business address, not by where they work.

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

Several cities in ONE export.

## `zipCode` (type: `string`):

5-digit business ZIP, e.g. '21201'.

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

Several ZIP codes in ONE export.

## `nameFilter` (type: `string`):

Case-insensitive text in the trade name or the licensee's name, e.g. 'roofing'.

## `nameFilters` (type: `array`):

Several name fragments in ONE export; a licence matching any of them is returned once.

## `marylandAddressesOnly` (type: `boolean`):

Out-of-state contractors can hold an MHIC licence. Tick to drop licences whose business address is outside Maryland.

## `maxResults` (type: `integer`):

EXPORT: cap on licences for the WHOLE run — your spend control (set 100000 to take every active licence). LOOKUP: cap per name or number (default 50).

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

Not needed: Maryland's licence query answers Apify's own IPs. Leave it off unless a run reports it was blocked.

## Actor input object example

```json
{
  "query": "161740",
  "queries": [],
  "city": "Bowie",
  "cities": [],
  "zipCodes": [],
  "nameFilters": [],
  "marylandAddressesOnly": false,
  "maxResults": 500,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Each row is one MHIC licence: licensee, trade name, business street address, city, state, ZIP, category, registration number and expiry.

# 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 = {
    "maxResults": 500,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapebench/maryland-contractor-license-lookup").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 = {
    "maxResults": 500,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapebench/maryland-contractor-license-lookup").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "maxResults": 500,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scrapebench/maryland-contractor-license-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapebench/maryland-contractor-license-lookup"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pww24P9WYBAEtEsHc/builds/8clYuLugEBWArOUcB/openapi.json
