# California DCA Professional License Scraper (`muhammadafzal/california-dca-professional-license-scraper`) Actor

Search official California DCA public license files by agency, license number, name, business, city, county, or status. Return structured license type, status, dates, address-of-record fields, and source metadata. Uses monthly public bulk files and does not bypass Turnstile.

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

## Pricing

from $2.00 / 1,000 dca license record returneds

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/actors/running/actors-in-store.md#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

## California DCA Professional License Scraper

Search official California Department of Consumer Affairs (DCA) public licensee files for professional license records. Choose one DCA agency and filter its monthly public file by license number, name, business name, city, county, or license status.

### What it returns

Each dataset item is one source record from the selected DCA public information file.

| Field | Description |
|---|---|
| `licenseNumber` | Public license number |
| `licenseType` | DCA license type |
| `organizationOrLastName`, `firstName`, `middleName` | Public name fields |
| `licenseStatus` | Public status such as Active or Expired |
| `originalIssueDate`, `expirationDate` | Dates in the source format |
| `addressLine1`, `city`, `county`, `state`, `zip` | Public address-of-record fields |
| `sourceAgency`, `sourceFile`, `sourceUrl` | Source traceability |

The run also writes a `SUMMARY` key-value record with the selected agency, source file, number scanned, number returned, and warnings.

### Input examples

Find one professional fiduciary license:

```json
{
  "agency": "professionalFiduciaries",
  "licenseNumber": "3",
  "maxResults": 10
}
```

Find active registered nurses in a county:

```json
{
  "agency": "registeredNursing",
  "county": "Los Angeles",
  "licenseStatus": "Active",
  "maxResults": 100
}
```

Find a person by name and include inactive records:

```json
{
  "agency": "psychology",
  "firstName": "Jane",
  "lastName": "Doe",
  "includeInactive": true,
  "maxResults": 25
}
```

### Source and reliability

The Actor uses the DCA public information files linked from [DCA’s Licensee Lists page](https://www.dca.ca.gov/consumers/public_info/). DCA says these files are refreshed at the beginning of each month. The files are served by DCA’s public Box folder and are tab-delimited text files with an `.xls` filename. The Actor discovers the current folder contents at run time, downloads the current `_Data00.xls` file, and parses it locally.

The DCA real-time search page currently uses Cloudflare Turnstile. This Actor does not bypass Turnstile, authentication, CAPTCHAs, or other access controls; it uses the separate official bulk public-file route. The bulk files may be large, especially for Registered Nursing, Security and Investigative Services, and Barbering and Cosmetology. Select a single agency and keep `maxResults` bounded.

No DCA credentials, cookies, or user-provided secrets are required. Records are public government license data; use them in accordance with DCA terms, California law, and applicable privacy and data-protection requirements.

### Pricing

Pay per event is enabled for the private Actor build:

| Event | Price | When charged |
|---|---:|---|
| Actor start | $0.00005 | Once per run |
| DCA license record | $0.002 | Per record delivered to the dataset |

The Actor delivers a record to the dataset before charging its result event. A run with no matches has no result-record charges. Platform usage, if applicable to the account, is separate from the event price.

### Limitations

- One agency file is selected per run; the Actor does not merge all DCA agencies.
- The source is a monthly public bulk file, not the DCA real-time search database.
- Some agencies publish multiple data files. The Actor uses the current `*_Data00.xls` file exposed in the agency folder.
- DCA’s public file layout can change. The run reports source and parse diagnostics in `SUMMARY`.

### Use cases

- Schedule repeatable collection and export results to downstream workflows.
- Build public prospect lists and qualify organizations or professionals before responsible outreach.
- Run a one-off research job and export the structured result as JSON, CSV, Excel, XML, or RSS from Apify.
- Schedule the same input to monitor changes over time and send completed datasets to a webhook or integration.
- Feed schema-shaped records into a database, spreadsheet, BI tool, or AI workflow with the source URL retained for verification.

### Output example

```json
{
  "agencyName": "Professional Fiduciaries Licensing Bureau",
  "licenseType": "Professional Fiduciary",
  "specialtyCode": "Example Specialty code",
  "licenseNumber": "3",
  "entityType": "I",
  "organizationOrLastName": "Nord",
  "firstName": "Carey",
  "middleName": "James",
  "suffix": "Example Suffix",
  "addressLine1": "Po Box 690",
  "addressLine2": "Example Address line 2",
  "city": "Napa"
}
```

The exact fields depend on the selected input and what the public source exposes. Use the dataset schema as the machine-readable contract and retain source URLs for verification.

### Run California DCA Professional License Scraper with the Apify API

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('muhammadafzal/california-dca-professional-license-scraper').call({
  "agency": "professionalFiduciaries",
  "includeInactive": false,
  "maxResults": 100
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

You can also run the Actor from Apify Console, schedules, webhooks, the REST API, Make, Zapier, n8n, or the hosted Apify MCP server.

# Actor input Schema

## `agency` (type: `string`):

Use this to choose which official DCA agency file to read. Example: `registeredNursing`. This is an agency key, not a license type or board code.

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

Use this for an exact public license number within the selected agency. Example: `3`. This is not a name search.

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

Use this to match an individual first name within the selected agency. Example: `Carey`. Matching is case-insensitive and partial.

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

Use this to match an individual or organization/last-name field. Example: `Nord`. Matching is case-insensitive and partial.

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

Use this to match an organization name in the public organization/last-name field. Example: `Acme`. This does not search other agencies.

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

Use this to filter the public address city. Example: `Napa`. Matching is case-insensitive and partial.

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

Use this to filter the public address county. Example: `Los Angeles`. Matching is case-insensitive and partial.

## `licenseStatus` (type: `string`):

Use this to filter status text such as `Active`, `Expired`, or `Cancelled`. Example: `Active`. Matching is case-insensitive and partial.

## `includeInactive` (type: `boolean`):

Set true to include expired, cancelled, surrendered, and other non-current records. Default returns only Active/Current records.

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

Maximum records written to the dataset after filtering. Example: `25`. The Actor scans the selected official file but stops writing at this limit.

## Actor input object example

```json
{
  "agency": "professionalFiduciaries",
  "includeInactive": false,
  "maxResults": 100
}
```

# Actor output Schema

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

Structured public DCA license records in the default dataset.

## `summary` (type: `string`):

Outcome, source file, counts, and warnings.

# 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("muhammadafzal/california-dca-professional-license-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("muhammadafzal/california-dca-professional-license-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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 muhammadafzal/california-dca-professional-license-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/california-dca-professional-license-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

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