# Los Angeles Building Permits API — New LADBS Feed (`themartygriffin/los-angeles-building-permits-feed`) Actor

Los Angeles building permit API — every new LADBS permit since your last run, filtered by type, ZIP, value or keyword. $2 per 1,000 permits.

- **URL**: https://apify.com/themartygriffin/los-angeles-building-permits-feed.md
- **Developed by:** [Marty Griffin](https://apify.com/themartygriffin) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 permits

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?

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

## Los Angeles Building Permits - New Permit Feed

Get the **City of Los Angeles building permits issued since your last run**, without sorting through ones you have already seen. Each run returns only the new ones, with address, ZIP, valuation, work description and a new-construction, addition, alteration or demolition flag. Schedule it weekly and you have a running list of where work is being permitted in LA.

Useful if you sell roofing, solar, materials or services to construction, or if you track building activity as an architect, investor or journalist. You get addresses and project details. You do not get who is doing the work.

### Not included: read this before you run it

> **No contractor, owner or applicant names.** The city's dataset has no such column. If you need to know who pulled a permit, this Actor cannot tell you.
>
> **City of Los Angeles only,** issue dates from 2020 on. Not LA County, Santa Monica, Pasadena or any other city.
>
> **Not daily.** The city refreshes this dataset about weekly. When this Actor was tested, the newest issue date was 2026-11-07, four days before the run. A daily schedule will usually return nothing. That is correct, not a bug, and it costs you no permit charges.

More limits you should know about:

- **`include_already_reported` changes the dataset, never the bill.** The Start form is prefilled with `mode: backfill` and `include_already_reported: on`, so Apify's automated test always gets a non-empty dataset. On, a repeat backfill returns permits you were already sent, free (no charge event). Off, it leaves them out. Pressing Start twice does not bill twice.
- **"Already reported" memory lasts 365 days of issue dates, the same as the maximum `lookback_days`.** No backfill can reach a permit the Actor has forgotten, so memory expiry never causes a second charge. Permits are also remembered account-wide, not per `state_key`, for billing (see Pricing).
- **Late back-dated permits can be missed.** `new` mode re-reads only the 7 days behind the watermark. A permit published with an older `issue_date` is not caught.
- **Backfill is capped** by `max_results` (default 1000) charged permits and goes oldest first. Permits returned again for free do not count toward the cap. A 30-day backfill is likely several thousand permits (506 permits fell on the three most recent issue dates at test time). Raise `max_results`, or let later `new` runs pick up the rest.
- **Valuation is the applicant's stated figure, not a project cost.** The source stores it as text and we parse it to a number. Many values are small or odd (a hillside grading permit in the test data showed `13`).
- **Valuation filters run after download.** With a narrow valuation filter the Actor still reads every row in the date window.
- **Any of `valuation`, `neighborhood_council`, `latitude`, `longitude`, `work_description` and `zip` can be null.**
- **Work descriptions are free text typed by applicants.** They sometimes contain private names (one test record named a property owner). That is the city's public record as published. There is still no name field.
- **The city can correct data at any time.** A permit's fields can change after we reported it. We do not re-report changes.
- **Socrata throttling.** The API is used without an app token, with 1000-row pages and a short pause between them. On HTTP 429 the Actor waits (honouring `Retry-After`, up to 60 s), retries once, then stops with a clear message. Progress is saved and the next run resumes.

### How it works

1. **`backfill`** (run once): returns permits issued in the last N days (`lookback_days`, default 30, 1 to 365) and saves a watermark (the highest `issue_date`) plus the permit numbers already reported, in a named key-value store (`la-permits-state`).
2. **`new`** (schedule this): fetches permits issued since the watermark, returns only those not reported before, and advances the watermark. If there is no saved state it tells you to run `backfill` first. It does not quietly return nothing.

The Start form shows `mode: backfill` and `lookback_days: 14` as prefills. The defaults, used when a field is left out of the input, are `new` and 30.

Reading is oldest-first with keyset pagination on `(issue_date, permit_nbr)`, not `$offset`, so results cannot shift mid-run. Each `new` run re-reads the last 7 days behind the watermark and de-duplicates by permit number, so permits the city publishes late are still caught.

### Filters (all optional)

| Input | Meaning |
|---|---|
| `mode` | `new` (default) or `backfill` (prefilled on the form). |
| `lookback_days` | Backfill only. Default 30, form prefill 14, range 1 to 365. |
| `include_already_reported` | Backfill only. Default off, **form prefill on** (see above). On also returns permits already reported, free of charge. Never changes what is billed. |
| `permit_types` | Exact values, e.g. `Bldg-New`, `Bldg-Addition`, `Bldg-Alter/Repair`, `Bldg-Demolition`, `Nonbldg-New`, `Grading`, `Sign`, `Swimming-Pool/Spa`. Empty means all. |
| `permit_sub_types` | `1 or 2 Family Dwelling`, `Apartment`, `Commercial`, `Onsite`, `Offsite`. Empty means all. |
| `min_valuation` / `max_valuation` | USD. Permits with no valuation are excluded when either is set. |
| `zip_codes` | List of 5-digit ZIPs. |
| `council_districts` | Numbers 1 to 15. |
| `neighborhood_council` | Text contained in the neighborhood council name, case-insensitive. |
| `keywords` | Report a permit if its work description contains any of these text fragments (solar, ADU, pool). It is a substring match, not a whole-word match, so `ADU` also matches longer words that contain it. |
| `max_results` | Safety cap on charged permits per run (permits returned again for free do not count). Default 1000, oldest first. |
| `state_key` | Name of the saved state. Default `default`. **Use a separate name for each filter set you schedule.** |

"Already reported" is tracked per `state_key`, not per filter set. Changing filters under the same name will not re-report permits already sent.

### Output

One dataset item per permit:

```json
{
  "permit_number": "25010-10000-02388",
  "issue_date": "2026-11-05",
  "permit_type": "Bldg-New",
  "permit_sub_type": "1 or 2 Family Dwelling",
  "construction_class": "new_construction",
  "is_new_construction": true,
  "work_description": "ePlan(N) 2-STORY DETACHED ADU PER STATE LAW GCS 66323(a)(2).  TO BE EQUIPPED WITH NFPA 13D FIRE SPRINKLERS THROUGH OUT.",
  "address": "17820 W ERWIN ST",
  "zip": "91316",
  "valuation": 110400.0,
  "council_district": "4",
  "neighborhood_council": "ENCINO NC, Encino",
  "community_plan_area": "Reseda - West Van Nuys",
  "status": "Issued",
  "use_description": "Accessory Dwelling Unit",
  "latitude": 34.18373,
  "longitude": -118.52164,
  "source": "City of Los Angeles, data.lacity.org (pi9x-tg5x)",
  "first_seen_at": "2026-11-12T05:31:22Z"
}
```

`construction_class` is derived from the permit type: `new_construction` (`Bldg-New`, `Nonbldg-New`), `addition`, `alteration`, `demolition`, otherwise `other` (grading, signs, pools). `is_new_construction` is true only for `new_construction`. `first_seen_at` is when this Actor first reported the permit (UTC), not when the city issued it. See `sample-output.json` for five permits.

### Pricing

Pay per event. One **`permit-issued`** event is charged the first time a permit is written to your dataset. Permits already reported to you are written without the event.

- **Charged:** each permit not reported to you before.
- **Not charged:** permits already reported to you, whether they are skipped or (with `include_already_reported` on) returned again; a repeat backfill; the same permit under a different `state_key`; a permit listed twice in the city feed; permits removed by your filters; runs that find nothing new. The record of charged permits is kept for 365 days of issue dates and saved after every batch, so a crashed run that is restarted is not billed twice for what it already delivered. Apify's own actor-start event, if it applies, is separate.
- **Known limit:** two runs started at the same moment under the same account can both see a permit as new before either saves it. Do not run the same backfill concurrently.
- **Compute:** you pay the event price only. There is no separate compute bill on top.
- **Capping spend:** set `max_results` (default 1000 permits per run) and use Apify's maximum cost per run. If the cost limit stops a run early, only the permits actually delivered are recorded as reported, and the rest come on the next run.
- **Testing cheaply:** a backfill is billed for every permit it reports for the first time, so start with a small `lookback_days` and your filters.

### Real run output

Run locally against the live city API on 2026-11-11 (Raspberry Pi, home internet), Apify SDK 4.2.1, Python 3.13. These are not platform runs. Charging is a no-op locally, so there are no billing lines. Output is copied from the terminal; work descriptions in the three records are truncated for length, and one is cut before a personal name that the city's free text contained.

**1. `mode: backfill`, `lookback_days: 7`:** returned 506 permits in 1.9 s wall time:

```
[apify] INFO  mode=backfill state=default fetching issue_date >= 2026-11-05T00:00:00 (watermark=None, known ids=0)
[apify] INFO  backfill: scanned 506 rows, emitted 506 (charged 506, already reported and free 0), skipped 0 already reported; watermark=2026-11-07T00:00:00
items: 506  (wall 1932 ms)
```

Three of the 506 records:

```json
[
 {
  "permit_number": "07030-20001-03678",
  "issue_date": "2026-11-05",
  "permit_type": "Grading",
  "permit_sub_type": "1 or 2 Family Dwelling",
  "construction_class": "other",
  "is_new_construction": false,
  "work_description": "SUPPLEMENTAL PERMIT TO #07030-30000-03678 FOR CHANGE IN OWNERSHIP FROM ...",
  "address": "1369 N BEVERLY DR",
  "zip": "90210",
  "valuation": 13.0,
  "council_district": "5",
  "neighborhood_council": "Bel Air - Beverly Crest",
  "community_plan_area": "Bel Air - Beverly Crest",
  "status": "Issued",
  "use_description": "Grading - Hillside",
  "latitude": 34.09587,
  "longitude": -118.4147,
  "source": "City of Los Angeles, data.lacity.org (pi9x-tg5x)",
  "first_seen_at": "2026-11-12T05:31:22Z"
 },
 {
  "permit_number": "26030-10000-05154",
  "issue_date": "2026-11-05",
  "permit_type": "Grading",
  "permit_sub_type": "1 or 2 Family Dwelling",
  "construction_class": "other",
  "is_new_construction": false,
  "work_description": "EPLAN2025 WILDFIRE REBUILD, SITE GRADING FOR PROPOSED SFD W GARAGE, POOL  AND RETAINING WALL  EO8, SEE COMMENT...",
  "address": "16426 W AKRON ST",
  "zip": "90272",
  "valuation": 471.0,
  "council_district": "11",
  "neighborhood_council": null,
  "community_plan_area": "Brentwood - Pacific Palisades",
  "status": "Issued",
  "use_description": "Grading - Hillside",
  "latitude": 34.05048,
  "longitude": -118.54011,
  "source": "City of Los Angeles, data.lacity.org (pi9x-tg5x)",
  "first_seen_at": "2026-11-12T05:31:22Z"
 },
 {
  "permit_number": "26016-90000-31314",
  "issue_date": "2026-11-07",
  "permit_type": "Bldg-Alter/Repair",
  "permit_sub_type": "1 or 2 Family Dwelling",
  "construction_class": "alteration",
  "is_new_construction": false,
  "work_description": "Re-roof with Class A or B roof covering material weighing less than 6 pounds per sq. ft. over existing solid s...",
  "address": "5003 N WILLOW CREST AVE",
  "zip": "91601",
  "valuation": 5600.0,
  "council_district": "2",
  "neighborhood_council": "NOHO NC",
  "community_plan_area": "North Hollywood - Valley Village",
  "status": "Issued",
  "use_description": "Dwelling - Single Family",
  "latitude": 34.16147,
  "longitude": -118.36282,
  "source": "City of Los Angeles, data.lacity.org (pi9x-tg5x)",
  "first_seen_at": "2026-11-12T05:31:22Z"
 }
]
```

**2. `mode: new`, immediately after:** zero records, 1.8 s:

```
[apify] INFO  mode=new state=default fetching issue_date >= 2026-11-05T00:00:00 (watermark=2026-11-07T00:00:00, known ids=506)
[apify] INFO  new: scanned 506 rows, emitted 0 (charged 0, already reported and free 0), skipped 506 already reported; watermark=2026-11-07T00:00:00
items: 0  (wall 1849 ms)
```

**3. Stored watermark** (key-value store `la-permits-state`, key `STATE-default`):

```
{'watermark': '2026-11-07T00:00:00', 'floor': '2026-11-05T00:00:00', 'seen': 506 ids, 'last_mode': 'new'}
```

Other checks from the same session: removing 5 ids from the saved state and rewinding the watermark made the next `new` run emit exactly those 5, and the run after that emitted 0; `new` with no saved state exits with the "run backfill first" message; a filtered 30-day run (Bldg-New, Apartment/Commercial, valuation >= $1M) returned 12 permits; a simulated HTTP 429 (local fake server) produced one back-off, one retry, then a failed run with a clear message. A 1000-permit run took 2.4-3.2 s. These runs are well inside Apify's 5-minute limit. The Actor has **not** been run on the Apify platform, so container start-up time is unmeasured.

### Attribution and terms

Data: **City of Los Angeles, data.lacity.org** - "Building and Safety - Building Permits Issued from 2020 to Present" (dataset `pi9x-tg5x`, https://data.lacity.org/resource/pi9x-tg5x). The portal's terms say data sets are provided for information, without warranty of accuracy or completeness, and may be refreshed at any time. No explicit licence is attached to this dataset; no restriction on automated use was found. This Actor is not affiliated with or endorsed by the City of Los Angeles. No credentials or API key are used.

# Actor input Schema

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

'backfill' returns permits issued in the last N days and saves the state; it is the default, so a first run returns real results. 'new' returns only permits not reported by an earlier run and needs saved state - it exits with an empty dataset if you have never run 'backfill'.

## `lookback_days` (type: `integer`):

Backfill only. Return permits issued in the last this many days (1 to 365, the same span the Actor remembers reported permits for). The city updates the dataset about weekly, so the newest few days are often missing.

## `include_already_reported` (type: `boolean`):

Backfill only. Controls whether permits an earlier run already reported appear in the dataset again. Off (the default): they are left out. On: they are returned again. It never changes what you are charged: a permit is billed once, the first time it is reported, and re-reported permits are free. Permits are remembered for 365 days of issue dates, which covers the longest lookback.

## `permit_types` (type: `array`):

Exact dataset values, e.g. Bldg-New, Bldg-Addition, Bldg-Alter/Repair, Bldg-Demolition, Nonbldg-New, Grading, Sign, Swimming-Pool/Spa. Empty = all.

## `permit_sub_types` (type: `array`):

Exact dataset values: '1 or 2 Family Dwelling', 'Apartment', 'Commercial', 'Onsite', 'Offsite'. Empty = all.

## `min_valuation` (type: `integer`):

Skip permits with a stated valuation below this. Permits with no valuation are excluded when this or the maximum is set.

## `max_valuation` (type: `integer`):

Skip permits with a stated valuation above this. Permits with no valuation are excluded when this or the minimum is set.

## `zip_codes` (type: `array`):

5-digit ZIP codes, e.g. 90210. Empty = all.

## `council_districts` (type: `array`):

Council district numbers 1-15. Empty = all.

## `neighborhood_council` (type: `string`):

Case-insensitive text that must appear in the neighborhood council name, e.g. 'VENICE'.

## `keywords` (type: `array`):

Return a permit if its work description contains ANY of these text fragments (case-insensitive), e.g. solar, ADU, pool. This is a substring match, so 'ADU' also matches longer words that contain it.

## `max_results` (type: `integer`):

Safety cap on charged permits (never reported before) per run. Permits returned again for free do not count. Default 1000. Oldest first. The rest are picked up on the next 'new' run.

## `state_key` (type: `string`):

Name of the saved watermark. Use a different name for each filter set you schedule, because 'already reported' is tracked per name, not per filter set.

## Actor input object example

```json
{
  "mode": "backfill",
  "lookback_days": 14,
  "include_already_reported": true,
  "max_results": 1000,
  "state_key": "default"
}
```

# Actor output Schema

## `results` (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 = {
    "mode": "backfill",
    "lookback_days": 14,
    "include_already_reported": true,
    "max_results": 1000,
    "state_key": "default"
};

// Run the Actor and wait for it to finish
const run = await client.actor("themartygriffin/los-angeles-building-permits-feed").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 = {
    "mode": "backfill",
    "lookback_days": 14,
    "include_already_reported": True,
    "max_results": 1000,
    "state_key": "default",
}

# Run the Actor and wait for it to finish
run = client.actor("themartygriffin/los-angeles-building-permits-feed").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 '{
  "mode": "backfill",
  "lookback_days": 14,
  "include_already_reported": true,
  "max_results": 1000,
  "state_key": "default"
}' |
apify call themartygriffin/los-angeles-building-permits-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,themartygriffin/los-angeles-building-permits-feed"
        }
    }
}
```

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/0V64aHjAPHbTZlmzL/builds/tOCEl9A5einn7oGCd/openapi.json
