# California DRE Licensee Search Scraper (`automation-lab/california-dre-licensee-search-scraper`) Actor

Search California DRE public real estate license records by name, city, or license ID and export license status, dates, broker, address, and discipline comments.

- **URL**: https://apify.com/automation-lab/california-dre-licensee-search-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## California DRE Licensee Search Scraper

Search California Department of Real Estate public license records and export structured licensee data for compliance, recruiting, lead generation, and monitoring workflows.

### What does California DRE Licensee Search Scraper do?

California DRE Licensee Search Scraper turns the public California Department of Real Estate license lookup into a clean dataset. It searches by DRE license ID or by licensee/company name with an optional mailing-address city filter, opens matching license detail pages, and saves structured fields such as license status, license type, issue date, expiration date, responsible broker, address, mortgage-loan-originator flag, and public discipline comments.

### Who is it for?

- 🏢 **Brokerages** building lists of agents, brokers, and corporations in California.
- 🧾 **Compliance teams** checking license status, expiration dates, and disciplinary comments.
- 🤝 **Recruiters** sourcing real estate professionals by city or surname.
- 🏦 **Mortgage and title vendors** validating real estate license records before outreach.
- 📊 **Data teams** refreshing California license records for CRMs, warehouses, or dashboards.

### Why use this scraper?

The DRE public lookup is useful but manual. This actor automates repeated searches, standardizes the output, and keeps a source URL for every record so your team can audit the original public page.

### Data you can extract

| Field | Description |
| --- | --- |
| `licenseId` | California DRE license number |
| `name` | Licensee, broker, corporation, or company name |
| `licenseType` | Salesperson, broker, corporation, or other DRE type |
| `licenseStatus` | Status shown on the DRE detail page |
| `mailingAddressCity` | City shown in the search results |
| `mailingAddress` | Full mailing address from the detail page when public |
| `expirationDate` | License expiration date |
| `issueDate` | License issue date text |
| `responsibleBroker` | Current responsible broker when shown |
| `formerNames` | Former names shown by DRE |
| `disciplinaryAction` | Public discipline/comment text |
| `mortgageLoanOriginator` | MLO marker from search results |
| `sourceUrl` | DRE source page URL |
| `scrapedAt` | Timestamp when the record was collected |

### How much does it cost to scrape California DRE license records?

This actor uses pay-per-event pricing. Each run has a small start event and then charges per saved licensee record. You can keep costs predictable with `maxResults`, direct `licenseIds`, and a city filter for broad names.

### Input options

- `licenseIds` — one or more known DRE license IDs.
- `licenseeName` — surname, full name, company name, or broker name.
- `city` — optional mailing-address city filter.
- `maxResults` — maximum number of license records to save.
- `includeDetails` — open detail pages for status, broker, date, and address fields.
- `requestDelayMillis` — polite delay between detail requests.

### Example input: known license IDs

```json
{
  "licenseIds": ["01244127"],
  "maxResults": 1,
  "includeDetails": true
}
````

### Example input: city lead list

```json
{
  "licenseeName": "Smith",
  "city": "ENCINITAS",
  "maxResults": 25,
  "includeDetails": true,
  "requestDelayMillis": 250
}
```

### Example output

```json
{
  "licenseId": "01244127",
  "name": "Smith, Aaron Bryson",
  "licenseType": "SALESPERSON",
  "licenseStatus": "EXPIRED",
  "mailingAddressCity": "ENCINITAS",
  "mailingAddress": "130 CADMUS ST | ENCINITAS, CA 92024",
  "expirationDate": "07/27/12",
  "issueDate": "09/05/98",
  "responsibleBroker": "NO CURRENT RESPONSIBLE BROKER",
  "disciplinaryAction": "NO DISCIPLINARY ACTION",
  "sourceUrl": "https://www2.dre.ca.gov/PublicASP/pplinfo.asp?License_id=01244127",
  "scrapedAt": "2026-07-04T05:44:50.680Z"
}
```

### How to run

1. Open the actor on Apify.
2. Enter one or more license IDs, or enter a name/company search.
3. Optionally add a city to narrow broad surname searches.
4. Set `maxResults` to the number of records you need.
5. Run the actor and export the dataset as JSON, CSV, Excel, or via API.

### Tips for better searches

- Use direct license IDs for monitoring known licensees.
- Add `city` for broad last names such as Smith, Garcia, Lee, or Johnson.
- Keep `maxResults` low for first tests, then increase once the search is correct.
- Leave `includeDetails` enabled when you need status, dates, broker, address, or discipline fields.
- Use a delay for larger runs to keep requests polite.

### Integrations

- 📌 Send results to a CRM as California real estate leads.
- 🧾 Join with internal compliance lists by `licenseId`.
- 📬 Export CSV for broker recruiting campaigns.
- 📊 Load records into BigQuery, Snowflake, Postgres, or Airtable.
- 🔔 Schedule daily or weekly monitoring for known license IDs.

### API usage with Node.js

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/california-dre-licensee-search-scraper').call({
  licenseeName: 'Smith',
  city: 'ENCINITAS',
  maxResults: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### API usage with Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('automation-lab/california-dre-licensee-search-scraper').call(run_input={
    'licenseIds': ['01244127'],
    'maxResults': 1,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### API usage with cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~california-dre-licensee-search-scraper/runs?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"licenseeName":"Smith","city":"ENCINITAS","maxResults":10}'
```

### MCP: use from Claude Code or Claude Desktop

Connect Apify MCP and enable this actor with:

```text
https://mcp.apify.com/?tools=automation-lab/california-dre-licensee-search-scraper
```

Claude Code CLI setup:

```bash
claude mcp add apify-california-dre "https://mcp.apify.com/?tools=automation-lab/california-dre-licensee-search-scraper"
```

Claude Desktop JSON configuration:

```json
{
  "mcpServers": {
    "apify-california-dre": {
      "url": "https://mcp.apify.com/?tools=automation-lab/california-dre-licensee-search-scraper"
    }
  }
}
```

Example prompts:

- "Search California DRE for license ID 01244127 and summarize the status."
- "Find up to 20 DRE license records for Smith in Encinitas and make a CSV."
- "Monitor these California DRE license IDs and flag expired records."

### Scheduling and monitoring

Create an Apify task with your preferred input and schedule it daily, weekly, or monthly. For compliance monitoring, store direct license IDs in `licenseIds` so each run checks the same records.

### Handling broad searches

Some California surnames return thousands of records. Use `city` and `maxResults` to keep runs focused. If you need statewide coverage for a broad name, run multiple city-specific tasks or increase `maxResults` gradually.

### Legality and ethical use

This actor extracts public information from the California Department of Real Estate public license lookup. Use the data responsibly, follow applicable laws, respect the source website, and do not use results for unlawful spam, harassment, discrimination, or misleading licensing claims.

### FAQ

**Can I search by exact license ID?** Yes. Put one or more values in `licenseIds` and keep `includeDetails` enabled.

**Can I scrape all California DRE records?** The actor is designed for targeted public lookup workflows. Use name/city filters and reasonable `maxResults` values.

**Does the actor use a browser?** No. The DRE pages are server-rendered, so HTTP extraction is faster and cheaper.

### Troubleshooting: no results

If a name search returns no records, check spelling and try the DRE style: last name first for individuals, or the exact company name for corporations. You can also remove the city filter and rerun with a small `maxResults` value.

### Troubleshooting: too many results

Add a city filter, use a more specific name, or provide direct license IDs. Broad surnames can return very large result sets from the DRE lookup.

### Related scrapers

- https://apify.com/automation-lab/georgia-real-estate-license-lookup
- https://apify.com/automation-lab/texas-trec-license-scraper
- https://apify.com/automation-lab/florida-dbpr-scraper
- https://apify.com/automation-lab/realtor-real-estate-agent-leads-scraper

### Changelog

- Initial version: California DRE public license search by license ID or name/city.

### Support

If you need a field that appears on DRE public pages but is not in the dataset, open an Apify issue with an example license ID and expected field.

### Notes on source data

The DRE website controls the source records. The actor reports the public text available at scrape time and includes `sourceUrl` plus `scrapedAt` for auditability.

### Performance

HTTP extraction is used because the DRE pages are server-rendered. No browser is required, which keeps runs lightweight and suitable for scheduled monitoring.

# Actor input Schema

## `licenseIds` (type: `array`):

Optional California DRE license IDs to look up directly. Use this for monitoring known agents or brokers.

## `licenseeName` (type: `string`):

Last name, full name, or company name to search in the DRE public license lookup.

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

Optional DRE mailing-address city filter. Leave blank for statewide name searches.

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

Maximum number of licensee records to save. Keep low for broad surnames, then increase for production lead lists.

## `includeDetails` (type: `boolean`):

Fetch each license detail page to include status, dates, broker, address, and discipline comments.

## `requestDelayMillis` (type: `integer`):

Polite delay between DRE detail page requests.

## Actor input object example

```json
{
  "licenseIds": [
    "01244127"
  ],
  "licenseeName": "Smith",
  "maxResults": 20,
  "includeDetails": true,
  "requestDelayMillis": 250
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "licenseIds": [
        "01244127"
    ],
    "licenseeName": "Smith",
    "city": "",
    "maxResults": 20,
    "includeDetails": true,
    "requestDelayMillis": 250
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/california-dre-licensee-search-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 = {
    "licenseIds": ["01244127"],
    "licenseeName": "Smith",
    "city": "",
    "maxResults": 20,
    "includeDetails": True,
    "requestDelayMillis": 250,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/california-dre-licensee-search-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 '{
  "licenseIds": [
    "01244127"
  ],
  "licenseeName": "Smith",
  "city": "",
  "maxResults": 20,
  "includeDetails": true,
  "requestDelayMillis": 250
}' |
apify call automation-lab/california-dre-licensee-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/california-dre-licensee-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "California DRE Licensee Search Scraper",
        "description": "Search California DRE public real estate license records by name, city, or license ID and export license status, dates, broker, address, and discipline comments.",
        "version": "0.1",
        "x-build-id": "yFhBYCRKz3dPUabox"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~california-dre-licensee-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-california-dre-licensee-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/automation-lab~california-dre-licensee-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-california-dre-licensee-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/automation-lab~california-dre-licensee-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-california-dre-licensee-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "licenseIds": {
                        "title": "License IDs",
                        "type": "array",
                        "description": "Optional California DRE license IDs to look up directly. Use this for monitoring known agents or brokers.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "licenseeName": {
                        "title": "Licensee or company name",
                        "type": "string",
                        "description": "Last name, full name, or company name to search in the DRE public license lookup."
                    },
                    "city": {
                        "title": "Mailing address city",
                        "type": "string",
                        "description": "Optional DRE mailing-address city filter. Leave blank for statewide name searches."
                    },
                    "maxResults": {
                        "title": "Maximum licensees",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of licensee records to save. Keep low for broad surnames, then increase for production lead lists.",
                        "default": 20
                    },
                    "includeDetails": {
                        "title": "Open license detail pages",
                        "type": "boolean",
                        "description": "Fetch each license detail page to include status, dates, broker, address, and discipline comments.",
                        "default": true
                    },
                    "requestDelayMillis": {
                        "title": "Delay between detail requests (ms)",
                        "minimum": 0,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Polite delay between DRE detail page requests.",
                        "default": 250
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
