# Texas Real Estate License Search (TREC) — Open Data (`keeganlabs/tx-real-estate-licenses`) Actor

Every Texas real-estate broker and sales-agent license from TREC's official open-data feed (~322k records, ~188k active), refreshed daily. Holder name, license type & number, status, dates, sponsoring broker. Filter by name, type, status, number, or expiration date.

- **URL**: https://apify.com/keeganlabs/tx-real-estate-licenses.md
- **Developed by:** [Keegan Labs](https://apify.com/keeganlabs) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

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

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 Real Estate Licenses (TREC) — Official Open Data, ~322k Brokers & Agents Refreshed Daily

Pull the **entire Texas real-estate licensee population** — every active and
inactive broker and sales agent regulated by the **Texas Real Estate Commission
(TREC)** — straight from the state's **official open-data feed**, normalized into
clean JSON. **~321,800 license records (~188,000 active), refreshed daily.**

This actor is a polite JSON client for Texas's affirmatively-public open-data
portal (`data.texas.gov`, Socrata dataset
[`s7ft-44qi`](https://data.texas.gov/resource/s7ft-44qi.json) — "Broker and Sales
Agent License Holder Information"). **No HTML scraping, no CAPTCHAs, no browser** —
just the government API, with server-side filtering, paging, exponential backoff,
and a descriptive User-Agent. Most competing real-estate-license products on the
Store are fragile UI scrapers of licensing-board search forms; this reads the
authoritative bulk source directly.

### What you get

Every record is one license holder, normalized to a stable schema:

- **License:** number, type (`Sales Agent`, `Broker Individual`, `Broker Company`)
  with a friendly label, and status.
- **Name:** full name plus parsed first / middle / last / suffix and TREC "key
  name" (Last, First), all normalized.
- **Dates (ISO 8601):** original license date and license expiration date —
  TREC's US-format dates are converted to `YYYY-MM-DD`.
- **Sponsoring / related license:** for a sales agent, the sponsoring broker
  (type, license number, name, start date); for a broker company, the designated
  broker individual.
- **Flags & ids:** designated-supervisor flag (boolean), TREC agency identifier,
  and the per-record `updated` date.
- **Provenance:** source dataset id and URL on every record.

#### Example output record

```json
{
  "licenseNumber": "107343-SA",
  "licenseType": "Sales Agent",
  "licenseTypeLabel": "Real Estate Sales Agent",
  "status": "Active",
  "fullName": "DENNIS FRANK BISHOP",
  "firstName": "DENNIS",
  "middleName": "FRANK",
  "lastName": "BISHOP",
  "suffix": "",
  "keyName": "BISHOP, DENNIS FRANK",
  "designatedSupervisor": false,
  "county": "",
  "agencyIdentifier": "880107343",
  "originalLicenseDate": "1988-02-17",
  "licenseExpirationDate": "2028-04-30",
  "relatedLicense": {
    "licenseType": "Broker Company",
    "licenseNumber": "9002301-BB",
    "fullName": "BISHOP REALTOR GROUP, INC",
    "suffix": "",
    "startDate": "2023-03-31"
  },
  "updated": "2026-04-21",
  "sourceDataset": "s7ft-44qi",
  "sourceUrl": "https://data.texas.gov/resource/s7ft-44qi.json"
}
````

> **Note on addresses:** TREC's public open-data extract intentionally does **not**
> publish licensees' street addresses, and the `county` column is present but
> empty for every row. This actor returns exactly what the state publishes — names,
> license details, dates, and sponsoring-broker links — and never fabricates
> location data.

### Filters (inputs)

| Input | What it does |
| --- | --- |
| `nameContains` | Substring match on full name / last name / key name (case-insensitive). |
| `licenseType` | Exact type: `Sales Agent`, `Broker Individual`, or `Broker Company`. |
| `licenseNumber` | Partial match on the TREC license number (e.g. `854981-SA`). |
| `status` | Substring on status (`Active`, `Inactive`, `Expired less than 6 months`, `Revoked`, …). Defaults to **Active**. |
| `includeAllStatuses` | Return every status instead of just Active. |
| `expiresFrom` / `expiresTo` | License-expiration date range (ISO) — build renewal-marketing lists. |
| `originalIssuedFrom` / `originalIssuedTo` | Original-license date range (ISO) — find newly-licensed agents. |
| `maxRecords` | Cap on records returned (default 5,000; full set ~322k). |
| `socrataAppToken` | Optional Socrata app token to raise rate limits (not required). |

Name/type/number/status filters are pushed to the API as a SODA `$where`; the date
ranges are applied to the normalized ISO dates.

### Who buys this

- **Real-estate CRM & lead-gen** platforms enriching or building agent databases.
- **Title & mortgage marketing** teams targeting active agents and brokers.
- **Brokerage recruiting** — find newly-licensed agents (by original-license date)
  or agents at competing brokerages (via the sponsoring-broker link).
- **Real-estate data vendors** needing an authoritative, daily-refreshed TX
  licensee master to reconcile against.

### Data source, freshness & licensing

- **Source:** Texas Real Estate Commission via `data.texas.gov` (Socrata),
  dataset `s7ft-44qi`, "Broker and Sales Agent License Holder Information".
- **Volume (verified 2026-07-22):** 321,847 rows; 188,113 Active, plus Inactive,
  Expired, Revoked, Surrendered, Deceased, and other statuses.
- **Freshness:** the state refreshes the dataset **daily** (`rowsUpdatedAt`
  2026-07-22 at run of verification).
- **Public data:** `data.texas.gov` is Texas's affirmatively-public open-data
  portal — the same portal our TABC liquor-license actor reads. This is official
  government open data, not a scraped private source.

### Pricing (pay-per-event)

| Event | Price | When |
| --- | --- | --- |
| Actor start | **$0.005** | Once per run — query build + paged, backed-off API calls. |
| License record | **$0.003** | Per normalized record pushed to your dataset. |

A typical targeted pull (e.g. 5,000 active sales agents in an expiration window)
costs about **$0.005 + 5,000 × $0.003 ≈ $15**. You pay only for records you keep;
tight filters keep it cheap. This is dramatically cheaper and more reliable than
scraping the TREC license-lookup form record by record.

# Actor input Schema

## `nameContains` (type: `string`):

Free-text substring matched against the license holder's full name (individual or company) and last name, case-insensitive. Example: SMITH, KELLER WILLIAMS.

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

TREC license type (exact match, case-insensitive). One of: 'Sales Agent', 'Broker Individual', 'Broker Company'.

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

TREC license number (partial match, case-insensitive). Sales agents end in -SA, individual brokers in -B, broker companies in -BB. Example: 854981-SA.

## `status` (type: `string`):

Filter by status (partial match, case-insensitive). Values include: Active, Inactive, 'Expired less than 6 months', 'Expired more than 6 months', Revoked, Surrendered, Suspended, Deceased. Defaults to 'Active' unless 'Include all statuses' is on.

## `includeAllStatuses` (type: `boolean`):

If true and no explicit status is set, returns license holders of every status (active, inactive, expired, revoked, etc.).

## `expiresFrom` (type: `string`):

Only include licenses whose expiration date is on or after this date (ISO YYYY-MM-DD). Useful for renewal-marketing lead lists. Applied to the normalized expiration date.

## `expiresTo` (type: `string`):

Only include licenses whose expiration date is on or before this date (ISO YYYY-MM-DD).

## `originalIssuedFrom` (type: `string`):

Only include holders whose original license date is on or after this date (ISO YYYY-MM-DD). Useful for finding newly-licensed agents for recruiting.

## `originalIssuedTo` (type: `string`):

Only include holders whose original license date is on or before this date (ISO YYYY-MM-DD).

## `maxRecords` (type: `integer`):

Hard cap on the number of license records to return. The full dataset is ~322k rows (~188k Active).

## `socrataAppToken` (type: `string`):

Optional data.texas.gov / Socrata application token to raise API throttling limits. Not required — the API works without one.

## Actor input object example

```json
{
  "nameContains": "Keller",
  "licenseType": "",
  "licenseNumber": "854981-SA",
  "status": "Active",
  "includeAllStatuses": false,
  "expiresFrom": "2026-08-01",
  "expiresTo": "2026-12-31",
  "originalIssuedFrom": "2026-01-01",
  "originalIssuedTo": "2026-12-31",
  "maxRecords": 5000
}
```

# 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("keeganlabs/tx-real-estate-licenses").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("keeganlabs/tx-real-estate-licenses").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 keeganlabs/tx-real-estate-licenses --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=keeganlabs/tx-real-estate-licenses",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Texas Real Estate License Search (TREC) — Open Data",
        "description": "Every Texas real-estate broker and sales-agent license from TREC's official open-data feed (~322k records, ~188k active), refreshed daily. Holder name, license type & number, status, dates, sponsoring broker. Filter by name, type, status, number, or expiration date.",
        "version": "1.0",
        "x-build-id": "1f5bhxH2VSt5txvox"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/keeganlabs~tx-real-estate-licenses/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-keeganlabs-tx-real-estate-licenses",
                "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/keeganlabs~tx-real-estate-licenses/runs": {
            "post": {
                "operationId": "runs-sync-keeganlabs-tx-real-estate-licenses",
                "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/keeganlabs~tx-real-estate-licenses/run-sync": {
            "post": {
                "operationId": "run-sync-keeganlabs-tx-real-estate-licenses",
                "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": {
                    "nameContains": {
                        "title": "License holder name contains",
                        "type": "string",
                        "description": "Free-text substring matched against the license holder's full name (individual or company) and last name, case-insensitive. Example: SMITH, KELLER WILLIAMS."
                    },
                    "licenseType": {
                        "title": "License type",
                        "enum": [
                            "",
                            "Sales Agent",
                            "Broker Individual",
                            "Broker Company"
                        ],
                        "type": "string",
                        "description": "TREC license type (exact match, case-insensitive). One of: 'Sales Agent', 'Broker Individual', 'Broker Company'.",
                        "default": ""
                    },
                    "licenseNumber": {
                        "title": "License number",
                        "type": "string",
                        "description": "TREC license number (partial match, case-insensitive). Sales agents end in -SA, individual brokers in -B, broker companies in -BB. Example: 854981-SA."
                    },
                    "status": {
                        "title": "License status",
                        "type": "string",
                        "description": "Filter by status (partial match, case-insensitive). Values include: Active, Inactive, 'Expired less than 6 months', 'Expired more than 6 months', Revoked, Surrendered, Suspended, Deceased. Defaults to 'Active' unless 'Include all statuses' is on."
                    },
                    "includeAllStatuses": {
                        "title": "Include all statuses (not just Active)",
                        "type": "boolean",
                        "description": "If true and no explicit status is set, returns license holders of every status (active, inactive, expired, revoked, etc.).",
                        "default": false
                    },
                    "expiresFrom": {
                        "title": "License expires on/after (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only include licenses whose expiration date is on or after this date (ISO YYYY-MM-DD). Useful for renewal-marketing lead lists. Applied to the normalized expiration date."
                    },
                    "expiresTo": {
                        "title": "License expires on/before (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only include licenses whose expiration date is on or before this date (ISO YYYY-MM-DD)."
                    },
                    "originalIssuedFrom": {
                        "title": "Originally licensed on/after (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only include holders whose original license date is on or after this date (ISO YYYY-MM-DD). Useful for finding newly-licensed agents for recruiting."
                    },
                    "originalIssuedTo": {
                        "title": "Originally licensed on/before (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only include holders whose original license date is on or before this date (ISO YYYY-MM-DD)."
                    },
                    "maxRecords": {
                        "title": "Maximum records",
                        "minimum": 1,
                        "maximum": 350000,
                        "type": "integer",
                        "description": "Hard cap on the number of license records to return. The full dataset is ~322k rows (~188k Active).",
                        "default": 5000
                    },
                    "socrataAppToken": {
                        "title": "Socrata app token (optional)",
                        "type": "string",
                        "description": "Optional data.texas.gov / Socrata application token to raise API throttling limits. Not required — the API works without one."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
