# Texas TDLR License Scraper — Contractor Data (`muhammadafzal/tdlr-texas-scraper`) Actor

Scrape Texas TDLR license records with holder names, business details, license types, status, locations, and expiration information.

- **URL**: https://apify.com/muhammadafzal/tdlr-texas-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Lead generation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 1,000 tdlr license records

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 TDLR License Scraper — Contractor Data

> Scrapes the **Texas Department of Licensing and Regulation (TDLR)** public license database and returns complete, structured licensee records — license number, type, class, business name, contact details, status, issue/expiration dates, **bond amount**, **insurance amount**, **sponsor**, and **discipline/violations**.

Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.

***

### Why use this actor

- **Full license detail** — not just the search-results row. Every record carries the detail-page data: bond, insurance, sponsor, discipline, and violations.
- **80+ license program types** — Electricians, Air Conditioning Contractors, Elevator Contractors, Cosmetologists, Barbers, Massage Therapists, Mold Remediation, and every other TDLR program.
- **Flexible filtering** — by license type, license number, business name, owner name, city, county, ZIP code, or technician tier (Registered / Certified).
- **Contractor lead-gen ready** — Electrician and Elevator Contractor records include address, phone, and email. Drop straight into HubSpot/Salesforce.
- **Compliance / verification** — verify a contractor's license status, bond, and insurance before hiring. Perfect for insurance underwriters, HOAs, and GCs.
- **MCP/AI-agent friendly** — semantic field names, field-level output schema, predictable `maxResults`, and a per-record pricing model an agent can budget.

### What it outputs

One dataset item per TDLR license:

| Field | Type | Example |
|------|------|---------|
| `licenseNumber` | string | `80019` |
| `licenseType` | string | `Electricians` |
| `licenseClass` | string | `Master` |
| `licenseDescription` | string | `Master Electrician` |
| `businessName` | string | `Acme Electric LLC` |
| `contactName` | string | `John Smith` |
| `address` | string | `123 Main St` |
| `city` | string | `Austin` |
| `state` | string | `TX` |
| `zipCode` | string | `78701` |
| `county` | string | `Travis` |
| `phone` | string | `(512) 555-0100` |
| `email` | string | `info@acmeelectric.com` |
| `status` | string | `Active` |
| `issueDate` | string | `2021-01-15` |
| `expirationDate` | string | `2026-01-15` |
| `renewalDate` | string | `2024-01-15` |
| `bondAmount` | string | `$10,000` |
| `insuranceAmount` | string | `$500,000` |
| `sponsor` | string | `Acme Electric LLC` |
| `sponsorLicenseNumber` | string | `80019` |
| `sponsorExpiration` | string | `2026-01-15` |
| `discipline` | string | `None` |
| `violations` | string | `None` |
| `detailUrl` | string | `https://www.tdlr.texas.gov/LicenseSearch/Detail/80019` |
| `scraped_at` | string | `2026-07-01T20:35:00.000Z` |
| `source_url` | string | `https://www.tdlr.texas.gov/LicenseSearch/` |

> **Note:** `phone`, `email`, `bondAmount`, `insuranceAmount`, `sponsor*` are published by TDLR only for license programs that collect them (Electricians, Elevator Contractors, Air Conditioning Contractors). For other programs these fields will be `null`.

### Input parameters

| Field | Type | Required | Description |
|------|------|---------|-------------|
| `licenseType` | enum | recommended | TDLR license program (e.g. `Electricians`). |
| `licenseNumber` | string | no | Look up a specific license number. |
| `businessName` | string | no | Full/partial business name. |
| `ownerName` | string | no | Individual/owner license holder name. |
| `city` | string | no | Texas city (free text). |
| `county` | enum | no | Texas county (official list, incl. `Out Of State`). |
| `zipCode` | string | no | 5-digit ZIP. |
| `technicianType` | enum | no | `All` / `Registered` / `Certified` (Electricians and A/C only). |
| `maxResults` | integer | no | Max records to return. Default `50`. |

At least **one** filter is required. `licenseType` alone is the most common entry point.

### Pricing

| Event | Price | When charged |
|------|------|--------------|
| `result-item` | **$0.025** | Per TDLR license record saved to the dataset |
| `apify-actor-start` | $0.00005 | Once per run |

A typical small pull of 100 licensed-electrician leads costs ≈ **$2.50** + a few cents compute. There is **no charge for runs that return 0 results**.

### Quickstart

```bash
## 1. Install + run locally against the live TDLR site
cd tdlr-texas-scraper
npm install
apify login
apify run --input '{"licenseType":"Electricians","city":"Austin","maxResults":5}'

## 2. Push to your Apify account
apify push -f -w 120

## 3. Set PPE pricing + SEO (one-time, after first push)
```

Run via API:

```bash
curl -X POST "https://api.apify.com/v2/acts/USERNAME~tdlr-texas-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"licenseType":"Electricians","county":"Harris","maxResults":100}'
```

### How it works

1. **GET** the TDLR search page and harvest the ASP.NET hidden fields (`__VIEWSTATE`, `__EVENTVALIDATION`).
2. **POST** the search form with your filters.
3. Parse the results grid and enqueue each license's detail-page URL.
4. **GET** each detail page, extract the full record, and **push it to the dataset immediately** (never batched across requests — a single detail-page timeout can't lose other records).
5. Stop when `maxResults` is reached. Each successful record triggers a `result-item` charge.

### Limitations & transparency

- **Selectors may need a one-time calibration run.** TDLR's public search HTML occasionally shifts class names. The actor uses multiple fallback selectors per field. If a run returns `0` items with a `No detail links parsed from results page` warning, run it once locally and adjust the selectors/constants at the top of `src/main.ts` (search form field names + the `RESULTS`/`DETAIL` parsers). This is the only brittle layer; the rest of the pipeline is durable.
- **Single results page.** The current build enqueues detail links from the first results page (TDLR shows up to a few hundred rows per search). For exhaustive lists, run multiple county/city filters and merge the datasets.
- **Contact info (`phone`/`email`) is only published by TDLR for Electricians and Elevator Contractors** — it will be `null` for other programs by design, not a bug.
- **No login, no anti-bot** — TDLR's public search is open. The actor uses US datacenter proxies (fast + cheap) by default.

### Use cases

- **Home-services lead generation** — pull every licensed electrician / A/C / elevator contractor in a county with phone + email for cold outreach.
- **Compliance & verification** — bulk-verify that subcontractors hold an active license, valid bond, and current insurance before signing a contract.
- **Insurance underwriting** — feed bond + insurance amounts into risk models.
- **Market research** — count active licensees by program, county, or city for TAM sizing.

### Troubleshooting

| Symptom | Fix |
|--------|-----|
| 0 results, `No detail links parsed` warning | Do one local `apify run`, open the saved HTML, and update the `RESULTS`/`DETAIL` selectors in `src/main.ts`. |
| `phone`/`email` are `null` | Expected for non-Electrician/non-Elevator license programs — TDLR doesn't publish contact info for them. |
| `__VIEWSTATE` missing | TDLR may have changed the search URL. Confirm `SEARCH_PAGE_URL`/`SEARCH_RESULTS_URL` at the top of `src/main.ts`. |
| Charge shows but no rows | Ensure at least one filter is set and spelled exactly as TDLR uses it (case-insensitive for `businessName`). |

***

**Source:** `https://www.tdlr.texas.gov/LicenseSearch/` — Texas Department of Licensing and Regulation public license search. This actor only reads publicly available licensee data.

### What is Texas TDLR License Scraper?

**Texas TDLR License Scraper** turns the target data into structured, reusable results on Apify. Use it when you need repeatable collection for sales teams, agencies, recruiters, market researchers, and data-enrichment workflows without maintaining a custom scraper or one-off integration. Run it manually, schedule recurring jobs, call it through the Apify API, or connect it to an AI agent through the Apify MCP server.

The Actor stores results in an Apify dataset, where they can be previewed and exported as JSON, CSV, Excel, XML, or RSS. Availability and completeness depend on the source, supplied inputs, public visibility, authentication requirements, and upstream rate limits.

### Use cases for Texas TDLR License Scraper

- Build structured datasets for research, reporting, enrichment, or monitoring.
- Automate repetitive collection with schedules, webhooks, and API calls.
- Feed clean records into spreadsheets, databases, CRMs, BI tools, AI agents, or RAG pipelines.
- Track changes over time by running the same validated input on a schedule.
- Replace fragile manual copy-and-paste work with a reproducible Apify workflow.

### How to use Texas TDLR License Scraper

1. Open the Actor input page and choose a focused, valid target.
2. Set a conservative result limit for the first run.
3. Start the Actor and inspect the dataset for coverage and field availability.
4. Export the results or connect the dataset to your downstream system.
5. Scale gradually and use scheduling, pagination, or proxies when supported.

#### Important input options

- `licenseType` — The TDLR license program to search. Use this when the user asks for a specific trade or occupation — e.g. 'Air Conditioning Contractors', 'Electricians', 'Elevator Contractors', 'Cosmetologi
- `licenseNumber` — A specific TDLR license number to look up (e.g. '80019'). Use this for single-license verification. Leave empty when browsing all licenses of a given program type.
- `businessName` — Full or partial contractor business name to search (e.g. 'Acme Electric'). Case-insensitive substring match on TDLR's business name field. Leave empty to search all businesses.
- `ownerName` — License holder (individual/owner) name to search (e.g. 'John Smith'). Use for sole proprietors and individual licensees. Leave empty to match all owners.
- `city` — Texas city name filter (e.g. 'Austin', 'Houston', 'Dallas'). Type the exact city spelling as TDLR uses it; not a dropdown — any city string works. Leave empty for statewide results.
- `county` — Texas county filter (e.g. 'Travis', 'Harris', 'Dallas'). Select from the official TDLR county list. 'Out Of State' matches licensees located outside Texas. Leave empty for statewide results.
- `zipCode` — Texas ZIP code filter (e.g. '78701'). Use a 5-digit ZIP for the most precise geographic filter. Leave empty for statewide results.
- `technicianType` — Filter A/C and electrical license results by technician classification. 'All' returns every technician. 'Registered' and 'Certified' narrow to the two TDLR technician tiers. Only meaningful

### API and automation example

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('muhammadafzal/tdlr-texas-scraper').call({
  // Add the same input fields you use in the Apify Console.
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Related Apify Actors

Use these dedicated tools when a neighboring data source or workflow is a better match:

- [Leads Finder Pro - B2B Leads with Emails \[Apollo Alternative\]](https://apify.com/muhammadafzal/leads-finder-pro)
- [Yellow Pages US Scraper — Business Leads & Reviews](https://apify.com/muhammadafzal/yellow-pages-us-scraper)
- [Yellow Pages Australia Scraper — Business Leads & Reviews](https://apify.com/muhammadafzal/yellow-pages-au-scraper)
- [Email Validator — Syntax, MX & Risk Checks](https://apify.com/muhammadafzal/email-address-validator)
- [Rate My Professors & Schools Scraper](https://apify.com/muhammadafzal/rate-my-professors-scraper)
- [Gelbe Seiten Scraper — German Yellow Pages Leads with Emails](https://apify.com/muhammadafzal/gelbe-seiten-scraper)
- [Contractor License Leads — Licensed US Contractors](https://apify.com/muhammadafzal/contractor-license-leads)
- [California CSLB Contractor License Scraper](https://apify.com/muhammadafzal/cslb-california-scraper)
- [GreatSchools Scraper — Ratings, Scores & Demographics](https://apify.com/muhammadafzal/greatschools-scraper)
- [Instagram Followers & Following Scraper — With Cookies](https://apify.com/muhammadafzal/instagram-following-scraper)

### Frequently asked questions

#### How many results can I scrape with Texas TDLR License Scraper?

The practical total depends on the source, input limits, pagination, available records, run timeout, and upstream restrictions. Start with a small run, verify the output, and increase the limit gradually.

#### Can I integrate Texas TDLR License Scraper with other apps?

Yes. Use Apify integrations, webhooks, schedules, dataset exports, Make, Zapier, Google Sheets, cloud storage, or your own application.

#### Can I use Texas TDLR License Scraper with the Apify API?

Yes. Start runs with the Apify REST API or an official Apify client, then retrieve records from the run's default dataset. Keep your API token in a secret or environment variable.

#### Can I use Texas TDLR License Scraper through an MCP Server?

Yes. The Apify MCP server can expose the Actor to compatible AI clients and agents. Review the input and expected cost before allowing an autonomous workflow to run it at scale.

#### Do I need proxies?

It depends on the source and volume. Use the default configuration first. For larger or geographically sensitive jobs, select an appropriate proxy configuration only when the Actor supports it.

#### Is it legal to scrape this data?

Scraping rules vary by source, jurisdiction, data type, and intended use. Collect only data you are authorized to access, respect applicable terms and privacy laws, and avoid restricted or personal data misuse. This documentation is not legal advice.

#### Your feedback

If a field is missing, a source layout has changed, or you need a supported use case documented, open an issue on the Actor page with a reproducible input and run ID.

# Actor input Schema

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

The TDLR license program to search. Use this when the user asks for a specific trade or occupation — e.g. 'Air Conditioning Contractors', 'Electricians', 'Elevator Contractors', 'Cosmetologists', 'Massage Therapist'. Do NOT combine with licenseNumber unless you want to narrow further. Electricians and Elevator Contractors license types are the ones that publish contact info (address, phone, email).

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

A specific TDLR license number to look up (e.g. '80019'). Use this for single-license verification. Leave empty when browsing all licenses of a given program type.

## `businessName` (type: `string`):

Full or partial contractor business name to search (e.g. 'Acme Electric'). Case-insensitive substring match on TDLR's business name field. Leave empty to search all businesses.

## `ownerName` (type: `string`):

License holder (individual/owner) name to search (e.g. 'John Smith'). Use for sole proprietors and individual licensees. Leave empty to match all owners.

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

Texas city name filter (e.g. 'Austin', 'Houston', 'Dallas'). Type the exact city spelling as TDLR uses it; not a dropdown — any city string works. Leave empty for statewide results.

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

Texas county filter (e.g. 'Travis', 'Harris', 'Dallas'). Select from the official TDLR county list. 'Out Of State' matches licensees located outside Texas. Leave empty for statewide results.

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

Texas ZIP code filter (e.g. '78701'). Use a 5-digit ZIP for the most precise geographic filter. Leave empty for statewide results.

## `technicianType` (type: `string`):

Filter A/C and electrical license results by technician classification. 'All' returns every technician. 'Registered' and 'Certified' narrow to the two TDLR technician tiers. Only meaningful for license programs that have technicians (Electricians, Air Conditioning Contractors).

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

Maximum number of license records to return. Use a small value (5) to verify fields quickly, then scale to 100–1000 for production lead-gen lists. TDLR may cap a single search export; run multiple county/city filters to build larger datasets.

## Actor input object example

```json
{
  "licenseType": "Electricians",
  "technicianType": "All",
  "maxResults": 5
}
```

# Actor output Schema

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

Link to the dataset containing all extracted TDLR license records.

# 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 = {
    "licenseType": "Electricians",
    "licenseNumber": "",
    "businessName": "",
    "ownerName": "",
    "city": "",
    "county": "",
    "zipCode": "",
    "technicianType": "All",
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/tdlr-texas-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 = {
    "licenseType": "Electricians",
    "licenseNumber": "",
    "businessName": "",
    "ownerName": "",
    "city": "",
    "county": "",
    "zipCode": "",
    "technicianType": "All",
    "maxResults": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/tdlr-texas-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 '{
  "licenseType": "Electricians",
  "licenseNumber": "",
  "businessName": "",
  "ownerName": "",
  "city": "",
  "county": "",
  "zipCode": "",
  "technicianType": "All",
  "maxResults": 5
}' |
apify call muhammadafzal/tdlr-texas-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/hNQCodk4ybGLlVSab/builds/E5OvyPa1CKfFlk9LA/openapi.json
