# LA Building Occupancy Certificates - CofO & Contractor (`j0401/la-building-occupancy`) Actor

LA certificates of occupancy (125,761, 2005-2026): premises, APN, permit type, declared valuation, units, floor area, zoning, occupancy group, contractor of record with licence, applicant and coordinates. Search, total valuation, or roll up one parcel.

- **URL**: https://apify.com/j0401/la-building-occupancy.md
- **Developed by:** [Wenhao Yang](https://apify.com/j0401) (community)
- **Categories:** Business, Real estate, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 83.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.03 / 1,000 la occupancy certificates

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## LA Building Occupancy Certificates - 125,761 CofOs

Certificates of occupancy issued by the City of Los Angeles Department of
Building and Safety: **125,771 source rows (125,761 certificates) from 10
January 2005 to 6 November 2026**, measured 14 November 2026 (dataset stamp
9 November 2026). A certificate closes out a permit; the row carries the
premises and assessor parcel, what was built, the declared valuation, the
building data and the contractor of record.

### Low cost

**From $0.00005 per record, down to $0.00003 at Gold.** Pay only for the
records you receive - the full file stays queryable and you are never billed
for the scan behind it.

### What you get per record

| field | meaning |
|---|---|
| `cofoNumber`, `cofoIssueDate`, `statusDate`, `latestStatus` | the certificate and its status history |
| `address`, `zip` | the premises as published (house number or start-end range, direction, street, suffix); unit ranges are published in their own `unitRangeStart`/`unitRangeEnd` fields |
| `apn`, `assessorBook`, `assessorPage`, `assessorParcel`, `tract`, `block`, `lot` | assessor parcel identifiers for joins (leading zeros preserved) |
| `permitType`, `permitSubType`, `permitCategory`, `pcisPermit`, `referenceOldPermit` | the permit the certificate closes |
| `issueDate` | the certificate's published issue/status date (never empty; its earliest value is 2 January 2013) |
| `workDescription` | the scope of work in the city's own words |
| `valuation` | declared job valuation in USD |
| `residentialUnits`, `stories`, `buildingFloorArea`, `zoningFloorArea` | building data |
| `zone`, `occupancy` | zoning code and occupancy group (occupancy is filled on 21,326 rows) |
| `contractorName`, `contractorCity`, `contractorState`, `licenseType`, `licenseNumber`, `licenseExpirationDate`, `principalFullName` | the contractor of record and the licence principal |
| `applicantBusinessName`, `applicantFirstName`, `applicantLastName`, `applicantAddress1` | the applicant of record |
| `latitude`, `longitude` | point coordinates on 107,750 rows |
| `initiatingOffice`, `eventCode`, `censusTract` | district handling |
| `totalMatched` | source rows matching the filters |

### Search it

- **Property** - `apn="2368-016-034"`, `zip="91303"`,
  `address="GENTRY"`, `cofoNumber="234037"`, `pcisPermit="03014-20000-04721"`.
- **What was built** - `permitType="Bldg-New"`,
  `permitSubType="1 or 2 Family Dwelling"`, `zone="R1-1"`,
  `occupancy="R3 Occ. Group"`.
- **Contractor** - `contractor="GOMRINGER"`, `licenseNumber="1077715"`,
  `ownerBuilder="yes"`.
- **Size** - `valuationMin=1000000`, `minUnits=2`,
  `valuationMax=500000`.
- **Time** - `year=2026`, or `issueFrom="2025-01-01", issueTo="2025-12-31"`.

### Example inputs

**Certificates in ZIP 91303** (600 rows)

```json
{ "zip": "91303", "maxResults": 100 }
```

**Every certificate issued in 2026** (8,276 rows)

```json
{ "year": 2026, "maxResults": 200 }
```

**One certificate**

```json
{ "mode": "profile", "cofoNumber": "234037" }
```

**One assessor parcel's certificates**

```json
{ "mode": "parcel", "apn": "2368-016-034" }
```

Returns the 3 certificates recorded at that parcel, each row carrying
`parcelCertificates`, `parcelFirstIssue`, `parcelLastIssue`,
`parcelTotalValuation` (here **$621,000.00**) and `parcelResidentialUnits`.
`mode="parcel"` takes exactly one `apn` and no other filter, and refuses a
parcel with 2,000 or more certificates instead of truncating (`maxResults` does
not clip this mode).

### Aggregate it

```json
{ "mode": "aggregate", "groupBy": "year", "metric": "sumValuation" }
```

Declared valuation by certificate year: **2026 $3.15bn over 8,276 certificates
(average $380,096) / 2025 $4.16bn over 11,172**. The whole file totals
**$46.39bn** of declared work and **130,306 residential units**.

`groupBy` = `year`, `permitType`, `permitSubType`, `permitCategory`, `status`,
`initiatingOffice`, `zone`, `occupancy`, `zip`, `eventCode`.
`metric` = `count`, `sumValuation`, `avgValuation`, `sumUnits`, `sumFloorArea`.
A dimension above its ceiling fails loudly rather than dropping the tail; the
largest dimension, `zone`, carries 1,294 values plus one blank group (83 rows)
and is allowed all of them.

```json
{ "mode": "aggregate", "groupBy": "permitType" }
```

`Bldg-Addition` 46,612 / `Bldg-New` 36,092 / `Bldg-Alter/Repair` 25,970 /
`Swimming-Pool/Spa` 15,135 / `Nonbldg-New` 1,680 / `Nonbldg-Alter/Repair`
260 / `Bldg-Relocation` 12 / `Nonbldg-Addition` 9 / `Project` 1.

By sub-type: `1 or 2 Family Dwelling` 106,851 / `Commercial` 13,641 /
`Apartment` 5,279. By status: `CofO Issued` 123,637 / `CofO Corrected` 2,114 /
`CofO Superseded` 15 / `CofO Reactivated` 5. By office: VAN NUYS 65,581 /
METRO 40,624 / WEST LA 13,474 / SOUTH LA 4,498 / SANPEDRO 1,592 / WILSHIRE 2.

### Row grain and how to read it

- **One row = one certificate of occupancy**, not one permit and not one
  building. A project can produce several certificates (one per building or
  phase); a parcel can carry many across the years.
- **10 certificate numbers are filed twice**: nine pairs differ only in
  `issue_date`, one pair is identical. One record per certificate is delivered
  - the row with the later `issue_date` - so a full pull is 125,761 records.
    Collapsing happens inside the delivered page, so if a duplicated number ever
    straddles a page boundary both copies are delivered; `matched` in the run log
    still reports the source row count.
- **`issueDate` is the certificate's published issue/status date, not the
  permit's.** It is never empty, its earliest value is 2 January 2013, and on
  123,768 rows it equals `cofoIssueDate`; the file carries no `issueDate`
  before 2013 even where `cofoIssueDate` goes back to 2005. Filters and `year`
  use `cofoIssueDate`, which covers the whole file.
- **`contractors_business_name` is empty on 9,473 rows** and is
  `OWNER-BUILDER` on 55,189. `ownerBuilder="yes"` matches the published name,
  not the licence number; `"no"` returns every other row, including the 9,473
  with no contractor name. 60,657 rows carry `license = 0`; 55,195 carry
  `license_type` `NA` (55,194 rows carry both).
- **`occupancy` is sparse** (21,326 of 125,771 rows) because older certificates
  were issued before that field was recorded. `valuation` is 0 or missing on
  502 rows; the largest single value is $583.8m.
- **`projectNumber` is populated on 243 rows only**; use `pcisPermit` or
  `referenceOldPermit` to trace a job.
- The dataset is the certificate register, not an inspection history: it does
  not say whether the building is still standing, occupied or in compliance.
- The contractor principal, applicant and applicant-address fields are the
  public permit record's own entries. We add nothing beyond the file and do
  not infer any relationship that the city did not publish.
- When `maxResults` or the run-level charge cap stops a query, the dataset also
  carries one unbilled `_meta` row with `truncated`, `delivered` (a lower bound
  when `stopReason="charge-limit"`), `totalMatched` and `stopReason`.

### Source and licence

City of Los Angeles Department of Building and Safety, published on the
[LA Open Data portal](https://data.lacity.org/City-Infrastructure/Building-and-Safety-Certificate-of-Occupancy/3f9m-afei)
(public open data).

### Use it from an AI agent (MCP)

Connect any MCP client to `https://mcp.apify.com/?tools=j0401/la-building-occupancy` to load this dataset as a single tool beside the tools you already have - same records, same per-record pricing.

# Actor input Schema

## `mode` (type: `string`):

rows = certificates (default). aggregate = one row per group with a count, valuation total/average, unit total or floor-area total. profile = one certificate by number. parcel = every certificate at one assessor parcel (apn required) with the parcel summary.

## `cofoNumber` (type: `string`):

The CofO number, e.g. "234037".

## `pcisPermit` (type: `string`):

Permit number, e.g. "03014-20000-04721".

## `referenceOldPermit` (type: `string`):

Older permit reference as the city publishes it, e.g. "16VN18124" or "23ON 0299" (about a quarter of values carry an internal space).

## `apn` (type: `string`):

Assessor parcel, e.g. "2368-016-034". Used with mode=parcel or as a filter.

## `address` (type: `string`):

Case-insensitive substring on the street name, e.g. "GENTRY".

## `streetName` (type: `string`):

Same as address; kept for symmetry with other actors.

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

Exact 5-digit ZIP code.

## `permitType` (type: `string`):

e.g. "Bldg-New", "Bldg-Addition", "Bldg-Alter/Repair", "Swimming-Pool/Spa".

## `permitSubType` (type: `string`):

"1 or 2 Family Dwelling", "Commercial" or "Apartment".

## `permitCategory` (type: `string`):

"Plan Check" (125,668 rows) or "No Plan Check".

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

"CofO Issued", "CofO Corrected", "CofO Superseded" or "CofO Reactivated".

## `initiatingOffice` (type: `string`):

VAN NUYS, METRO, WEST LA, SOUTH LA, SANPEDRO or WILSHIRE.

## `zone` (type: `string`):

Zoning code exactly as published, e.g. "R1-1", "C2-1XL". The feed has 1,294 zone values plus a blank group of 83 rows.

## `occupancy` (type: `string`):

e.g. "R3 Occ. Group", "Misc. Occ. Group". Filled on 21,326 rows.

## `contractor` (type: `string`):

Case-insensitive substring on the contractor business name.

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

Digits only.

## `ownerBuilder` (type: `string`):

yes = the published contractor name is "OWNER-BUILDER" (55,189 rows); no = every other row, including the 9,473 with no published contractor name.

## `valuationMin` (type: `number`):

Declared job valuation, lower bound.

## `valuationMax` (type: `number`):

Declared job valuation, upper bound.

## `minUnits` (type: `number`):

of_residential_dwelling_units lower bound.

## `issueFrom` (type: `string`):

ISO date (YYYY-MM-DD) on cofo_issue_date.

## `issueTo` (type: `string`):

ISO date (YYYY-MM-DD) on cofo_issue_date.

## `year` (type: `integer`):

Exact year, 2005-2026.

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

Used only with mode=aggregate. Default permitType.

## `metric` (type: `string`):

count (default); valuation and unit metrics sum or average the published columns.

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

Records delivered in rows mode (default 50, max 5000). parcel returns every certificate at the APN up to its 2,000 ceiling and profile returns the certificate regardless of this value; aggregate ignores it. 0 uses the default 50.

## Actor input object example

```json
{
  "mode": "",
  "ownerBuilder": "",
  "groupBy": "",
  "metric": "",
  "maxResults": 50
}
```

# Actor output Schema

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

LA certificates of occupancy 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/la-building-occupancy").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/la-building-occupancy").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/la-building-occupancy --silent --output-dataset

```

## MCP server setup

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

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/VtKt4pczekGaZxJUP/builds/N1y1TuaWScAjQ4J6a/openapi.json
