# Texas TDI Insurance License Scraper (`ws_tony/texas-tdi-insurance-license`) Actor

Scrapes insurance agent, adjuster, and agency license records from the Texas Department of Insurance (TDI) public portal.

- **URL**: https://apify.com/ws\_tony/texas-tdi-insurance-license.md
- **Developed by:** [Tony](https://apify.com/ws_tony) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 license\_basics

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 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 TDI Insurance License Lookup

Extract insurance agent, adjuster, and agency license records from the **Texas Department of Insurance (TDI)** — powered by the [Texas Open Data Portal](https://data.texas.gov/) (Socrata API). **No browser, no CAPTCHA, no proxy required.**

Search by **name** or **license number** for individual agents/adjusters, or by **name or license number** for agencies. Each result includes NPN, license type, lines of authority, expiration date, city, and state — with an option to fetch the full list of company appointments.

> **Pairs with** [TDLR Texas Contractor & Trade License Scraper](https://apify.com/ws_tony/tdlr-texas-contractor-license-scraper) — TDLR covers electricians, HVAC, and 80+ trade licenses; this actor covers insurance agents and adjusters licensed by TDI. Together they cover complete subcontractor due diligence for Texas-based contractors.

---

### Why this actor is fast and reliable

TDI publishes their complete license database — **957,000+ agents/adjusters** and **55,000+ agencies** — on the Texas Open Data Portal, updated continuously. This actor queries that API directly rather than scraping the web portal, which means:

- Runs complete in **seconds**, not minutes
- **No CAPTCHA or bot detection** to work around
- **No proxy cost** passed to you
- Results are always fresh — same data TDI agents see

---

### Use cases

- **Insurance carriers** — onboarding validation, appointment verification, CE compliance checks
- **MGAs / wholesalers** — confirm producer license status before binding
- **Compliance teams** — bulk license monitoring for agent rosters
- **Background check services** — enriching professional license data
- **Real estate / mortgage** — verifying insurance agent credentials for transaction parties

---

### Input

| Field | Type | Description |
|---|---|---|
| `searchType` | select | `agentName`, `agentLicense`, `agencyName`, or `agencyLicense` |
| `lastName` | string | Required for `agentName` search |
| `firstName` | string | Optional — narrows `agentName` search |
| `agentLicenseNo` | string | Required for `agentLicense` search |
| `agencyName` | string | Required for `agencyName` search. Partial matches supported. |
| `agencyLicenseNo` | string | Required for `agencyLicense` search |
| `maxResults` | integer | Max records to return — default 500 |
| `includeAppointments` | boolean | Also fetch company appointments per record. Default `false`. |

#### Example inputs

Search all agents with the last name Smith:
```json
{
  "searchType": "agentName",
  "lastName": "Smith",
  "maxResults": 100
}
````

Narrow to a specific agent:

```json
{
  "searchType": "agentName",
  "lastName": "Smith",
  "firstName": "John",
  "includeAppointments": true,
  "maxResults": 25
}
```

Look up a specific license number:

```json
{
  "searchType": "agentLicense",
  "agentLicenseNo": "769759",
  "includeAppointments": true
}
```

Search agencies by name:

```json
{
  "searchType": "agencyName",
  "agencyName": "Allstate",
  "maxResults": 50
}
```

***

### Output

One JSON object per licensed producer in the Apify Dataset.

#### Agent / Adjuster record

```json
{
  "name": "JOHN SMITH",
  "firstName": "JOHN",
  "lastName": "SMITH",
  "npn": "1002703",
  "licenseNumber": "1933966",
  "licenseType": "General Lines Agent",
  "qualification": "General Lines - P&C; General Lines - Life, Accident, Health and HMO",
  "licenseIssueDate": "1996-05-01",
  "expirationDate": "2027-01-31",
  "city": "HOUSTON",
  "state": "TX",
  "postalCode": "77001",
  "appointments": [
    {
      "company": "Allstate Fire and Casualty Insurance Company",
      "naicId": "29688",
      "appointmentType": "General Lines - P&C",
      "activeDate": "2018-03-15"
    }
  ],
  "appointmentCount": 21
}
```

`appointments` and `appointmentCount` are only present when `includeAppointments: true`.

When a person holds multiple license qualifications (e.g. both P\&C and Life), they are merged into a single record with a semicolon-separated `qualification` field.

#### Agency record

```json
{
  "orgName": "ALLSTATE INSURANCE SERVICES, INC.",
  "npn": "10031234",
  "agencyLicenseNo": "2786391",
  "agencyType": "Corporation",
  "licenseType": "General Lines Agency",
  "qualification": "General Lines - P&C",
  "licenseIssueDate": "2015-06-10",
  "expirationDate": "2028-01-13",
  "city": "NORTHBROOK",
  "state": "IL",
  "postalCode": "60062"
}
```

***

### Pricing

This actor uses **pay-per-event** billing:

| Event | Price | What's included |
|---|---|---|
| `license_basic` | **$0.005 / record** | Name, NPN, license number, type, qualifications, dates, city, state, zip |
| `license_enriched` | **$0.008 / record** | Everything above + full company appointments list |

**Example cost:** 1,000 records without appointments ≈ **$5.00** · with appointments ≈ **$8.00**

***

### Bulk workflows

To verify a roster of agents, run the actor once per name using the [Apify API](https://docs.apify.com/api/v2) or [scheduled tasks](https://docs.apify.com/platform/schedules).

For broad sweeps — e.g. all licensed agents with last name "Garcia" in Texas — use `searchType: "agentName"` with `maxResults: 500`. For pinpoint lookups, use `searchType: "agentLicense"` with a specific license number.

***

### Notes

- **No setup required.** No proxy accounts, no CAPTCHA solver API keys — just fill in your search criteria and run.
- **Name format:** names are stored as FIRSTNAME LASTNAME in the TDI database (all caps). The actor parses and returns `firstName` and `lastName` as separate fields, handling generational suffixes (JR, SR, III, etc.) correctly.
- **Partial agency name matching** is supported — `"Allstate"` matches all agencies with Allstate in the name.
- **Adjuster licenses** (public adjusters, independent adjusters) are a distinct license class in Texas and are returned alongside agent licenses in name searches.
- Accessing public government data via an official open data API is legally permissible. All data is published by TDI under Texas Open Records / Public Information Act obligations.

***

### Data source

**Texas Open Data Portal — Texas Department of Insurance**

- [Insurance agents, adjusters, and people approved to manage insurance-related products](https://data.texas.gov/dataset/Insurance-agents-adjusters-and-people-approved-to-/kxv3-diwf) (957k+ records)
- [Insurance agencies and businesses approved to manage insurance-related products](https://data.texas.gov/dataset/Insurance-agencies-and-businesses-approved-to-mana/3yqc-fcdt) (55k+ records)
- [Active company appointments for agents and adjusters](https://data.texas.gov/dataset/Active-insurance-company-appointments-for-agents-a/ft7p-v8a7) (4.3M+ records)

# Actor input Schema

## `searchType` (type: `string`):

Which TDI search form to use. Agents and adjusters share the same forms; agencies have separate forms.

## `lastName` (type: `string`):

Required for Agent/Adjuster Name search. Partial matches supported — enter 'Smit' to find Smith, Smithson, etc.

## `firstName` (type: `string`):

Optional. Used with Last Name search.

## `middleName` (type: `string`):

Optional. Used with Last Name search.

## `agentLicenseNo` (type: `string`):

Required when Search Type = Agent by License Number.

## `agencyName` (type: `string`):

Required (or FEIN) when Search Type = Agency by Name. Partial matches supported.

## `agencyFein` (type: `string`):

Federal Employer Identification Number. Required (or Agency Name) when Search Type = Agency by Name.

## `agencyLicenseNo` (type: `string`):

Required when Search Type = Agency by License Number.

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

Maximum number of license records to return.

## `includeAppointments` (type: `boolean`):

Also fetch the list of insurance companies this producer is appointed with. Adds one API call per record. Leave off for status/expiration-only checks.

## Actor input object example

```json
{
  "searchType": "agentName",
  "maxResults": 500,
  "includeAppointments": false
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ws_tony/texas-tdi-insurance-license").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("ws_tony/texas-tdi-insurance-license").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 '{}' |
apify call ws_tony/texas-tdi-insurance-license --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Texas TDI Insurance License Scraper",
        "description": "Scrapes insurance agent, adjuster, and agency license records from the Texas Department of Insurance (TDI) public portal.",
        "version": "0.1",
        "x-build-id": "xg7FJPANI8BMxGoKr"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ws_tony~texas-tdi-insurance-license/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ws_tony-texas-tdi-insurance-license",
                "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/ws_tony~texas-tdi-insurance-license/runs": {
            "post": {
                "operationId": "runs-sync-ws_tony-texas-tdi-insurance-license",
                "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/ws_tony~texas-tdi-insurance-license/run-sync": {
            "post": {
                "operationId": "run-sync-ws_tony-texas-tdi-insurance-license",
                "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": {
                    "searchType": {
                        "title": "Search Type",
                        "enum": [
                            "agentName",
                            "agentLicense",
                            "agencyName",
                            "agencyLicense"
                        ],
                        "type": "string",
                        "description": "Which TDI search form to use. Agents and adjusters share the same forms; agencies have separate forms.",
                        "default": "agentName"
                    },
                    "lastName": {
                        "title": "Last Name",
                        "type": "string",
                        "description": "Required for Agent/Adjuster Name search. Partial matches supported — enter 'Smit' to find Smith, Smithson, etc."
                    },
                    "firstName": {
                        "title": "First Name",
                        "type": "string",
                        "description": "Optional. Used with Last Name search."
                    },
                    "middleName": {
                        "title": "Middle Name",
                        "type": "string",
                        "description": "Optional. Used with Last Name search."
                    },
                    "agentLicenseNo": {
                        "title": "Agent / Adjuster License Number",
                        "type": "string",
                        "description": "Required when Search Type = Agent by License Number."
                    },
                    "agencyName": {
                        "title": "Agency Name",
                        "type": "string",
                        "description": "Required (or FEIN) when Search Type = Agency by Name. Partial matches supported."
                    },
                    "agencyFein": {
                        "title": "Agency FEIN",
                        "type": "string",
                        "description": "Federal Employer Identification Number. Required (or Agency Name) when Search Type = Agency by Name."
                    },
                    "agencyLicenseNo": {
                        "title": "Agency License Number",
                        "type": "string",
                        "description": "Required when Search Type = Agency by License Number."
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of license records to return.",
                        "default": 500
                    },
                    "includeAppointments": {
                        "title": "Include Company Appointments",
                        "type": "boolean",
                        "description": "Also fetch the list of insurance companies this producer is appointed with. Adds one API call per record. Leave off for status/expiration-only checks.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
