# Texas Contractor Directory & Leads Scraper (TDLR) (`fried_calamaries/texas-contractor-directory-leads-scraper`) Actor

Pull every TDLR-licensed contractor in any Texas county — name, license type, expiration, address, phone — direct from the official state open-data API.

- **URL**: https://apify.com/fried\_calamaries/texas-contractor-directory-leads-scraper.md
- **Developed by:** [ByteMe](https://apify.com/fried_calamaries) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.002 / contractor records

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/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

## Texas Contractor Directory & Leads Scraper (TDLR)

### Pain points

- The TDLR portal lets you search one licensee at a time — there's no way to export every contractor in a county as a spreadsheet.
- Building a county-scoped contractor prospect list by hand from the TDLR website takes hours of copy-paste work.
- Marketing teams and GCs need fresh, structured contact data for a territory — not a slow per-lookup search tool.

### What we solve

- Pull every TDLR licensee in any Texas county in one run — no per-record search, no manual export.
- Returns license number, type, subtype, expiration, business name, owner, address, and phone, structured and ready to import.
- Filter by license type (e.g. 'A/C Contractor', 'Electrician') to narrow the list before it lands in your CRM.

### Summary

Browse the complete roster of TDLR-licensed contractors and tradespeople in any Texas county — just supply a county name and get back every licensee on record: license number, type, expiration, business name, owner, address, and phone. Filter by license type to pull only electricians, HVAC/AC contractors, or any other TDLR-regulated trade. Data comes straight from the official Texas Department of Licensing & Regulation (TDLR) open-data API — authoritative, refreshed daily, no scraping fees beyond the flat per-record PPE charge. Ideal for building targeted contractor prospect lists, territory-scoped outreach campaigns, or compliance coverage maps.

### Who it's for

- Sales and BD teams building county-scoped HVAC, electrical, or trade contractor prospect lists
- Marketing agencies running direct-mail or digital campaigns targeting licensed Texas contractors
- General contractors and developers building subcontractor shortlists by county and trade type
- Compliance teams and insurance underwriters mapping licensed coverage in a service territory

### 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
{
  "county": "TRAVIS",
  "licenseType": "A/C Contractor",
  "maxResults": 200
}
````

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

### What you get

One row per record:

| Field | Description |
|---|---|
| `state` | Always 'TX' for this actor |
| `license_number` | TDLR license number |
| `business_name` | Licensed business or licensee name |
| `person_name` | Owner or individual licensee name |
| `license_type` | TDLR license type (e.g. A/C Contractor, Master Electrician, Plumber) |
| `license_subtype` | TDLR subtype code (e.g. BE, REG, CER, RAIC) |
| `expiration_date` | License expiration date (MM/DD/YYYY) |
| `county` | Texas county of the business address |
| `address` | Business street address (when published in TDLR data) |
| `city_state_zip` | Business city, state, and ZIP (when published) |
| `phone` | Business phone number (when published) |
| `source_url` | Link to the official TDLR open-data dataset |

Sample:

```json
{
  "state": "TX",
  "license_number": "11216",
  "business_name": "GALVAN AIR",
  "person_name": "GALVAN, ROLAND",
  "license_type": "A/C Contractor",
  "license_subtype": "BE",
  "expiration_date": "10/24/2026",
  "county": "TRAVIS",
  "address": "1234 MAIN ST",
  "city_state_zip": "AUSTIN TX 78701",
  "phone": "5125550100",
  "source_url": "https://data.texas.gov/dataset/Texas-Department-of-Licensing-and-Regulation/7358-krk7"
}
```

### Inputs

| Field | Required | Type | Default | Description |
|---|---|---|---|---|
| `county` | yes | string | `"TRAVIS"` | Texas county name to browse (e.g. TRAVIS, HARRIS, DALLAS). Case-insensitive. Required. |
| `licenseType` | no | string | — | Optional substring filter on license type (e.g. 'A/C Contractor', 'Electrician', 'Plumber'). Leave blank to return all license types in the county. |
| `maxResults` | no | integer | `500` | Cap on the number of records returned in a single run. Default 500; raise to pull an entire county roster. |

### Pricing (Pay Per Event)

You pay per result (`dataset-item`) — **no charge for empty runs**. Example: **500 contractor records** at *$0.002/result* ≈ **$1.00**.

Illustrative — the final per-record price is set at publish time. Apify platform usage (compute) is billed separately per your plan.

### Use cases

- Outbound lead generation — pull every A/C contractor or electrician in Travis or Harris County, enrich with phone and address, and load into your CRM for cold outreach.
- Territory mapping — build a full picture of licensed trade coverage in a county for market-entry research or competitive analysis.
- Subcontractor discovery — find every licensed HVAC or electrical contractor in a county before bidding a commercial project.
- Compliance auditing — export the county roster to verify that vendors on your approved-supplier list are still licensed and current.

### Why this actor

- Direct from the official TDLR open-data API — authoritative state data refreshed daily, not a stale third-party copy.
- County-scoped, not one-at-a-time — pull an entire county roster in one run instead of searching license-by-license.
- License-type filter narrows results before they hit your dataset — HVAC only, electricians only, or the full mix.
- Pay per record; no results, no charge.

### Limitations & updates

Covers Texas TDLR-regulated trades only — excludes general contractors (no statewide TX GC license) and plumbers (TSBPE board, separate dataset). Address, phone, and city/ZIP fields are published by TDLR when on file and may be null for individual licensees. County filter matches the business address county; licensees whose mailing county differs may not appear. Data freshness reflects the daily TDLR open-data export.

### FAQ

**Where does the data come from?**

The official Texas Department of Licensing & Regulation (TDLR) open-data registry, published on data.texas.gov and refreshed daily.

**What trades does TDLR license?**

TDLR licenses electricians, HVAC/AC contractors and technicians, appliance installers, boiler operators, cosmetologists, behavior analysts, and dozens of other trades — but NOT general contractors (Texas has no statewide GC license) and NOT plumbers (licensed by the separate TSBPE board).

**How do I find the right county name to use?**

Texas county names in the TDLR dataset are in ALL CAPS (e.g. TRAVIS, HARRIS, DALLAS). The actor accepts any case and normalizes it for you.

**How many records can I pull?**

Harris County alone has over 100,000 TDLR licensees; Travis has ~36,000. Set maxResults as high as you need — the actor pages through Socrata's API automatically.

**Can I filter by license type?**

Yes — pass a partial string in licenseType (e.g. 'A/C Contractor', 'Electrician') to restrict results to that trade type within the county.

**How am I charged?**

Pay-per-record — one PPE event per dataset item returned. Runs with no results incur no charge.

**Is this personal data?**

It's public professional-license data (business and license records as TDLR publishes them); we add no personal/PII enrichment beyond what the state publishes.

**How current is the data?**

TDLR refreshes the open-data export daily; records reflect the most recent published snapshot.

### Which actor to choose

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

- **Texas Contractor & Trade License Lookup (TDLR)** — You need to verify a specific Texas TDLR license by number or business name — one licensee at a time.
- **California Contractor Directory & Leads Scraper (CSLB)** — You want a county-scoped roster of California licensed contractors from the CSLB.
- **Washington Contractor Directory & Leads Scraper (L\&I)** — You want a county-scoped roster of Washington licensed contractors from L\&I.
- **Multi-State Contractor & Trade License Lookup** — You need the same contractor verified across TX, WA, OR, CA, and other states in one run.

# Actor input Schema

## `county` (type: `string`):

Texas county name to browse (e.g. TRAVIS, HARRIS, DALLAS). Case-insensitive. Required.

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

Optional substring filter on license type (e.g. 'A/C Contractor', 'Electrician', 'Plumber'). Leave blank to return all license types in the county.

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

Cap on the number of records returned in a single run. Default 500; raise to pull an entire county roster.

## Actor input object example

```json
{
  "county": "TRAVIS",
  "maxResults": 500
}
```

# Actor output Schema

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

All TDLR licensees found in the requested county.

# 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 = {
    "county": "TRAVIS"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fried_calamaries/texas-contractor-directory-leads-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 = { "county": "TRAVIS" }

# Run the Actor and wait for it to finish
run = client.actor("fried_calamaries/texas-contractor-directory-leads-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 '{
  "county": "TRAVIS"
}' |
apify call fried_calamaries/texas-contractor-directory-leads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=fried_calamaries/texas-contractor-directory-leads-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Texas Contractor Directory & Leads Scraper (TDLR)",
        "description": "Pull every TDLR-licensed contractor in any Texas county — name, license type, expiration, address, phone — direct from the official state open-data API.",
        "version": "0.0",
        "x-build-id": "X9fm3Pc8PYEMI5J4X"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/fried_calamaries~texas-contractor-directory-leads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-fried_calamaries-texas-contractor-directory-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/fried_calamaries~texas-contractor-directory-leads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-fried_calamaries-texas-contractor-directory-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/fried_calamaries~texas-contractor-directory-leads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-fried_calamaries-texas-contractor-directory-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",
                "required": [
                    "county"
                ],
                "properties": {
                    "county": {
                        "title": "County",
                        "type": "string",
                        "description": "Texas county name to browse (e.g. TRAVIS, HARRIS, DALLAS). Case-insensitive. Required."
                    },
                    "licenseType": {
                        "title": "License type filter",
                        "type": "string",
                        "description": "Optional substring filter on license type (e.g. 'A/C Contractor', 'Electrician', 'Plumber'). Leave blank to return all license types in the county."
                    },
                    "maxResults": {
                        "title": "Maximum results",
                        "minimum": 1,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Cap on the number of records returned in a single run. Default 500; raise to pull an entire county roster.",
                        "default": 500
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
