# CA County Business Licenses & FBN - Sacramento & Sonoma (`j0401/ca-county-business-licenses`) Actor

California county business licenses + fictitious business names (Sacramento Co + Sonoma Co public data, ~100k records): who just registered or is licensed in the county, with owner, industry activity, filing/expiry dates and new-opening lead flow. B2B sales leads & new-business intelligence.

- **URL**: https://apify.com/j0401/ca-county-business-licenses.md
- **Developed by:** [Wenhao Yang](https://apify.com/j0401) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 ca county business license / fbn records

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/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

## CA County Business Licenses & FBN - Sacramento + Sonoma

California counties publish **who is licensed / who just registered to do business** as open data - but on county portals with no shared shape: Sacramento runs an ArcGIS feature service, Sonoma a Socrata register, and their notions of a "record" barely overlap. This actor unifies three county-level business registers into one queryable, charged-per-record API - **for B2B new-business leads and reference checks on a specific county-registered business.**

### What it covers

Pick one register via `sourceCounty`:

**Sacramento Co FBN** (`sac-fbn`, default) - fictitious business names, **~59.3k records**:

- `RecordStatus` is **Filed (~58.3k) / Abandoned (936) / Invalid Filing (74) / In Review (1)** - the filing is the signal, and a fresh `Filed` row means someone just registered a new DBA.
- **Ownership type** on every filing (an Individual ~22.3k / Corporation ~16.9k / LLC ~15.9k / partnership / trust ...); **owner name** on individual filings.
- Street address + city + ZIP, filing date, expiry.
- **New-filing lead flow**: Sacramento sees ~1,000 new FBN filings a month.

**Sacramento Co Business Licenses** (`sac-bl`) - county-issued business licenses, **~25.7k records**:

- **Human-readable industry activity** on every row (~99% filled) - Home Repair Services (1,023) / Consulting Services (904) / Internet Sales (645) / Restaurant-Limited Service (588) / Auto Repair Services (552) ...
- **Home Based (~13.4k) / Commercial (~12.4k) location** - home-based businesses carry no street address (the county lists none), only city + ZIP.
- No status column is published - the register holds the currently-licensed base with only ~380 stale rows, so **Current / Expired is derived** from the expiration date (~25.4k current).

**Sonoma Co FBN** (`sonoma`) - fictitious business names, **~15.6k records**:

- **Multi-DBA rows**: one filing can list several business names (comma-separated).
- Registrant name, business type, business + mailing addresses, filing & publication dates.
- Document type **FBN (9,990, the full filing) / FBNPOP (5,350, proof-of-publication sub-doc) / FBNAB (241, abandoned) / FBNWD (4, withdrawn)** -> status derived (Filed / Abandoned / Withdrawn).
- **Name / owner / new-lead searches return FBN main filings** - the proof-of-publication sub-docs (FBNPOP) are excluded as paper-trail rows of the same filing, not separate businesses. The status / document-type aggregate still counts them.

### Typical questions

- "Who **just registered a new business** in Sacramento County?" (filter `newSince`)
- "Is this company a currently-licensed Sacramento Co business, or an abandoned FBN?"
- "What industries dominate the county-licensed base - where should I sell?" (aggregate by `activity`)
- "Show me every FBN under LLC ownership in ZIP 95632."

### Low cost

**From $0.001 per record** - billed only for the rows you use, with a per-run charge cap so a broad query can't surprise-bill.

Each county exposes a **different portal shape** with its own quirks, and none of them hands you a clean "who's active" list. Sacramento's license register carries **no status field at all** - "active" has to be reconstructed from whether the expiration date has passed (and a license expiring today stays Current until the day ends), and its FBN owner field is **only filled on ~44% of filings** (individual owners; companies list no person), so an owner search returns exactly what the county publishes. Home-based Sacramento licenses list **no street address** (just a "Home Based" marker + city/ZIP) - you can filter on that instead of a fake "0 street" value. Sonoma's register mixes **main filings with proof-of-publication sub-documents and abandonment notices** in one table, all sharing the same name field - a new FBNPOP row is a paper trail event for a filing, not a second business, so the record and new-lead paths filter it out (you'd otherwise be billed twice for one business). Aggregate counts roll up on demand from the live sources.

### Inputs

| Input | What it does |
|---|---|
| `sourceCounty` | `sac-fbn` (default) / `sac-bl` / `sonoma` |
| `status` | sac-fbn: Filed / Abandoned / Invalid Filing / In Review / sac-bl: Current / Expired / sonoma: Filed / Abandoned / Withdrawn |
| `businessName` | business name substring |
| `ownerName` | owner / registrant substring |
| `activity` | sac-bl industry activity substring |
| `locationType` | sac-bl: `Home Based` or `Commercial` |
| `zip` | ZIP prefix |
| `newSince` | only records filed on/after `YYYY-MM-DD` - the new-business lead feed |
| `aggregate` / `groupBy` | one row per group with a count. sac-bl: status / activity / sac-fbn: status / licenseType / sonoma: status / licenseType / docType |
| `maxResults` | cap records (default 200) |

**Default run = the ~200 most recently filed Sacramento Co FBNs** - a live new-business lead feed, and fast enough for Apify's daily auto-test.

### Source

- [Sacramento Co Business Licenses](https://data-sacramentocounty.opendata.arcgis.com/) - ArcGIS open data, live.
- [Sacramento Co FBN register](https://data-sacramentocounty.opendata.arcgis.com/) - ArcGIS open data, live.
- [Sonoma Co FBN register](https://data.sonomacounty.ca.gov/) - Socrata open data, live.

# Actor input Schema

## `sourceCounty` (type: `string`):

sac-fbn = Sacramento Co fictitious business names (~59.3k, includes owner + ownership type; RecordStatus Filed/Abandoned/Invalid Filing/In Review). sac-bl = Sacramento Co business licenses (~25.7k, human-readable industry activity; Current/Expired derived). sonoma = Sonoma Co fictitious business names (~15.6k, multi-DBA names + registrant).

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

sac-fbn: a source status (Filed, Abandoned, Invalid Filing, In Review). sac-bl: Current or Expired (derived from the expiration date). sonoma: Filed, Abandoned or Withdrawn (derived from document type; records exclude FBNPOP sub-docs). Blank = any status.

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

Business name substring, case-insensitive.

## `ownerName` (type: `string`):

Owner or registrant name substring. sac-fbn owners are filled on individual filings (~44%); sonoma registrant is published on virtually every row.

## `activity` (type: `string`):

Sacramento Co business-license industry activity (e.g. 'Home Repair', 'Consulting', 'Restaurant'). Only applies to sourceCounty sac-bl.

## `locationType` (type: `string`):

Sacramento Co business-license location type: home-based business (no street address published) vs commercial premises. Only applies to sourceCounty sac-bl.

## `zip` (type: `string`):

ZIP code (prefix match, e.g. 958 matches 95821/95825/...).

## `newSince` (type: `string`):

Only records filed/registered on or after this date (YYYY-MM-DD) — the new-opening lead window.

## `aggregate` (type: `boolean`):

When on, returns one summary record per group (see groupBy) with a count — instead of individual records.

## `groupBy` (type: `string`):

Which dimension to aggregate over. sac-bl: status (Current/Expired, derived) or activity (industry mix). sac-fbn: status (RecordStatus) or licenseType (ownership type). sonoma: status (derived Filed/Abandoned/Withdrawn), licenseType (business type) or docType (raw document type).

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

Cap the number of records pushed (0 = up to ~10k per run; each record is metered individually, so there is no per-run charge cap). An aggregate has at most a few hundred groups.

## Actor input object example

```json
{
  "sourceCounty": "sac-fbn",
  "status": "",
  "businessName": "",
  "ownerName": "",
  "activity": "",
  "locationType": "",
  "zip": "",
  "newSince": "",
  "aggregate": false,
  "groupBy": "status",
  "maxResults": 50
}
```

# Actor output Schema

## `recordsUrl` (type: `string`):

California county business license / fictitious-business-name records or aggregates - as JSON

## `datasetUrl` (type: `string`):

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("j0401/ca-county-business-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("j0401/ca-county-business-licenses").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 j0401/ca-county-business-licenses --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,j0401/ca-county-business-licenses"
        }
    }
}
```

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/bdPUtqbhkvlCrrRss/builds/wdjLwE7Bo2lbXll6L/openapi.json
