# US Building Permits by County, Metro & City (Census BPS) (`tallyvane/census-building-permits`) Actor

US Census monthly residential building permits (units, buildings, USD value) for states, counties, metros (CBSA) and cities. Inputs: geography, states e.g. \["TX"], months 1-24, mode rows|trend, rankBy units|growth. Output: one JSON row per area with totalUnits, totalValue, MoM/YoY % change and rank.

- **URL**: https://apify.com/tallyvane/census-building-permits.md
- **Developed by:** [Tallyvane Data](https://apify.com/tallyvane) (community)
- **Categories:** Real estate, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 area rows

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

## US Building Permits by County, Metro & City (Census BPS)

Where is new housing being built, and is it speeding up or slowing down? This Actor returns the U.S. Census Bureau's monthly **residential building permit** counts for **every state, every county, every metro and micro area (CBSA), and about 20,000 cities, towns and permit offices** as clean JSON rows, with the trend math already done.

For each area and month you get the number of **buildings**, **housing units** and **construction value (USD)** authorized by permit, split by structure type: single-family, 2 units, 3–4 units and 5+ units (apartments). Trend mode adds **month-over-month** and **year-over-year** change, **trailing 12-month units** and a **rank**, so you can list the fastest-growing counties or cities in one run.

Who uses this: building-material suppliers and distributors, homebuilders and trade contractors choosing where to put reps, branches and inventory, lenders, and market analysts. No API key, no spreadsheet stitching: the Census publishes one file per month with two-line headers and padded names; this Actor joins the months for you.

### Inputs

| Field | What it does | Default |
|---|---|---|
| `geography` | `state`, `county`, `cbsa` (metro/micro area) or `place` (city, town, township, county permit office) | `county` |
| `states` | Optional list of postal codes (`TX`) or state FIPS (`48`). Empty = whole country. A metro area matches when the state is in its name (e.g. `PA-NJ-DE-MD`). | all |
| `fips` | Optional list of area codes: county FIPS `48453`, CBSA `12420`, place FIPS `4805000`, or an `areaId` from an earlier run | all |
| `months` | Number of recent months, 1–24 | 12 |
| `mode` | `rows` = one row per area per month; `trend` = one row per area with totals, change and rank | `rows` |
| `rankBy` | Trend mode: `units` (biggest markets) or `growth` (fastest year-over-year growth) | `units` |
| `structureTypes` | Which types count toward `totalUnits`/`totalValue`: `1`, `2`, `34`, `5plus`. Empty = all. Per-type columns are always returned. | all |
| `minUnits` | Drop areas below this many units (per month in rows mode, per window in trend mode) | 0 |

Example: fastest-growing Texas counties for single-family homes over the last 12 months, skipping counties under 200 homes:

```json
{ "geography": "county", "states": ["TX"], "mode": "trend", "rankBy": "growth", "structureTypes": ["1"], "minUnits": 200 }
```

### Output

Every row has the same fields in every mode (fields that do not apply are `null`). Sample trend row from a live run on 2026-11-16:

```json
{
  "month": "2026-09", "periodStart": "2025-10", "periodEnd": "2026-09", "monthsCovered": 12,
  "geography": "county", "stateFips": "51", "stateCode": "VA",
  "areaId": "51510", "areaFips": "51510", "areaName": "Alexandria (Independent City)",
  "bldgs1": 41, "units1": 41, "value1": 22525698,
  "bldgs2": 1, "units2": 2, "value2": 400000,
  "bldgs34": 0, "units34": 0, "value34": 0,
  "bldgs5plus": 5, "units5plus": 1157, "value5plus": 149705061,
  "totalUnits": 1200, "totalValue": 172630759,
  "unitsMoMPct": -99.5, "unitsYoYPct": 5900.0, "trailing12Units": 1200, "rankInSelection": 1,
  "sourceFile": "https://www2.census.gov/econ/bps/County/co2609c.txt",
  "checkedAt": "2026-11-16T05:53:09Z"
}
```

- `month`: the month of the row (rows mode) or the newest month of the window (trend mode), `YYYY-MM`.
- `areaId`: unique key for the area. Equal to the FIPS/CBSA code, except for places, where it is the state code plus the Census 6-digit permit-office ID.
- `areaFips`: FIPS code where one exists. `null` for unincorporated county areas and other permit offices without a FIPS place code.
- `value*` and `totalValue`: construction value in **US dollars** (state and metro files publish thousands of dollars; this Actor converts them).
- `totalUnits`/`totalValue`: summed over the chosen `structureTypes`.
- `unitsMoMPct`: newest month vs the month before, in percent. `unitsYoYPct`: the window vs the same months a year earlier. Both are `null` when the earlier value is 0 or a month is missing.
- `trailing12Units`: units over the latest 12 months (trend mode).
- `rankInSelection`: 1 = top of your selection by `rankBy` (trend mode).

The run also stores a `SUMMARY` record in the key-value store: newest month, rows found and returned, and any month file the Census did not have.

Errors are machine-readable: the run fails with a status message that starts with a code, e.g. `INVALID_STATE: 'XX' is not a US state postal code...`, `SOURCE_UNAVAILABLE: ...` or `SOURCE_LAYOUT_CHANGED: ...`.

### Price

Pay per result: **$0.01 per area row** returned ($10 per 1,000), plus Apify's standard run-start charge. A national county trend run is about 3,000 rows; a one-state county run is usually 50–250 rows. Set a maximum charge per run in Apify and the Actor stops there.

**Free plan:** users on Apify's free plan get the first 25 rows of each run, so you can check the data before paying.

### Data and limits

- **Source:** U.S. Census Bureau, Building Permits Survey (BPS), https://www.census.gov/construction/bps/ . Files: https://www2.census.gov/econ/bps/ (folders `State`, `County`, `CBSA (beginning Jan 2024)`, `Place`). File layouts: https://www2.census.gov/econ/bps/Documentation/ .
- **Terms (checked 2026-11-16):** the Census Bureau "publishes its data as open data, meaning it is freely available for use and re-use by the public" (https://www.census.gov/about/policies/open-gov.html). Federal government works carry no U.S. copyright (17 U.S.C. §105). Cite as "Source: U.S. Census Bureau, Building Permits Survey." This Actor is not endorsed or certified by the Census Bureau.
- Monthly figures are the Census "current month" files, which include imputed values for permit offices that did not report. New months usually appear around the 17th workday of the following month.
- Metro (CBSA) files start in January 2024; earlier months are reported as missing in `SUMMARY`.
- The place files list permit offices that report monthly; offices that report only once a year are not in the monthly place data. County and state totals include them through Census imputation.
- Permits are authorizations, not starts or completions. Only new privately owned residential construction is covered; no nonresidential, no remodeling.
- Aggregates only. No permit holder names, addresses or other personal data.

### Support

Open an issue on this Actor's Issues tab. Publisher: Tallyvane.

# Actor input Schema

## `geography` (type: `string`):

Level of the areas returned: state, county, cbsa (metro/micro area) or place (city, town or permit office). Leave empty for county.

## `states` (type: `array`):

Optional. Two-letter postal codes (TX) or two-digit state FIPS codes (48). Empty means the whole country. For metro areas a CBSA matches when the state appears in its name (e.g. PA-NJ-DE-MD).

## `fips` (type: `array`):

Optional. Only these areas: state FIPS (48), county FIPS (48453), CBSA code (12420), or for places the 7-digit place FIPS (4805000) or the areaId from a previous run.

## `months` (type: `integer`):

How many recent months to include (1-24). In trend mode this is the window that is summed and compared with the same window a year earlier.

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

rows: one row per area per month. trend: one row per area with window totals, month-over-month and year-over-year change, trailing 12-month units and a rank. Leave empty for rows.

## `rankBy` (type: `string`):

How trend rows are ordered and ranked. Combine growth with Minimum units to skip tiny areas.

## `structureTypes` (type: `array`):

Optional. Which structure types count toward totalUnits and totalValue (and minUnits and ranking). Empty means all. Per-type columns are always returned.

## `minUnits` (type: `integer`):

Optional. Drop areas with fewer total units than this (per month in rows mode, per window in trend mode).

## Actor input object example

```json
{
  "geography": "county",
  "states": [
    "TX"
  ],
  "months": 12,
  "mode": "rows",
  "rankBy": "units",
  "minUnits": 0
}
```

# Actor output Schema

## `results` (type: `string`):

All rows from the default dataset, shown with the Overview view selected (area, month, units, value, change and rank).

# 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 = {
    "geography": "county",
    "states": [
        "TX"
    ],
    "months": 12,
    "mode": "rows",
    "rankBy": "units",
    "minUnits": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("tallyvane/census-building-permits").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 = {
    "geography": "county",
    "states": ["TX"],
    "months": 12,
    "mode": "rows",
    "rankBy": "units",
    "minUnits": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("tallyvane/census-building-permits").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 '{
  "geography": "county",
  "states": [
    "TX"
  ],
  "months": 12,
  "mode": "rows",
  "rankBy": "units",
  "minUnits": 0
}' |
apify call tallyvane/census-building-permits --silent --output-dataset

```

## MCP server setup

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

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/vD0l8220WMNDS8ZWD/builds/qd53Snia7REFJAsTe/openapi.json
