# Marin County Building Permits Scraper (`zerobreak/marin-county-building-permits-scraper`) Actor

Marin County Building Permits Scraper is a Python tool to extract permit numbers, application dates, work categories, valuation estimates, applicant details, and parcel addresses from the Marin County permit portal. It exports structured construction datasets into clean CSV or JSON formats

- **URL**: https://apify.com/zerobreak/marin-county-building-permits-scraper.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

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

### Marin County Building Permits Scraper — Construction and Property Permit Records

![Marin County Building Permits Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/marin-county-building-permits-scraper-cover.png)

Collect building permit records from County of Marin public data. Search by keyword, apply custom filters, or retrieve the newest permits first. Export structured results in JSON, CSV, Excel, and other supported Apify dataset formats.

### Overview

The Marin County Building Permits Scraper collects records from the County of Marin's public Building Permits dataset.

Retrieve permit numbers, issue and received dates, property addresses, parcel numbers, construction values, work descriptions, permit classifications, and contractor details in one organized dataset.

Choose between search, filter, and latest collection modes to find the records you need.

### Features

- **Multiple collection modes:** Search, filter, or retrieve the latest permits.
- **Full-text search:** Find permits using keywords such as contractor names or construction descriptions.
- **Custom filtering:** Apply SoQL conditions to narrow records by date, city, or permit type.
- **Newest-first sorting:** Retrieve recently issued permits using issue-date ordering.
- **Construction details:** Collect project descriptions, work categories, and construction values.
- **Contractor information:** Retrieve available contractor names.
- **Flexible exports:** Download results in JSON, CSV, Excel, and other supported formats.

### Collection Modes

- **Search:** Uses the supplied search text to find matching records across searchable text fields.
- **Filter:** Applies a SoQL `where` condition to retrieve records matching specific criteria.
- **Latest:** Sorts records by `issued_date DESC` by default to return the newest permits first.

### Input Parameters

| Parameter | Description |
|---|---|
| `mode` | Collection mode: `search`, `filter`, or `latest`. |
| `searchText` | Keyword or phrase used in search mode. |
| `where` | SoQL filter condition used in filter mode. |
| `maxItems` | Maximum number of records to collect. |
| `requestDelayMs` | Delay between requests in milliseconds. |

### Example Input

**Latest permits**

```json id="mc001"
{
  "mode": "latest",
  "maxItems": 50,
  "requestDelayMs": 1000
}
```

**Search by keyword**

```json id="mc002"
{
  "mode": "search",
  "searchText": "furnace",
  "maxItems": 25,
  "requestDelayMs": 1000
}
```

**Filter by issue date**

```json id="mc003"
{
  "mode": "filter",
  "where": "issued_date > '2022-01-01'",
  "maxItems": 25,
  "requestDelayMs": 1000
}
```

### What Data Does This Actor Extract?

Each permit record can include the following fields:

| Field | Description |
|---|---|
| `permit_tracking_id` | Permit tracking identifier. |
| `permit_number` | Permit number. |
| `issued_date` | Date and time the permit was issued. |
| `received_date` | Date and time the permit application was received. |
| `address` | Property address associated with the permit. |
| `parcel_number` | Property parcel number. |
| `zipcode` | Property ZIP code. |
| `city_town` | City or town associated with the permit. |
| `city_town_inferred` | Inferred city or town information. |
| `construction_value` | Recorded construction value. |
| `construction` | Description of the construction work or activity. |
| `permit_description` | Detailed description of the permitted work. |
| `type_permit` | Permit classification, such as residential. |
| `contractor` | Contractor name, when available. |
| `scrapedAt` | Date and time the record was collected. |

### Example Output

```json id="mc004"
{
  "permit_tracking_id": "B31329",
  "permit_number": "B31329",
  "issued_date": "2022-10-07T15:31:10.000",
  "received_date": "2022-10-07T15:29:48.000",
  "address": "50 OAK GROVE AVE, WOODACRE, CA 94973",
  "parcel_number": "172-231-32",
  "zipcode": "94973",
  "city_town": "WOODACRE",
  "city_town_inferred": "WOODACRE",
  "construction_value": "14788",
  "construction": " Mechanical Appliance, Replace Mechanical Appliance; ",
  "permit_description": "Replace furnace in existing location and install new direct vent wall furnace.",
  "type_permit": "RESIDENTIAL",
  "contractor": "JOHN OWENS SERVICES INC",
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

### Use Cases

- **Construction lead generation:** Identify permitted projects and potential contractor opportunities.
- **Contractor research:** Explore contractor names and their associated permit records.
- **Real estate analysis:** Research construction activity across Marin County communities.
- **Property research:** Connect permits with addresses and parcel numbers.
- **Market analysis:** Study construction values, project types, and permit trends.
- **Business intelligence:** Build structured datasets for spreadsheets, dashboards, and reporting.

### Working with Your Dataset

After the actor completes a run, your collected permit records are available in the Apify dataset.

You can:

- Export records as JSON, CSV, or Excel.
- Filter and sort permits by date, city, contractor, or permit type.
- Analyze construction values and project descriptions.
- Use the collected data in spreadsheets, dashboards, and reporting workflows.

### FAQ

**Who is this actor for?**

It is useful for contractors, real estate professionals, developers, researchers, marketers, and analysts who need Marin County building permit records.

**What export formats are supported?**

You can export the dataset in JSON, CSV, Excel, and other formats supported by Apify.

**Can I run it on a schedule?**

Yes. You can configure an Apify schedule to collect updated permit records automatically.

**How do I filter by date or city?**

Choose `filter` mode and use a SoQL condition such as `issued_date > '2022-01-01'` or `city_town = 'NOVATO'`. You can also use `search` mode for keyword-based searches.

**How do I retrieve the newest permits?**

Choose `latest` mode. Records are sorted by issue date in descending order.

### Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, sponsored by, or officially associated with the County of Marin. The collected information comes from publicly available records. Users are responsible for reviewing the source's applicable terms and ensuring their use of the collected data is appropriate.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same thing as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

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

What to fetch. Search uses full-text $q, filter uses SoQL $where, latest orders by received date descending.

## `searchText` (type: `string`):

Full-text query sent as $q (search mode).

## `where` (type: `string`):

Raw SoQL $where clause, e.g. issued_date > '2022-01-01' (filter mode).

## `orderBy` (type: `string`):

SoQL $order override, e.g. received_date DESC. Latest mode defaults to received_date DESC.

## `maxItems` (type: `integer`):

Stop after this many successful rows. Hard max is 1000.

## `requestDelayMs` (type: `integer`):

Polite pacing in milliseconds. Raise if you see HTTP 429.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "latest",
  "searchText": "furnace",
  "where": "issued_date > '2022-01-01'",
  "orderBy": "",
  "maxItems": 100,
  "requestDelayMs": 1000,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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 = {
    "searchText": "furnace"
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/marin-county-building-permits-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 = { "searchText": "furnace" }

# Run the Actor and wait for it to finish
run = client.actor("zerobreak/marin-county-building-permits-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 '{
  "searchText": "furnace"
}' |
apify call zerobreak/marin-county-building-permits-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zerobreak/marin-county-building-permits-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/UXr9BNHROep2tmnfT/builds/oCNGY4eecntguXkWa/openapi.json
