# ZIP & County Market Profile (Demographics + Businesses) (`lepidata/zip-county-market-profile`) Actor

Demographics (with margins of error) and business counts by industry for US ZIP codes and counties, from US government public data. Unofficial.

- **URL**: https://apify.com/lepidata/zip-county-market-profile.md
- **Developed by:** [Lepi Data](https://apify.com/lepidata) (community)
- **Categories:** Business, Real estate
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 profile or industry rows

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

**This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.**

## ZIP & County Market Profile (Demographics + Businesses)

Demographics (with margins of error) and business counts by industry for US ZIP codes and counties, from US government public data. Unofficial.

**Modes** (`endpoint`)

- `zip`: ZIP profile (ids: 5-digit ZIP codes)
- `county`: County profile (ids: 5-digit county FIPS)
- `zip-industries`: ZIP businesses by industry (ids: 5-digit ZIP codes)
- `county-industries`: County businesses by industry (ids: 5-digit county FIPS)
- `naics`: Industry codes

**Filters** are passed as JSON in `filters`, using the same names as the output's `query` object (e.g. {}).

**Output.** One row per record (`type: "record"`), plus `source_notice` and `removal` on every row. Free status rows (never charged): `invalid-input`, `not-found`, `no-results`, `api-error`, `service-busy`, `run-limit-reached`, `free-plan-limit`, `charge-limit-reached`.

Example row:

```json
{
 "geo_id": "78701",
 "geography": "ZIP / ZCTA",
 "name": "ZCTA5 78701",
 "demographics": {
  "vintage": "ACS 2023 5-year",
  "population": {
   "estimate": 11114,
   "moe": 1150
  },
  "median_age": {
   "estimate": 41.5,
   "moe": 3.1
  },
  "median_household_income": {
   "estimate": 154867,
   "moe": 13347
  },
  "per_capita_income": {
   "estimate": 137841,
   "moe": 19529
  },
  "median_home_value": {
   "estimate": 653600,
   "moe": 84340
  },
  "median_gross_rent": {
   "estimate": 2732,
   "moe": 129
  },
  "housing_units": {
   "estimate": 8021,
   "moe": 689
  },
  "occupied_housing_units": {
   "estimate": 7319,
   "moe": 743
  },
  "owner_occupied_units": {
   "estimate": 3585,
   "moe": 731
  },
  "renter_occupied_units": {
   "estimate": 3734,
   "moe": 528
  },
  "households": {
   "estimate": 7319,
   "moe": 743
  },
  "population_25_plus": {
   "estimate": 10190,
   "moe": 1109
  },
  "bachelors_degree": {
   "estimate": 5131,
   "moe": 857
  },
  "masters_degree": {
   "estimate": 2304,
   "moe": 666
  },
  "professional_degree": {
   "estimate": 512,
   "moe": 242
  },
  "doctorate_degree": {
   "estimate": 349,
   "moe": 165
  },
  "civilian_labor_force": {
   "estimate": 8461,
   "moe": 1082
  },
  "unemployed": {
   "estimate": 123,
   "moe": 73
  },
  "poverty_status_universe": {
   "estimate": 11003,
   "moe": 1138
  },
  "below_poverty_level": {
   "estimate": 1463,
   "moe": 315
  },
  "derived": {
   "owner_occupied_pct": 48.98,
   "bachelors_or_higher_pct": 81.41,
   "unemployment_rate_pct": 1.45,
   "poverty_rate_pct": 13.3
  }
 },
 "businesses": {
  "vintage": "CBP 2022",
  "naics": "00",
  "industry": "Total for all sectors",
  "establishments": 3211,
  "establishments_flag": null,
  "by_employment_size": [
   {
    "size_code": "210",
 
```

**Data source, notices and limits**

- US government public data: American Community Survey 2023 5-year estimates and County Business Patterns 2022, from the U.S. Census Bureau Data API.
- Unofficial. Not affiliated with, endorsed by, or sponsored by the U.S. Census Bureau or any government agency.
- Estimates exactly as published, each with its margin of error (90% confidence) as moe. Negative codes such as -666666666 are source annotations, explained in annotation. Fields under "derived" are computed by Lepidata from source values, have no published margin of error and are not source figures.
- Business counts exactly as published. Employment and payroll carry the source noise flag (G low, H moderate, J high noise) and any suppression flag. Withheld values are not estimated.
- Annual source vintages, cached up to 7 days; retrieved_at shows when.
- Published aggregates only. Do not combine with other data to identify a person or business (the source terms forbid it).
- Removal requests: support@lepidata.com (handled within 30 days).
- Unofficial data provided as is. Not financial, legal or investment advice.
- Records listed for removal on request are filtered out of every run.
- Source capacity is shared by all users of this tool. When it runs low or the source rate limits, runs stop cleanly with a free `service-busy` row. Hard cap: 300 source calls per run, paced (about one call every 1 s).
- Free-plan accounts get up to 100 results per run.

**Pricing.** Pay per result row, flat on every plan, no start fee. Status rows are free.

Contact: support@lepidata.com

# Actor input Schema

## `endpoint` (type: `string`):

Which data to fetch.

## `ids` (type: `array`):

For modes that need an ID: zip: 5-digit ZIP codes; county: 5-digit county FIPS; zip-industries: 5-digit ZIP codes; county-industries: 5-digit county FIPS. Up to 200 per run.

## `filters` (type: `object`):

Query filters for the chosen mode, as JSON (see the README for each mode's filters). Unknown filters return a free invalid-input row.

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

Stop after this many paid result rows.

## Actor input object example

```json
{
  "endpoint": "zip",
  "ids": [
    "10001",
    "78701"
  ],
  "maxItems": 10
}
```

# Actor output Schema

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

All rows from this run.

# 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 = {
    "endpoint": "zip",
    "ids": [
        "10001",
        "78701"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("lepidata/zip-county-market-profile").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 = {
    "endpoint": "zip",
    "ids": [
        "10001",
        "78701",
    ],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("lepidata/zip-county-market-profile").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 '{
  "endpoint": "zip",
  "ids": [
    "10001",
    "78701"
  ],
  "maxItems": 10
}' |
apify call lepidata/zip-county-market-profile --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lepidata/zip-county-market-profile"
        }
    }
}
```

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/tZPJj6T6j0jFOe9rt/builds/hmBuyIcS8cNwpBD65/openapi.json
