# Texas Biz Scraper (`explorer_holdings/texas-biz-scraper`) Actor

Utilizes the Texas Secretary of State API to pull business information by date range.

- **URL**: https://apify.com/explorer\_holdings/texas-biz-scraper.md
- **Developed by:** [Jason](https://apify.com/explorer_holdings) (community)
- **Categories:** Lead generation
- **Stats:** 27 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

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 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 Secretary of State Business Scraper

Scrape Texas business entities from the **Texas Open Data Portal** using the official Socrata API.

### 🎯 What This Actor Does

This Apify actor fetches business entity data from the Texas Comptroller's **Active Franchise Tax Permit Holders** dataset, which contains information about all businesses registered in Texas.

**Data Source:** [data.texas.gov](https://data.texas.gov/Government-and-Taxes/Active-Franchise-Tax-Permit-Holders/9cir-efmm)

### ✨ Key Features

- **Fast API access** - No web scraping, uses official Socrata API
- **Date range filtering** - Get businesses registered in specific time periods
- **Entity type filtering** - Filter by LLC, Corporation, Partnership, etc.
- **Name search** - Find businesses by name
- **Location filtering** - Filter by city or state
- **Active status filter** - Get only businesses with active right to transact

### 🚀 Example Inputs

#### Get all new LLCs from 2025

```json
{
    "startDate": "2025-01-01",
    "endDate": "2025-12-31",
    "entityTypes": ["LLC"],
    "activeOnly": true,
    "maxResults": 10000
}
```

#### Search for businesses by name

```json
{
    "nameSearch": "consulting",
    "activeOnly": true,
    "maxResults": 5000
}
```

#### Get all businesses in Austin

```json
{
    "city": "AUSTIN",
    "startDate": "2025-01-01",
    "maxResults": 10000
}
```

#### Get all new corporations (any status)

```json
{
    "startDate": "2024-01-01",
    "endDate": "2024-12-31",
    "entityTypes": ["Corporation"],
    "maxResults": 50000
}
```

### 📊 Output Data

Each record includes:

| Field | Description |
|-------|-------------|
| `taxpayerNumber` | Texas Comptroller taxpayer number (11 digits) |
| `taxpayerName` | Business legal name |
| `address` | Street address |
| `city` | City |
| `state` | State code |
| `zip` | ZIP code |
| `countyCode` | Texas county code |
| `organizationalTypeCode` | Entity type code (CI, LI, etc.) |
| `organizationalType` | Human-readable entity type |
| `recordTypeCode` | Record type |
| `responsibilityBeginningDate` | Date business became responsible for franchise tax |
| `rightToTransactBusiness` | "Active" or "Not Active" |
| `rightToTransactBusinessCode` | Y or N |
| `scrapedAt` | Timestamp of scrape |
| `source` | "texas\_open\_data\_portal" |

### 🏢 Entity Type Codes

| Code | Entity Type |
|------|-------------|
| CI | Corporation - Domestic |
| CF | Corporation - Foreign |
| LI | LLC - Domestic |
| LF | LLC - Foreign |
| PI | Limited Partnership - Domestic |
| PF | Limited Partnership - Foreign |
| NI | Nonprofit Corporation - Domestic |
| NF | Nonprofit Corporation - Foreign |
| AI | Professional Association - Domestic |
| AF | Professional Association - Foreign |
| RI | Limited Liability Partnership - Domestic |
| RF | Limited Liability Partnership - Foreign |
| SI | Professional Corporation - Domestic |
| SF | Professional Corporation - Foreign |

### 🔧 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `startDate` | String | No | Start date (YYYY-MM-DD) |
| `endDate` | String | No | End date (YYYY-MM-DD) |
| `entityTypes` | Array | No | Entity types to include |
| `nameSearch` | String | No | Search text for business names |
| `city` | String | No | City filter (exact match) |
| `state` | String | No | State code filter (TX, CA, etc.) |
| `activeOnly` | Boolean | No | Only active businesses (default: false) |
| `maxResults` | Integer | No | Max results (default: 10000, 0=unlimited) |

### ⚡ Performance

- **Speed:** ~10,000 records per minute
- **API Limit:** 1,000 records per batch (automatic pagination)
- **Memory:** Only needs 1GB
- **Cost:** Very low compute usage

### 💰 Cost Estimate

- 10,000 records: ~0.1 compute units
- 100,000 records: ~0.5 compute units
- 1,000,000 records: ~2-3 compute units

### 📈 Dataset Size

The full Active Franchise Tax Permit Holders dataset contains **millions of records**. Use filters to get manageable result sets:

- All 2025 registrations: ~500,000-1,000,000 records
- All LLCs from 2025: ~300,000-500,000 records
- Specific city for one year: ~1,000-50,000 records

### 🐛 Debugging

Check the Key-Value store for:

- `summary` - Run statistics and breakdowns
- `sample-data` - First 10 records (preview)
- `error` - Error details if the actor crashed

### 🚀 Deployment

```bash
## Install Apify CLI
npm install -g apify-cli

## Login
apify login

## Navigate to project
cd texas-sos-scraper

## Deploy
apify push
```

### 📝 Sample Output

```json
{
    "taxpayerNumber": "32095586189",
    "taxpayerName": "ALBERTROSE TRANSPORTATION LLC",
    "address": "23 TROON DR",
    "city": "LAKEWAY",
    "state": "TX",
    "zip": "78738",
    "countyCode": "227",
    "organizationalTypeCode": "LI",
    "organizationalType": "LLC - Domestic",
    "recordTypeCode": "X",
    "responsibilityBeginningDate": "2023-02-09",
    "rightToTransactBusiness": "Not Active",
    "rightToTransactBusinessCode": "N",
    "scrapedAt": "2025-01-09T10:30:00.000Z",
    "source": "texas_open_data_portal"
}
```

### 📚 Related Resources

- [Texas Open Data Portal](https://data.texas.gov/)
- [Active Franchise Tax Permit Holders Dataset](https://data.texas.gov/Government-and-Taxes/Active-Franchise-Tax-Permit-Holders/9cir-efmm)
- [Socrata API Documentation](https://dev.socrata.com/)
- [Apify Documentation](https://docs.apify.com/)

### ⚠️ Notes

1. **Date Field**: The `responsibilityBeginningDate` is when the business became responsible for franchise tax, not necessarily the formation date.

2. **Data Freshness**: The Texas Open Data Portal dataset is updated periodically by the state.

3. **Foreign Entities**: Businesses registered in other states but operating in Texas are included with their original state code.

4. **Active Status**: "Right to Transact Business" indicates whether the business is currently in good standing with the Texas Comptroller.

# Actor input Schema

## `startDate` (type: `string`):

Filter by responsibility beginning date on or after this date (YYYY-MM-DD format)

## `endDate` (type: `string`):

Filter by responsibility beginning date on or before this date (YYYY-MM-DD format)

## `entityTypes` (type: `array`):

Filter by specific entity types. Leave empty for all types.

## `nameSearch` (type: `string`):

Search for businesses containing this text in their name

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

Filter by city (exact match)

## `state` (type: `string`):

Filter by state code (e.g., TX, CA, NY). Useful for finding foreign entities.

## `activeOnly` (type: `boolean`):

Only include businesses with active right to transact

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

Maximum number of results to return. Set to 0 for unlimited.

## Actor input object example

```json
{
  "entityTypes": [],
  "activeOnly": false,
  "maxResults": 10000
}
```

# 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("explorer_holdings/texas-biz-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 = {}

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

```

## MCP server setup

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

```

## OpenAPI specification

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