# CA Business Registry - SF & LA Registered Businesses (`j0401/ca-business-registry`) Actor

San Francisco (daily) + Los Angeles registered businesses (public open data): who's active, who just opened, who closed. Search by name / DBA / NAICS / ZIP / council district - B2B sales leads and new-business intelligence.

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

## Pricing

$1.00 / 1,000 california registered business 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 Business Registry - SF & LA registered businesses

San Francisco and Los Angeles both publish their **registered-business corpus** as open data (city Socrata portals, free public data). This actor turns those into a queryable, charged-per-record API - **for B2B sales leads, new-business intelligence, and reference checks on who is actually doing business in SF / LA.**

### What it covers

**San Francisco** (`city: sf`) - every registered business location, refreshed **daily** (~366k rows):

- **Active** (~126k): currently operating (location not ended + not administratively closed).
- **New openings**: every business has a `dba_start_date` - filter `newSince` to pull "who opened in the last N days" (SF sees ~15-30 new DBAs/day).
- **Closed / administratively closed**: `dba_end_date` + the administratively-closed flag track when businesses stopped.
- Each row: DBA + legal (ownership) name, street address, ZIP, NAICS code, license type, open date.

**Los Angeles** (`city: la`) - the current active-business set, refreshed **monthly** (~634k rows): business name / DBA, NAICS + description, council district, location start date.

### Typical questions

- "Which businesses **just opened in San Francisco**?"
- "Who is doing business in ZIP 94110 / council district 10?"
- "What NAICS industries dominate this city - where should I sell?"
- "Is this company an active registered business in SF or LA?"

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

This is a **live, million-row dual-city registry**, not a static dump. SF republishes its full ~366k-location business register **every day**; LA's ~634k active set refreshes monthly. Neither city hands you "who is currently operating" - that has to be **reconstructed**: a business is *active* only when its location record carries no end date (SF also stamps ~47k closed records as administratively closed - a city closure type that, like any closure, carries an end date), so we derive active / opened-recently / closed from the raw end-date + closure-flag logic on every pull. Counts and cohorts (by NAICS, ZIP, council district) roll up on demand. You query which businesses are actually operating; the open / closed reconstruction stays on our side.

### Inputs

| Input | What it does |
|---|---|
| `city` | `sf` (default, daily) or `la` (monthly) |
| `activeOnly` | SF: on = active only (~126k); off = whole registry incl. closed. Default on. LA is already the active set. |
| `newSince` | SF: only DBAs started on/after `YYYY-MM-DD` - the new-openings feed |
| `businessName` | substring, matches DBA / business name |
| `naics` | full or prefix code (`541`, `531100`) |
| `zip` | exact ZIP |
| `councilDistrict` | LA council district |
| `licenseType` | SF license type, substring |
| `aggregate` / `groupBy` | one row per group (NAICS / ZIP / council district) with a count |
| `maxResults` | cap records (default 200) |

**Default run = the ~200 most recently opened active SF businesses** - the freshest lead-gen pull, and fast enough for Apify's daily auto-test.

### Source

- [SF Registered Business Locations](https://data.sfgov.org/Housing-and-Buildings/Registered-Business-Locations-San-Francisco/g8m3-pdis) - official, daily refresh.
- [LA Listing of Active Businesses](https://data.lacity.org/) - official, monthly refresh.

# Actor input Schema

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

sf = San Francisco (refreshed daily, incl. closed + administratively-closed). la = Los Angeles current active businesses (refreshed monthly).

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

SF: on = currently active (location not ended & not administratively closed, ~126k); off = the full registry incl. closed. LA is already the active set (no effect).

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

SF only: only businesses whose DBA started on/after YYYY-MM-DD. The daily 'who just opened' feed. E.g. today's date for today's new openings.

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

Substring, case-insensitive. SF matches DBA; LA matches DBA or business name.

## `naics` (type: `string`):

NAICS code, full or prefix (2-digit sector, 3-digit subsector, 6-digit industry). E.g. "541", "531100", "72".

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

Exact ZIP, e.g. "94110" (SF) / "90019" (LA).

## `councilDistrict` (type: `string`):

LA only: LA City council district number, e.g. "10".

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

SF only: licensing type, substring. E.g. "food", "retail".

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

When on, returns one summary row per group with a business count - a compact overview computed server-side.

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

SF: naics / zip / licenseType. LA: naics / councilDistrict.

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

Cap records pushed (0 = a reasonable ceiling). Default run = ~200 most recently opened SF active businesses.

## Actor input object example

```json
{
  "city": "sf",
  "activeOnly": true,
  "aggregate": false,
  "groupBy": "naics",
  "maxResults": 200
}
```

# Actor output Schema

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

California registered-business records - 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-business-registry").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-business-registry").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-business-registry --silent --output-dataset

```

## MCP server setup

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

```

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/CetLoPMwOus7j8xzE/builds/17ZYsAONE9fxSKEwS/openapi.json
